Nexarius 18 Posted February 5, 2017 Share Posted February 5, 2017 This program can display the contents of tanks on a big screen with a colored bar that can dynamically change its size. It can show up to 256 128 64 different liquids which are sorted from highest amount to lowest. 5x8 is the optimal size for the screen. Multiple tanks with the same liquids are automatically added together and empty tanks are ignored. This display is split into 2 programs. 1) Server - this receives the tank information and displays it 2) Client - this has the adapter with the tank controller (you can have as many as you like) optimal screen sizes: 8x5; 8x2; 4x1 pastebin run -f cyF0yhXZ installation guide: https://www.youtube.com/watch?v=avvYO2xSxGw github: https://github.com/Nex4rius/Nex4rius-Programme/tree/master/Tank#start server / display components: Internet Card (to install) Network Card Graphics Card T3 Screen T3 client / adapter + tank components: Internet Card (to install) (Wireless-) Network Card It supports now the following blocks: Adapter + Tank Controller Upgrade Transposer Batbox CESU MFE MFSU Gregtech Batterybuffer Capacitor Bank ALL RF storage blocks ME Interface ME Controller Warded Jar Void Jar Big Update version 2 The screen scales better to utilize the "room" to the fullest. Thaumcraft: I've added support for jars and essentia (Thaumcraft 6 needs the Thaumic Computers mod) ExtraCells: It's now possible to connect this to the ME System and read all liquids from it. Thaumic Energistics: Additionally it can read essentia from the system if you have Thaumic Energistics installed. Energy EU: You can connect EU storage devices and it will show it on the screen. Energy RF: Furthermore you can also connect any RF storage block and it will work too. The version 2 is not compatible with the version 1. You will have to update the server and all clients. I've double the limit from 64 to 128 and doubled it again to 256! xilni, BrisingrAerowing, Log and 2 others 5 Quote Link to post Share on other sites
BrisingrAerowing 12 Posted February 8, 2017 Share Posted February 8, 2017 Cool. Quote Link to post Share on other sites
Nexarius 18 Posted February 18, 2017 Author Share Posted February 18, 2017 Update to 1.4 - increase max amount of liquids from 32 to 64 - dynamically change width of the bars - decrease update frequency with low tps (this thing) - added colors for lots of new liquids (especially gregtech liquids) I changed the picture from my first post to a gif thats cycling through 8 pictures so you can better see how it works. Quote Link to post Share on other sites
DonArmadillo 0 Posted May 31, 2017 Share Posted May 31, 2017 Hello, Since transposers are cheaper than adapters with tank controllers in the pack I am using I've went into the client program files and edited the for loop to look for "transposer". The program works perfectly however I am seeing 5x the amount of liquid and max liquid on the server screen. Is there a fix? Thank you! EDIT I've found the reason. It was due to ender IO ender fluid pipes connected to all the tanks which were adjacent to some of the transposers. The ender fluid pipes seem to be perceived by each transposer as a collections of all the tanks they are connected to. This is actually practical, using this one only needs one (computer/client/transposer/adapter) for an unlimited amount of tanks ^^ Quote Link to post Share on other sites
Nexarius 18 Posted June 1, 2017 Author Share Posted June 1, 2017 I didn't even know transposers existed because I stopped searching once I found the adapter + tank controller. I've changed it now to work with transposers and adapters at the same time. The enderio ender fluid conduit trick is pretty neat. Quote Link to post Share on other sites
xilni 1 Posted June 15, 2017 Share Posted June 15, 2017 I would love to implement your GUI for my StockMonitor program (https://github.com/xilni/StockMonitor/tree/feature/gui for the branch I'm working on at the moment). At the moment I have a very rudimentary text only table GUI with minor color usage. It tracks not only items and fluids in your ME network but also allows you to toggle signals to turn production and/or gathering (I use bundled cables from ProjectRed and RFTools redstone transmitters/receivers to send the signals around. What I have in mind is instead of each bar being: Current amount / Tank Capacity it would be: Current amount / Lower threshold amount / Upper threshold amount Now where I would appreciate your advice/help is the following areas: My design would have three sections per bar instead of two. The reasons for this are important in the pack on my server (Revolution3) as it is based around Rotarycraft where power is not quite as granular as an RF based pack. With the way Rotarycraft power is on or off and not in between it saves me a lot of power to have the system work with a lower threshold and upper threshold and do work in large batches instead of constantly turning on and off as it straddles on a single threshold because I used a trickle of an item. I would obviously pull data from the ME system instead of individual computers which I have no problems doing (the existing version of StockMonitor does this well) but I'm having problem because of problem 3. While Lua is Lua, your variables are all in German I assume which has made it very hard for me to decipher which functions do what inside your repository. Please let me know if you need any clarifications (I can try to make mockups if need be) or if any of these are areas you can assist me in, or even if you have random feedback on my program. Quote Link to post Share on other sites
Nexarius 18 Posted June 16, 2017 Author Share Posted June 16, 2017 I guess you could start from L135 anzeigen(tankneu). tankneu is all the information about all liquids already added together and anzeigen is looping through the table and decides the position on the display and on L177-L185 it is giving it to zeigeHier([...stuff...]) label (visible liquid name), name (hidden liquid name, this will be used to check with the color table), menge (amount), maxmenge (max amount), prozent (percent, this is calculated and not in tankneu). zeigeHier combines the variables into the message for the screen, changes the color and then writes to the screen. You could probably start by making a table like this for anzeigen(tankneu) tankneu = { {name="water", label="water", menge=1000, maxmenge=2000, somethingnewhere=500}, {name="lava", label="lava", menge=4000, maxmenge=5000, somethingnewhere=1000}, } After that add somethingnewhere to L185 into zeigeHier and then change zeigeHier in L205 to include somethingnewhere and then change the table.inserts to have it too. There are two different messages shown if breite==40 (It means width==40) because there isn't enough space left and I decided to not show max amouint anymore on a width of 40 otherwise its too big and doesn't fit. You will have to add anything new to farben.lua to get the colors. https://github.com/Nex4rius/Nex4rius-Programme/blob/master/Tank/server/tank/farben.lua xilni 1 Quote Link to post Share on other sites
xilni 1 Posted June 16, 2017 Share Posted June 16, 2017 Thank you for the help, so first thing I've done is attempted to translate the variable, method and parameter names in anzeige.lua to english passing each word I didn't understand through Google Translate. The result is here: https://pastebin.com/x7E2ySm1 16 hours ago, Nexarius said: You could probably start by making a table like this for anzeigen(tankneu) tankneu = { {name="water", label="water", menge=1000, maxmenge=2000, somethingnewhere=500}, {name="lava", label="lava", menge=4000, maxmenge=5000, somethingnewhere=1000}, } I appreciate you helping me decipher the data structure, I was having problems figure out what dazu and hier did in the multiple assignment on line 42 and whether they were important given I'm replacing the entire networking section that uses event.pull. 16 hours ago, Nexarius said: After that add somethingnewhere to L185 into zeigeHier and then change zeigeHier in L205 to include somethingnewhere and then change the table.inserts to have it too. There are two different messages shown if breite==40 (It means width==40) because there isn't enough space left and I decided to not show max amouint anymore on a width of 40 otherwise its too big and doesn't fit. I see what you mean, there's a shorter message for when the board starts to get crowded. I'm more concerned with how one would even represent three values on a bar given that the actual amount has to surpass the upper threshold before the system shuts down production (see the logic here for how it decides when to turn on and off the production). It's not as simple as current amount over capacity where 0 ≤ amount ≤ capacity which makes sense in the context of a bar. EDIT: Does this forum have an inline code block formatting? Sometimes I don't want to create a large paragraph block for a few random code words. Nexarius 1 Quote Link to post Share on other sites
Nexarius 18 Posted June 17, 2017 Author Share Posted June 17, 2017 The translation looks pretty good. hier: is easy it checks whether or not the event.pull() reached the timeout or got a message. On timeout it skips everything and displays a message that there is no available data to display. dazu: It first checks if the id is already known and then replaces all the information with the new message and then sets dazu = false to prevent adding it at L56. (If you get the second message from the same computer you have to deal with the fact that you still have the first message and it has to be overwritten or deleted.) If you get infromation only from the me system then you don't need update() at all. You only need if component.isAvailabe("MeSomething") then dostuff() else nodata() end I don't think that amount > capacity would be a big problem. It will just display percent > 100% and the bar will be filled completly. 6 hours ago, xilni said: EDIT: Does this forum have an inline code block formatting? Sometimes I don't want to create a large paragraph block for a few random code words. idk xilni 1 Quote Link to post Share on other sites
xilni 1 Posted June 17, 2017 Share Posted June 17, 2017 12 hours ago, Nexarius said: I don't think that amount > capacity would be a big problem. It will just display percent > 100% and the bar will be filled completly. I think you've solved my whole crisis of what to do. So you're suggesting I use the lower threshold as the "capacity" in this case so that anything >= lower threshold is "full" bar. Since the upper threshold is merely a value I use to prevent the system from constantly toggling on and off so I don't care if it's not displayed but I do need to find a place to display whether the system for that particular item/fluid is on or off. It can work off adding a boolean "running" value to the tank data structure or something of the likes but I do want to be able to view it on the GUI at a glance. Any UI suggestions on this point? Quote Link to post Share on other sites
Nexarius 18 Posted June 19, 2017 Author Share Posted June 19, 2017 On 17.6.2017 at 7:30 PM, xilni said: I think you've solved my whole crisis of what to do. So you're suggesting I use the lower threshold as the "capacity" in this case so that anything >= lower threshold is "full" bar. Since the upper threshold is merely a value I use to prevent the system from constantly toggling on and off so I don't care if it's not displayed but I do need to find a place to display whether the system for that particular item/fluid is on or off. It can work off adding a boolean "running" value to the tank data structure or something of the likes but I do want to be able to view it on the GUI at a glance. Any UI suggestions on this point? I thought more about the upper threshold as capacity otherwise all bars will be at 100% all the time because its always producing to keep everything above 100%. You could do something pretty simple and just change the label to have something like "Water (On)" and give that to anzeigen(tankneu) (btw color works over name not label). Quote Link to post Share on other sites
Ranub1s 0 Posted August 8, 2017 Share Posted August 8, 2017 Hello .. Nice program but got a little bug with the client. it shows only 1% of full storage even if the drum/tank is full. on the server its shown correctly. and got a question. possible to setup the server with higher resultion? if you only use a small 1x3 Monitor its kinda hard to read the content if you have only a few liquids. Quote Link to post Share on other sites
Nexarius 18 Posted August 8, 2017 Author Share Posted August 8, 2017 3 hours ago, Ranub1s said: Hello .. Nice program but got a little bug with the client. it shows only 1% of full storage even if the drum/tank is full. on the server its shown correctly. and got a question. possible to setup the server with higher resultion? if you only use a small 1x3 Monitor its kinda hard to read the content if you have only a few liquids. Thanks I only really concentrated on the display of the server and never noticed that on the client because I only used it as debug view to see the names of the fluids. The percent calculation was switched up. It was capacity / amount not amount / capacity. I've optimised it for a big screen 8x5 http://i.imgur.com/E4N2qat.png The resolution is already on maximum the screens cannot give more. But do you mean something like this? Quote Link to post Share on other sites
Ranub1s 0 Posted August 9, 2017 Share Posted August 9, 2017 21 hours ago, Nexarius said: Thanks I only really concentrated on the display of the server and never noticed that on the client because I only used it as debug view to see the names of the fluids. The percent calculation was switched up. It was capacity / amount not amount / capacity. I've optimised it for a big screen 8x5 http://i.imgur.com/E4N2qat.png The resolution is already on maximum the screens cannot give more. But do you mean something like this? Yes, and i have figured out that "server-side" print message of the liquids can only be done on 1 Monitor. So next question would be, is it possible to broadcast it to more seperated monitors in a Network thats seperated from the incomming message of the client. (example on screen) *dont want to botch your programm :D* Quote Link to post Share on other sites
Ranub1s 0 Posted August 9, 2017 Share Posted August 9, 2017 And maybe add an optione while installing the client of the "wireless network-card" the signal-strength. Quote Link to post Share on other sites
Nexarius 18 Posted August 9, 2017 Author Share Posted August 9, 2017 Update to 1.8 -added support for multiple sceens (but sadly it will flicker when the gpu is switching to the next screen; anyone got ideas for that?) -added support for more screen sizes (optimal is 8x5; 4x1; 8x2) -added client will ask for wireless range on startup (default 400) __________________________________________________________________________________________________ You have 3 liquids on the screen that are unknown to my program and thats the reason why they are all grey. If you want colors you can help me here and I will add them to this program. This will be helpful for that. And those are all colors. I have never tested it but there shouldn't be anything in the code that prevents you from making 2 servers with a screen each that will get the information from the clients. edit: Update 1.8.1 -fixed flckering with multiple screens Quote Link to post Share on other sites
Ranub1s 0 Posted August 11, 2017 Share Posted August 11, 2017 Great Work !! and so quick thanks. sadly i found a strange bug in spreading informations over more monitors, a few gets only strange informations. (half of text and wrong colors) (NVM- the bug happens if you work with a Power-Distributor and a Relay) and the wireless broadcast (with a setting of 2000range) cant reach a server (chunkloaded) which is further away (arround 500blocks) Ah, and the liquids you see here are from "tinkers" so maybe thats why they are unknown to your program. (just took them as test) Quote Link to post Share on other sites
Ranub1s 0 Posted August 11, 2017 Share Posted August 11, 2017 and next point i have figured out. the programs run smoothly but wont be saved on the mc-server. or the autorun.lua is bugged. after restart of the pc the program is gone/not working until you reinstall it Quote Link to post Share on other sites
Nexarius 18 Posted August 11, 2017 Author Share Posted August 11, 2017 22 hours ago, Ranub1s said: Great Work !! and so quick thanks. sadly i found a strange bug in spreading informations over more monitors, a few gets only strange informations. (half of text and wrong colors) (NVM- the bug happens if you work with a Power-Distributor and a Relay) and the wireless broadcast (with a setting of 2000range) cant reach a server (chunkloaded) which is further away (arround 500blocks) Ah, and the liquids you see here are from "tinkers" so maybe thats why they are unknown to your program. (just took them as test) 20 hours ago, Ranub1s said: and next point i have figured out. the programs run smoothly but wont be saved on the mc-server. or the autorun.lua is bugged. after restart of the pc the program is gone/not working until you reinstall it The wireless range is limited in the opencomputers config too. I've been playing almost exclusivly on modpacks with gregtech and there are almost none with tinkers construct so I didn't have any chance to add them.I tested my program by repeatedly pressing the turn on / off button and it always booted into my program. Can you write "edit /autorun.lua" and check whats in that file? Furthermore what is your OpenOS version? I'm running on 1.6.7. You can run this program of mine "pastebin run -f icKy25PF" to update OpenOS. I have no idea how that white display happend. Maybe someone has some ideas why it was happening? Quote Link to post Share on other sites
Ranub1s 0 Posted August 12, 2017 Share Posted August 12, 2017 Currently we are using OpenComputers-MC1.7.10-1.6.2.12-universal. and as i already wrote: " (NVM- the bug happens if you work with a Power-Distributor and a Relay) " in Single player the files are working fine, even if you reboot the pc or turn it on/off .. but strangly not on our mod-pack server. maybe with latest version a bug appeared .. the autorun.lua looks legit... but after restart the pc automaticly goes to directionary /home # Quote Link to post Share on other sites
Nexarius 18 Posted August 12, 2017 Author Share Posted August 12, 2017 The autorun.lua looks to be ok. Normally any error that occurs will be printed to the screen but its hidden for autorun. I looks to me like an error occured and then it just goes on as usuall as if nothing happend. If you launch the program again then it should print any errors to the screen. Can you do that? Just write "tank", "/autorun.lua" or "/tank/anzeige.lua" I have a relay and a power distributor connected in my test world and I'm not seeing any changes. Update: 1.8.3 -added autorun will write any errors messages now Quote Link to post Share on other sites
Ranub1s 0 Posted August 12, 2017 Share Posted August 12, 2017 hmmm .. have reinstalled the program as client ,... same issue after reboot/ on/off. no error .. nothing ... just beeing in diractionary /home ah... may i mention that this happens mainly to only the client. Quote Link to post Share on other sites
Ranub1s 0 Posted August 12, 2017 Share Posted August 12, 2017 maybe he doesnt start through cuz the client doesnt save the "range-settings" and abborting the autorun.lua .. cant tell for sure since no error appears Quote Link to post Share on other sites
Nexarius 18 Posted August 12, 2017 Author Share Posted August 12, 2017 I think its fixed now. Quote Link to post Share on other sites
Ranub1s 0 Posted August 13, 2017 Share Posted August 13, 2017 11 hours ago, Nexarius said: I think its fixed now. Very nice Thank ya very much What was the issue? Quote Link to post Share on other sites