This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
unobtanium's profile picture

Client for OpenPeripheral's Glasses [0.5.2]

Started by unobtanium, 13 July 2013 - 06:02 AM
unobtanium #1
Posted 13 July 2013 - 08:02 AM
Hello everone,

i recently discovered the awesome OpenPeripheral by OpenMods .
Since then i wanted to make a on screen real time updating, highly userfriendly and easy to configure program for networks.
And this vision turned into a whole client. The "Client for OpenPeripheral's Glasses".

IT'S HOT <3




Features:

- Mouse clicks for interactive and easy configuration
- Show the status of your peripherals (e.g. MFSU, Tanks, Reactor Core and more) on screen
- Multiple objects are preset for example: Box, Progress Bar, Graph (Pillar and Point)
- Individual Arguments can be added for each method
- Change size, colors and transparency of your objects to fit your own screen size and game experience
- Put infinite objects on 99 different and individual sites and call these wireless over chat
- Modular building system with frames
- Create automatic routines, warnings and actions depending on the status of your machines
- Take control over your whole facility simply over your chat system.
- Intelligent positioning on your screen e.g. text allways on top, box allways in the background.
- If you found a bug or your program crashed, tell me about it here in the thread and i will take care of it.

Download &amp; Installation

You are going to need
- one advanced computer
- one Terminal Glasses Bridge
- one Terminal Glasses
- and a network system with the peripherals you want to have informations from



Client for Open Peripheral 0.5.2 Download

Place your computer down and the Terminal Glasses Bridge on the left of it. The modem and peripherals are going on the back.
Rightclick with the Terminal Glasses (the item) in your hands the Terminal Glasses Bridge (the block).
Name/label your computer otherwise your settings and programs wont save!

label set <MyComputerName>

Paste this code into your computer

pastebin get 56HRGddn startup

And start it with

startup

Old version 0.4.4 (not recommended unless the new version doesnt work for you)

pastebin get CJUdEsRW startup

How to use

MAIN MENU
Instead of peripheral i choose the word "unit".
Select from the following options from the main menu:

Site
Place objects on your sites and call these sites over chat.
All objects documented on that site will be shown on your accuall minecraft screen.


Frame
This is the smart way to set up your peripherals.
Instead of creating all objects directly on sites, you can create them on frames.
These frames can then be put on multiple sites.
So if you made a nice HUD/Interface you can add it to all of your sites without re-doing it over and over again.


Objects
You then can add infinite objects to your site/frame by selecting one of the following formats:

Text
Add your own text on the screen.

Box
Add a box with changable size, color and transparent settings.

Number
You want to know how much EU is in your MFSUs?
Call the correct method, set the parameter and it will automatically will show you a nice formated number on your screen.

Bar
You dont like numbers? Maybe a progressbar would be yours then?
Custom size, colors and fadecolor helps to individualize and recognize your bar.
(Maybe add the Text object to it, too?)

Graph (Pillar/Point)
Tired of the standard stuff? You really want to know whats going on in your base?
These graphs with all their settings allow you to monitor the last couple moments of your peripheral.

Tank
Displays a vertical bar with the animated fluid of your choice.


Alarm'n'Action
For your ultimate control you can make automated routines (Alarm) if specific statements are true.
Select the condition and the selected action is going to be performed.
Instead of letting it make automated routines you can call actions per chat manually as well (Chat).
You also can receive rednet messages from other computer and turtles to activate a machine or inform you about it. (Rednet)
You can add multiple "Alarm'n'Actions" for the same kind of happening (e.g. your MFSU is low on energy: send text info on your screeb and also call an other computer over rednet to start creating energy again.)
The possible actions are like these:

Text
Display a simple text with your personal reminder.

Activation
Call another method of a peripheral.

Rednet
Send a rednet broadcast to other ComputerCraft networks.



You manover most of the times with the mouse and left click through the menus.
Here is a little guide line and tips:
Depending on which half of the row (left or right from the center) you clicked text editing will change:
If you click the text itself (right), it will edit the allready set text.
If you click the name of the variable/setting (left), it will clear the set text and lets you write from a clean start.
You can apply by hitting Enter or clicking the left mouse button.
Click arrows left or right to increase/decrease numbers, change colors and transparency, as well as selecting from a table of methods or peripherals.
You can increase the update interval of your peripherals and the on screen update rate in the bottom left of the main menu.

How to select the correct method

Because the system usually requires a number, you only should use a method, which accually does that.
Most of them have a "get" in their name.
(The system sorts all non "number" return values out, unless you click on the "Method" text instead on the "NONE")


Calling over the chat

You can call a site, without being near the computer, by tiping the following text into the chat:

$$site<1-99>
You also can clear your screen by typing in

$$clear
or just

$$
If the care case happens that the system is not updating anymore, use this:

$$sync


MORE SCREENSHOTS

SpoilerOne Frame




Three Frames of the same kind




Main Menu




Object Selection Screen




Object "Graph" Settings Screen




Method Selection with Information about it




Argument Settings for a Method




Manual Chat Settings and Action performed





Automatic Alarm Settings with Action



Random information:
All data is saved into a file named "openPeripheralClient".
If you want to you can copy this file to an other computers folder if someone wants to use the same interface.
If the computer is not attached to the same network you might have to set the units and methods again.




Updates
SpoilerBETA 0.5.2
- updated the program to work with newer versions
- fixed some method calling and parameter issues as well as return values
- added bar for liquids

BETA 0.5.1
- fixed methods selection which made the whole program useless. (thanks to blunty666 for the fix)

BETA 0.5.0
- Revamped the whole data system. It is now much more coder friendly and lets me adjust everything much faster.
- Added update interval. From a range of 0.5 to 16 seconds you can update your peripherals and screen. Use slower update rates on server!
- Improved the on screen writing and drawing. Flickering is gone (or at least rare). Errors are better visual and readable. Objects are put in a better order on the screen: Text in the front, Box in the back, Everything else in between.
- Improved save file. Old versions should be converted automatically into the new database. Now also saves the updateInterval and selected Site.
- bug: In the Alarm'N'Action menu the on screen updates are just happening if you are writing. Didn't found the fix yet.

BETA 0.4.4
- Revamped the whole code. Less messy, much more organised functions and understandable code parts. Check it out if you want to :P/>
- Improved chat usage. Now returns to the mainmenu when using a command over chat to prevent crashing.
- Fixed Alarm'n'Action action "rednet". The interaction was messed up.
- Added "ADD AUTO BOX" for the graph object. Automatically positions a new box object around your graph.
- Added "ADD AUTO TEXT" for the bar object. Automatically positions a new text object in front of your bar.
- Improved argument selection. Arguments dont get deleted/reset if allready set before.
- Improved method calling. Methods were called twice instead of once every two seconds.
- NEW BUG: Using arguments lags the updating on-screen, which is quite annoying. It probably happend before as well but didnt realized it. I am working on it, because it gets worse and worse the more methods are used with arguments :(/>

BETA 0.4.3
- Improved wireless modem wrapping. Now automatically detects it and sends and receives messages over it.
- Added new Alarm'n'Action. "Rednet" lets you receive rednet messages and perform an action.
- Fixed site and frame selection. You were able to go from -99 to +198 sites. You also were able to add a frame into a frame ("frameception") which created a stack overflow pretty fast :P/>
- Added error handling for Alarm'n'Action methods.
- Improved on-screen error message. Now only shows one error message at the time. Fix it before any other is shown.
- Fixed Progress Bar. Threw an error because gradient box handling changed.

BETA 0.4.2
- Fixed old version handling.
- Improved non advancedMethodsSupport. Added the possibility to add arguments manually (own risk) so you have to know what you are doing.
- Improved real time drawing. Now allways draws every two seconds even while editing. Therefore added error catches and messages on screen without crashing the program.
- Fixed the problem that the program might stop updating the screen. Sync ability now useless and deleted from the main menu, but still available over chat as comment.

BETA 0.4.1
- Fixed old file loading. Might have caused some trouble not closing the save file before opening it again.

BETA 0.4.0
- Alarm'n'Action Update: added automatic alarm and manual control over rednet. Call methods, send rednet messages or just show text to remind you. A next level is reached.
- changed picture hoster, because imageshack closes it's free doors…

BETA 0.3.1
- Fixed old file loading. Might have caused some trouble not closing the save file before opening it again.

BETA 0.3.0
- improved the writing of variables! Now can be canceled/finished by clicking instead of pressing Enter.
- removed the site and frame selection. It is now at the top of the screen like the objects are.
- changed file saving. Old file saves are getting converted automatically. So no worries by using the new version!
- improved method selection with description, return type and argument amount.
- added arguments selection!! OMG! AMAZING!!! AFTER MONTHS :3
- be happy! new bug: rapidly clicking on buttons may interupt updates for graphs or overall screen updates for your bridge. Added Sync function for that.

BETA 0.2.0
- added frames
- fixed some bugs


Reddit Post

Please feel free to leave feedback. I will read everything :)/>
I hope you enjoy this program, even tought it is still in-progress and OpenPeripherals not available for lower Minecraft and FTB versions.
unobtanium
Edited on 09 June 2015 - 08:07 PM
Mrrraou #2
Posted 13 July 2013 - 10:57 AM
Looks good but I get this error :

startup:433: attempt to call nil
So bad…
unobtanium #3
Posted 13 July 2013 - 11:39 AM
I am sorry..
Might be fixed tho. New version 0.2.0 available and now includes frames.
Mrrraou #4
Posted 13 July 2013 - 12:28 PM
Now it's a another error :(/>

startup:398: attempt to call nil

Just add parameters for peripheral sides because I have to edit the program for this ^^
unobtanium #5
Posted 13 July 2013 - 12:54 PM
On line 390 is a "end" There cant be an error…
Dont know what you are doing, but i made this for MC 1.5.2 and for wired networks. If it hook up a wired modem on the back and connect some blocks like a MFSU, it works completely fine.
Would be cool if you tell me what you did.
Mrrraou #6
Posted 13 July 2013 - 02:20 PM
On line 390 398 is a "end b.clear()"
Dont know what you are doing, but i made this for MC 1.5.2 I have it and for wired networks and this too !. If it hook up a wired modem on the back and connect some blocks like a MFSU, it works completely fine. Me too, but if you don't use the config you give, this doesn't works ! It's works fine now, but I can't have MFSU, IC2 is not updated… Is it or not ?
Would be cool if you tell me what you did. That's works fine now, without problem ! But I can use it for doing what without MFSU ? D:
unobtanium #7
Posted 13 July 2013 - 05:03 PM
Do you have the complete error message on 398? Because it looks like that it didnt found the terminal glasses bridge on the left. Not 100% sure.

Right now, you just can use methodes without parameters and which just return a number.
I definitly will go and try to add way to display strings as well as inserting parameters. Give me some time ;D
electrodude512 #8
Posted 13 July 2013 - 07:56 PM
Features:

- Create up to 99 individual sites

Why only 99? The beauty of Lua tables is that expanding them (i.e. >99) is trivial!

I made something like this that was modified off of MikeeMoo's ic2 energy monitor to have multiple bars per graph and be able to do things other than energy like how much liquid in tanks, nuclear reactor temp and uranium left, and mass fabricator progress, scrap level, and uu matter level. Configuration is hardcoded into a big table.
Spoiler
Disclaimer: My base is a work in progress. Those hoppers will be filled by a turtle.

Yours looks prettier but takes up more of the screen. I'll look into using it/borrowing features from your program into mine with credit if redistributed.
unobtanium #9
Posted 14 July 2013 - 08:41 AM
I dont see any problem with having 99 sites accually. You still can have infinite objects on every site.
SpoilerI just have 99 sites, because it checks every two seconds for updates for the graphs. I also have the frames saved in the same table, because this allows me to use code even better. So the table 1-99 is for the sites and 100-198 is for the frames. I can increase this, but i see no need for it. I dont think someone is going to need such many sites. And if he can wear more glasses…

Why does it take more of the screen? Are you talking about the text size? I can add a size variable to it, if you feel like needing it.
Edited on 26 March 2014 - 05:58 PM
Tiin57 #10
Posted 14 July 2013 - 08:48 AM
By the way, Mrrraou, IC2 Jenkins here
Mrrraou #11
Posted 16 July 2013 - 11:25 AM
Oh thanks ! :D/>
mz2212 #12
Posted 09 August 2013 - 05:20 AM
Is there any chance you could make this program for the standard computers?
unobtanium #13
Posted 09 August 2013 - 11:09 AM
Maybe yes. 1.5.2 version of ftb is out and people are going to get into this pretty soon, so i am going to wrap up some stuff. I will try to get a non advanced version running as well, even tought this doesnt look as fancy ;D

edit 25.02.2014: No, non-advanced version in the future. I am sorry :(/>
Edited on 25 February 2014 - 05:42 AM
mz2212 #14
Posted 09 August 2013 - 02:19 PM
Maybe yes. 1.5.2 version of ftb is out and people are going to get into this pretty soon, so i am going to warp up some stuff. I will try to get a non advanced version running as well, even tought this doesnt look as fancy ;D

Thank you!
natenat3p #15
Posted 15 August 2013 - 11:20 PM
I am getting this error:
startup:28: attempt to index ? (a nil value)
frostthejack #16
Posted 23 September 2013 - 02:06 PM
been looking for a good openperipheral program this looks really good man might have to give it a try
unobtanium #17
Posted 24 September 2013 - 06:42 AM
Thanks! If you have a suggestion let me know :D/>
I might take some time to add the ability to add arguments to the methodes, so that it is even more usable.
mzxs #18
Posted 03 October 2013 - 07:40 PM
ok whats with the startup:28: attempt to index?(a nil value)
it happens very often to me
gicon #19
Posted 14 October 2013 - 03:24 PM
Not sure if the tanks are suppose to be supported yet? But every time I try to use a method on both quantum tanks &amp; iron tanks (haven't tried steel). I get the following error, startup:275: invalid number of parameters. Expected 1(or 4 depending on method used) and have to delete the openPeripheralClient file to use the program again.
VintageGaming #20
Posted 14 October 2013 - 09:09 PM
That is amazing, bro!
Dragon53535 #21
Posted 17 October 2013 - 03:26 PM
Just a little question for me before i dabble in trying to make it work for this purpose, can you have support for multiple pairs of terminal glasses?
unobtanium #22
Posted 17 October 2013 - 05:13 PM
You mean that multiple people can see the same?
I dont know why it shouldnt :)/>

I just started studying but i feel that i am going to return to lua and cc again to wrap up some programs. Give me some time and i will improve it even more.
Dragon53535 #23
Posted 17 October 2013 - 05:30 PM
What i meant was when my friend put $$site2 i got changed on mine to site2
unobtanium #24
Posted 18 October 2013 - 01:06 AM
Yes, that would happen, because all glasses are running with the same computer. You could setup multiple computers with the same configuration and network attacked, so everybody can individualize his/her screen.
theoriginalbit #25
Posted 18 October 2013 - 01:09 AM
Or if you're running Minecraft 1.6.x you can ask the server to upgrade to the latest OpenPeripheral which has support for multiple users.
Dragon53535 #26
Posted 18 October 2013 - 03:34 AM
We're running ftb so probably not, but I'm guessing once we get to that, it can change site differently per glasses?
Expenox #27
Posted 19 October 2013 - 01:48 PM
This is awesome! I've seen few of these before, I might check it out. Keep up the good work!
redwolfite #28
Posted 01 December 2013 - 09:16 AM
Using the program on a 1.5.2 server, coming up with error,

term:407: attempt to index ? (a nil value)

Thanks in Advance,
- Jono [Wolfite]

Also, a suggestion to the program: Make it so you can set it so you can view connected users to the terminal as a option in the terminal glasses GUI.
Thanks
Csstform #29
Posted 03 December 2013 - 11:03 PM
Now it's a another error :(/>/>

startup:398: attempt to call nil

Just add parameters for peripheral sides because I have to edit the program for this ^^

Could you tell me how to fix this? I have the exact same error and this will be extremely useful IMHO.
Mrrraou #30
Posted 04 December 2013 - 09:16 AM
Now it's a another error :(/>/>

startup:398: attempt to call nil

Just add parameters for peripheral sides because I have to edit the program for this ^^

Could you tell me how to fix this? I have the exact same error and this will be extremely useful IMHO.

I'm sorry, I don't remember how I did that ^^'
Csstform #31
Posted 04 December 2013 - 12:55 PM
It's ok, I'll figure it out myself!
unobtanium #32
Posted 05 December 2013 - 03:30 AM
I should get back into making these programs… i feel bad about leaving them half finished, but a lot of players want to use them…
I simply have to add a field to insert parameters for the methodes and save these. The problem is that the user has to know what he is doing which doesnt make this newbie friendly if you know what i mean.
lights0123 #33
Posted 15 December 2013 - 08:55 AM
Hello, I've been trying to get a program to monitor my MFSUs and I came across this. So I downloaded the program, rebooted the computer, and all worked fine, until I went to frame 1 and selected "Select". Then I got, "line 311: attempt to call nil". I went to line 311, and it said,

if net.isPresentRemote(unit) and method ~= "NONE" and net.callRemote(unit,method) <= maxNumber then
So I changed the "net" to peripheral, (the first one) and then I got a boottime error, same thing as before, "line 311: attempt to call nil". Any help would be appreciated.
unobtanium #34
Posted 16 December 2013 - 04:56 PM
I dont know what happend, but i would recommend using wire to connect the mfsu(s) with the computer.
Micheal Pearce #35
Posted 17 December 2013 - 09:31 AM
This looks really cool I'll have to check it out when I get back from school
Reggie #36
Posted 21 February 2014 - 12:07 PM
I am getting an error when I attempt to start the program,

startup:257: attempt to call nil

Any ideas what is causing this, line 257 reads: var1.setZIndex(z)

Thanks in advance.
apoc123 #37
Posted 23 February 2014 - 02:05 AM
He would need to update his program(when and if he gets a chance) :D/> for the new methods in openperipherals

there is no longer a setZindex()
there are a couple of other changes also like addGradientBox()
this will work for openp build#112 and later version have small method changes probly to make easier. just need to change a few lines of code probly lol
unobtanium #38
Posted 23 February 2014 - 09:17 AM
Where can i find all these changes? Because in the original openperipheral post there is setZIndex(z) shown and available.
apoc123 #39
Posted 23 February 2014 - 03:49 PM
The OP is outdated there is no outof game documentation well atleast not by mikee or the team
OP is for like build 112 and before the new version have in game documents
um theres an in game program/file called docs just place a computer then place a openp bridge down next to it then navigate on computer files to cd openp/docs.


or enter lua and type/ docs back -or top right left were ever bridge is will print a list of methods or here is a list of methods on pastebin


http://pastebin.com/b4Fux1PY

there is another new vresion lol since post but ingame docs file will list everything you need just make sure you place down a bridge next to a computer first then look for the docs file

in edition that openp dk will list any method of any compatable machine, block whatever by doing the same thing. if you look in programs on this forum there are several programs last takes the info and tables from ingame documetation and puts then into a readable file alot of info comes as a table here an example program not mine :)/>

http://www.computerc...al-api-browser/



please update your client program its f—-ng awesome :D/> :D/> :D/>

heres another http://pastebin.com/NmU8Wwkj
Edited on 23 February 2014 - 03:03 PM
theoriginalbit #40
Posted 24 February 2014 - 01:49 AM
I still make the suggestion that when updating your program to do so in a manner that is backward compatible…
For example when setting the Z-index you can do the following

var.setZIndex and var.setZIndex(1) or var.setZ(1)
this will mean that in old versions it will set the Z-index using setZIndex however in the new versions it will use setZ
Edited on 24 February 2014 - 12:53 AM
unobtanium #41
Posted 24 February 2014 - 06:46 AM
I thank you both for your answers and suggestions. Time to spend some time with my little program again :P/>
Some old version handling is allways a good and doesnt look too complicated so i will give it a try.

edit: The problem is that i have to change how the save file works, because the parameter will take some space. I will see with what i can come up with :S
Edited on 24 February 2014 - 06:35 AM
unobtanium #42
Posted 24 February 2014 - 08:45 PM
BETA 0.3.0 (12h work)
- improved the writing of variables! Now can be canceled/finished by clicking instead of pressing Enter.
- removed the site and frame selection. It is now at the top of the screen like the objects are.
- changed file saving. Old file saves are getting converted automatically. So no worries by using the new version!
- improved method selection with description, return type and argument amount.
- added arguments selection!! OMG! AMAZING!!! AFTER MONTHS :3
- be happy! new bug: rapidly clicking on buttons may interupt updates for graphs or overall screen updates for your bridge. Added Sync function for that.

Enjoy everybody :)/>
unobtanium #43
Posted 25 February 2014 - 03:57 PM
BETA 0.4.0
- Alarm'n'Action Update: added automatic alarm and manual control over rednet. Call methods, send rednet messages or just show text to remind you. A next level is reached.
- changed picture hoster, because imageshack closes it's free doors…
- improved information in the OP


This is the next step i wanted to do with this client. I hope player will enjoy this feature, because there is a lot of possibilities with it now.
Other then that i consider adding a few more object to select from and then release it. Some finetuning here and there but meh :P/>

edit: I may create a video for this client soon. It's makes everything much simpler if the user saw it how it works and how to use it :)/>
Edited on 25 February 2014 - 08:30 PM
Csstform #44
Posted 26 February 2014 - 06:31 AM
Gone for a few months….then cranking out the updates! Thanks!
unobtanium #45
Posted 26 February 2014 - 09:18 AM
Haha. I never was completely gone! I read every comment available and checked the demand of the programs.
Finally the first wave of exams are over so i can go ahead working on these some more.
No problem :)/> Have fun with it :P/>
apoc123 #46
Posted 27 February 2014 - 12:45 PM
Awsome job just awsome
unobtanium #47
Posted 28 February 2014 - 12:35 AM
Thank you very much :)/>

Short update on version 0.4.0 to 0.4.1. Just a small fix for all pre version 0.3 user for loading their file.
Also removed old version download links. Nobody needs them anymore!
edit: Also edited the "Feature" and Introduction section with better and more presized information.
Edited on 27 February 2014 - 11:52 PM
GrafRotz #48
Posted 28 February 2014 - 09:51 PM
Awesome Job, i really love this!
Unfortunately its not working :(/>
I'm getting the following after some seconds.
"Glass:835: attemt to call nil"
I'm able to klick within the menue, but again, after some seconds, same error!

its the code within "function setZDimension(obj)"

I'm very new, to computercraft an i was able to get temp and steam amount from my boiler to the glasses! *hooray*
All i wanted was a graph like your first screenshot. maybe you can give me a code snippet of it, easily to to give position, actual value….
or just help me to get that thing working :D/>

My setup looks good, Advanced Computer, Modem, cable between them and the Boiler, Bridge to the left, glasses are working…
unobtanium #49
Posted 01 March 2014 - 05:02 PM
Ops, i accually messed up this part as well as the usage of arguments for older versions.
I tested it on FTB Unleashed as well as FTB Monster and both seem to work now.

BETA 0.4.2
- Fixed old version handling.
- Improved non advancedMethodsSupport. Added the possibility to add arguments manually (own risk) so you have to know what you are doing.
- Improved real time drawing. Now allways draws every two seconds even while editing. Therefore added error catches and messages on screen without crashing the program.
- Fixed the case when the program stopped updating. Sync ability now useless and deleted from the main menu, but still available over chat as comment.
GrafRotz #50
Posted 01 March 2014 - 09:27 PM
Awesome!
Works great now.
I have only on more wish for future versions.
For larger distances it would be great to use wireless Modems. Is there any change to implement them?
unobtanium #51
Posted 02 March 2014 - 01:54 AM
I dont think i can revamp the program like that. It is designed for wired networks and it would be a pain to change that.
So i probably wont do that, i am sorry :S

I will go and add more objects and improve the old ones like the progress bar and auto creation of a box around a graph.

New update anyways allready with a lot new bug fixes i forgot about and found.
BETA 0.4.3
- Improved wireless modem wrapping. Now automatically detects it and sends and receives messages over it.
- Added new Alarm'n'Action. "Rednet" lets you receive rednet messages and perform an action.
- Fixed site and frame selection. You were able to go from -99 to +198 sites. You also were able to add a frame into a frame ("frameception") which create a stack overflow pretty fast :P/>
- Added error handling for Alarm'n'Action methods.
- Improved on-screen error message. Now only shows one error message at the time. Fix it before any other is shown.
- Fixed Progress Bar. Threw an error because gradient box handling changed.
Edited on 02 March 2014 - 12:55 AM
unobtanium #52
Posted 03 March 2014 - 07:13 PM
New Update is out. BETA 0.4.4

The next update is going to be a database revamp. This means all previous created objects are going to be remade again.
I misslike this idea but i give me the opportunity to make the screen updating less frequently and more efficently.
I may add a little program which can convert the old databank to the new one like i did in previous versions, but dont quote me on that yet.
unobtanium #53
Posted 06 March 2014 - 04:14 PM
It's done. It looks like nothing happend for you (unless bugs appear :(/> ), but the whole data base received an upgrade.
Everything works the same as before, just here and there some improvements come with it.

Like i more or less promised, i added an automatic converter from all the old databank versions to the new one.
The system now allows for a better handling of the huge array as well as a good start for future internal improvements.

If you would like to see something in this client, let me know about it.
And if your program crashed, let me know about it as well and i will see how to fix it :)/>

BETA 0.5.0
- Revamped the whole data system. It is now much more coder friendly and lets me adjust everything much faster.
- Added update interval. From a range of 0.5 to 16 seconds you can update your peripherals and screen. Use slower update rates on server!
- Improved the on screen writing and drawing. Flickering is gone (or at least rare). Errors are better visual and readable. Objects are put in a better order on the screen: Text in the front, Box in the back, Everything else in between.
- Improved save file. Old versions should be converted automatically into the new database. Now also saves the updateInterval and selected Site.
- bug: In the Alarm'N'Action menu the on screen updates are just happening if you are writing. Didn't found the fix yet.
Edited on 06 March 2014 - 03:15 PM
theoriginalbit #54
Posted 06 March 2014 - 11:40 PM
I added an automatic converter from all the old databank versions to the new one.
I'm assuming you store program version in the 'databank' so you know if it needs to be updated or not? or does the program go through and perform the convert each time it boots?
unobtanium #55
Posted 07 March 2014 - 12:12 AM
Yes, i let the program store the version of the databank structure in the save file. It's just an once a lifetime update :)/>
Edited on 06 March 2014 - 11:12 PM
Reggie #56
Posted 09 March 2014 - 04:02 PM
Whenever I attempt to select a method, they all appear as nil but with the correct description.
Anything i'm doing wrong?
Edited on 09 March 2014 - 03:02 PM
unobtanium #57
Posted 09 March 2014 - 07:22 PM
That's strange. Does the program excute the methods correctly/does it get displayed on screen?
I checked and it works fine for me.
Which version of FTB are you using (if you are playing ftb) and which unit/peripheral did you selected?
Edited on 10 March 2014 - 02:18 AM
Reggie #58
Posted 18 March 2014 - 06:20 PM
I am using open peripherals version 0.3.2 and addons version 0.1.2. I have tried any peripheral from a wide range of mads and they all show nil.
unobtanium #59
Posted 18 March 2014 - 11:46 PM
That is weird. Cant reproduce the issue :(/>
Does someone else have the same problem Reggie descripes?
Edited on 18 March 2014 - 10:54 PM
theoriginalbit #60
Posted 19 March 2014 - 12:01 AM
I am using open peripherals version 0.3.2 and addons version 0.1.2. I have tried any peripheral from a wide range of mads and they all show nil.
Are the mods supported by OpenPeripheral? Are they beside the computer? are they on a network, and are the modems turn on? When you turn on the modem does chat say the name of the peripheral turned on?
Xaviens #61
Posted 19 March 2014 - 01:10 PM
That is weird. Cant reproduce the issue :(/>
Does someone else have the same problem Reggie descripes?
Yeah, having the same problem, OpenPeripheral 0.3.1, and Addons 0.1.1, when I attempt to push it through anyways, the program errors at line 1056, 356, or 690: attempt to concatenate string/number and nil. This is happening with all mod items attempted, including openblocks tanks, Thermal Expansion energy cells, Applied Energistics' ME Controller, I even exactly replicated what's shown in your image on the original post. I've tried just about everything I can think of, no luck.
unobtanium #62
Posted 20 March 2014 - 02:29 AM
Yeah all those errors are related to the method being not found and nil :S
Did something change in the newest version again?
Xaviens #63
Posted 20 March 2014 - 03:30 PM
Yeah all those errors are related to the method being not found and nil :S
Did something change in the newest version again?
To be more clear, the program shows the description/functionality of each method, but between the selection arrows, displays "nil". You can switch between the available methods freely, but selection results in the error. I haven't looked into how the API has changed, perhaps name retrieval was modified? I'll look into it.
unobtanium #64
Posted 22 March 2014 - 02:39 AM
Allright, i may found the mistake. Not sure thought, so i would recommand testing it out and if it works i release 0.5.1 so everybody can get the new working version :)/>
Zeoic #65
Posted 23 March 2014 - 07:02 PM
Allright, i may found the mistake. Not sure thought, so i would recommand testing it out and if it works i release 0.5.1 so everybody can get the new working version :)/>

When is going to be released? Im trying it out on FTB monster and like mentioned above it will not work with other energy storage devices.
unobtanium #66
Posted 24 March 2014 - 08:19 AM
It should be downloadable allready :S If you downloaded the "new version" from the 22 March and it doesnt work then it probably wasnt the fix :(/>
blunty666 #67
Posted 24 March 2014 - 09:13 AM
I think I've managed to find the problem with the method name returning as nil. On lines 858 - 860 when you try to get the advanced methods data, you are trying to wrap the unit as a directly connected peripheral, instead of as a "net" peripheral. Using net.getTypeRemote(unit) and net.callRemote(unit, "getAdvancedMethodsData") seemed to work for me.

Spoiler

-- advanced or normal support?
  local advancedMethodsSupport = false
  local unitType = "NONE"
  local tempList = {}
  for k,v in pairs(basicMethods) do
    if v == "getAdvancedMethodsData" then
	  advancedMethodsSupport = true
	  unitType = net.getTypeRemote(unit)
	  tempList = net.callRemote(unit, "getAdvancedMethodsData")
	  break
    end
  end

Also, on 871 when you insert the desired methods table "v" into the list table, the table "v" does not have a "name" index. Instead, "v" is indexed by its name in the table returned by getAdvancedMethodsData. I'm not sure I explained that too well so take a look at the code below.

Spoiler

-- get advanced methods if possible
  local list = {}
  if advancedMethodsSupport then
    local counter = 1
    for k,v in pairs(tempList) do
	  if allReturnTypes or ( v["returnType"] ~= nil and v["returnType"] ) or ( v["returnTypes"][1] == "NUMBER" ) then
local tempT = v --same as v
v.name = k	  --adds name to v which is the index k in tempList
	    table.insert(list, 1, tempT)
	    counter = counter - 1
	  end
	  counter = counter + 1
    end
  else
    list = net.getMethodsRemote(unit)
  end

Everything seems to work fine after that, hope this helps!
unobtanium #68
Posted 25 March 2014 - 03:02 AM
Wow thank you very much :D/> I replaced the code parts with yours.
I am sorry for all who are waiting for this program to work again, but my exams had higher priority.

I am wondering now, because i am sure that the "v" table had the "name" included. I remember that it was strange to have it exists as a variable in the table and as index as well.
I need to check this later but for now i use your code, which should work even if "name" exists allready in "v".

So i thank you once again :)/>

BETA 0.5.1
- fixed methods selection which made the whole program useless. (thanks to blunty666 for the fix)
blunty666 #69
Posted 25 March 2014 - 08:05 AM
No problem, I'm glad to be able to help. Seems like an easy mistake to make, especially when even the mod authors have confessed to not knowing how their mod works!! :D/>
Doom6197 #70
Posted 25 March 2014 - 09:53 AM
Good to hear its working again :D/>
unobtanium #71
Posted 26 March 2014 - 06:51 PM
Yop, i am happy to have it working again as well.

@blunty666: What do you mean with not knowing their own mod? That might be the case because the original creator has stopped working on it and other are keeping up the support.
Edited on 28 March 2014 - 04:13 PM
Mikeemoo #72
Posted 26 March 2014 - 07:05 PM
No problem, I'm glad to be able to help. Seems like an easy mistake to make, especially when even the mod authors have confessed to not knowing how their mod works!! :D/>
Yop, i am happy to have ti working again as well.

@blunty666: What do you mean with not knowing their own mod? That might be the case because the original creator has stopped working on it and other are keeping up the support.

I wish people would stop repeating that I've stopped working on OpenPeripheral. Where it's needed I contribute, just like anyone else in the team. My focus has been on other mods, but that doesn't mean I'm no longer working on OpenPeripheral.
Edited on 26 March 2014 - 06:46 PM
unobtanium #73
Posted 26 March 2014 - 07:11 PM
ok :3
blunty666 #74
Posted 26 March 2014 - 09:47 PM
I'm sorry if I have upset you, there was absolutely no malice intended in my comment, only a very poor sense of humour :(/> As you can see I'm new here and the last thing I want to do is stir up trouble.

OpenPeripheral is one of my favourite mods at the moment and I plan to continue using it, I might even get round to posting a glasses program I've been working on eventually… spoiler: animating objects in real-time!
cojay24 #75
Posted 27 April 2014 - 09:37 AM
Hello i love this mod and the terminal glasses however im new to the coding and all that and wanted to monitor the power of a batbox and used the code on here where i can customise it all myself but when its charged it does this help me please


unobtanium #76
Posted 28 April 2014 - 04:47 PM
I cant see the picture. Use e.g. imgur or an other picture hosting website.
ShadowGar #77
Posted 07 May 2014 - 10:24 AM
I'm currently using CC1.63 with Openperipheral snap shots for 1.6 and I'm getting an odd error with your script. So instead of explaining it, I took a video of it.


https://www.youtube.com/watch?v=tP6paL8qRIE
unobtanium #78
Posted 10 May 2014 - 03:51 AM
It is the new CC update. A lot broke and i am not ready to update all my programs right now. Maybe soon™
Edited on 10 May 2014 - 01:52 AM
adamjan2000 #79
Posted 29 January 2015 - 12:10 PM
When I want send message through rednet (Alarm) I can't change message! Why?
unobtanium #80
Posted 09 June 2015 - 10:17 PM
Updated the program to the newest version. (Tested in FTB Infinity)

Fixed adamjan2000's bug of not being able to edit the Rednet message.