Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add current time... #9

Open
SCarns opened this issue Jun 25, 2021 · 5 comments
Open

Add current time... #9

SCarns opened this issue Jun 25, 2021 · 5 comments

Comments

@SCarns
Copy link

SCarns commented Jun 25, 2021

Looking over this and it seems to make sense to update the unit's time and date when writing out the settings data.

@SCarns
Copy link
Author

SCarns commented Jun 25, 2021

I'm looking to add a 3rd flow in "Settings" to run once a day to send current time & date to the controller. I chose to do a "3rd" input, as I'll set it to repeat daily at 12:00, as I'm also running a time server on a raspberry pi that is updated via GPS. Could be every week, whatever, but I want to automate it, so it does update on it's own, so a separate instance seems appropriate.

To make this work, I need to figure out how to get date/time into a format Modbus can receive. The rest should be easy, as I can just copy the row "2" above to write values for [9013, 9014, 9015];

I added a third "Read Values" to get the current time in "1", but I'm at a loss as to how to proceed from here.

@SCarns
Copy link
Author

SCarns commented Jun 25, 2021

I'm stuck here:

@SCarns
Copy link
Author

SCarns commented Jun 25, 2021

[{"id":"6e05060.f1027fc","type":"tab","label":"Commander Settings","disabled":false,"info":""},{"id":"f9ae754c.577d5","type":"modbus-flex-getter","z":"6e05060.f1027fc","name":"Modbus Get","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"c082a42f.1ec8e","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":210,"y":120,"wires":[["7895ffde.47f8f8"],["304fc50f.822082"]]},{"id":"519b5a30.ab867c","type":"function","z":"6e05060.f1027fc","name":"FC3 0x9000 [15]","func":"msg.payload = { \n 'fc': 3, \n 'unitid': 1, \n 'address': 0x9000, \n 'quantity': 15\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":140,"y":180,"wires":[["f9ae754c.577d5"]]},{"id":"304fc50f.822082","type":"modbus-response","z":"6e05060.f1027fc","name":"0x9000 Response","registerShowMax":20,"x":350,"y":20,"wires":[]},{"id":"2a2ec45f.49aa04","type":"switch","z":"6e05060.f1027fc","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"11","vt":"str"},{"t":"eq","v":"12","vt":"str"},{"t":"eq","v":"13","vt":"str"},{"t":"eq","v":"14","vt":"str"}],"checkall":"false","repair":false,"outputs":15,"x":350,"y":280,"wires":[["3eb2f325.078bb4"],["8080685f.2ebbb8"],["f3c2d559.c1ba4"],["c0a9a722.12e4a"],["b01fc8f9.79b7c8"],["ae1677c1.2051c"],["5fb74957.5d3738"],["3b619bd9.e0fe4c"],["759737ef.49f3b8"],["9b1be14f.ce0d98"],["75c32c8d.868d74"],["ca8fb86e.e36b2"],["f8b26a58.bec238"],["7cc59176.8db3d"],["5ea833e8.7b3cac"]]},{"id":"c0a9a722.12e4a","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":260,"wires":[["2a03600b.24ca48"]]},{"id":"7895ffde.47f8f8","type":"split","z":"6e05060.f1027fc","name":"","splt":"\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":230,"y":280,"wires":[["2a2ec45f.49aa04"]]},{"id":"2a03600b.24ca48","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"High Voltage Disconnect","tooltip":"","group":"6940fb1e.3ea9f4","order":4,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":710,"y":260,"wires":[["5a7c9ceb.b0cff4"]]},{"id":"b01fc8f9.79b7c8","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":320,"wires":[["1e1ca9ef.bc6136"]]},{"id":"1e1ca9ef.bc6136","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Charging Limit","tooltip":"","group":"6940fb1e.3ea9f4","order":5,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":680,"y":320,"wires":[["1ed3292d.359f4f"]]},{"id":"ae1677c1.2051c","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":380,"wires":[["5638ccf5.2f9434"]]},{"id":"5638ccf5.2f9434","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Over Voltage Reconnect ","tooltip":"","group":"6940fb1e.3ea9f4","order":6,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":710,"y":380,"wires":[["a49b57c2.da7248"]]},{"id":"86f6460e.e872e","type":"ui_button","z":"6e05060.f1027fc","name":"","group":"6940fb1e.3ea9f4","order":1,"width":0,"height":0,"passthru":true,"label":"Read Values","tooltip":"Click to read currently set values.","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"num","topic":"","x":150,"y":540,"wires":[["519b5a30.ab867c","8c2f0620.78ea08","fdd4e8c9.9ad558"]]},{"id":"bb027f4b.90d2d","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Equalization","tooltip":"","group":"6940fb1e.3ea9f4","order":7,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":670,"y":440,"wires":[["e2272154.a04dc"]]},{"id":"3b619bd9.e0fe4c","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":500,"wires":[["a4cc09bb.84289"]]},{"id":"a4cc09bb.84289","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Boost","tooltip":"","group":"6940fb1e.3ea9f4","order":8,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":650,"y":500,"wires":[["6378392a.1e46d8"]]},{"id":"759737ef.49f3b8","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":560,"wires":[["18f4f8cb.894617"]]},{"id":"18f4f8cb.894617","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Float","tooltip":"","group":"6940fb1e.3ea9f4","order":9,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":650,"y":560,"wires":[["7beed0a8.b4a768"]]},{"id":"9b1be14f.ce0d98","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":620,"wires":[["4972e5ca.69742c"]]},{"id":"4972e5ca.69742c","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Boost Reconnect","tooltip":"","group":"6940fb1e.3ea9f4","order":10,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":690,"y":620,"wires":[["a9bfaa0b.dd9348"]]},{"id":"75c32c8d.868d74","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":680,"wires":[["87b7a6a.e8e10d8"]]},{"id":"87b7a6a.e8e10d8","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Low Voltage Reconnect","tooltip":"","group":"6940fb1e.3ea9f4","order":11,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":710,"y":680,"wires":[["57a3b4aa.3093d4"]]},{"id":"ca8fb86e.e36b2","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":740,"wires":[["4452abf8.8e3e74"]]},{"id":"4452abf8.8e3e74","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Under Voltage Recover","tooltip":"","group":"6940fb1e.3ea9f4","order":12,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":710,"y":740,"wires":[["51c0643d.a1b61c"]]},{"id":"f8b26a58.bec238","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":800,"wires":[["5c22f397.b636fc"]]},{"id":"5c22f397.b636fc","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Under Voltage Warning","tooltip":"","group":"6940fb1e.3ea9f4","order":13,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":710,"y":800,"wires":[["8d253816.b274a8"]]},{"id":"7cc59176.8db3d","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":860,"wires":[["74c9c309.943594"]]},{"id":"74c9c309.943594","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Low Voltage Disconnect","tooltip":"","group":"6940fb1e.3ea9f4","order":14,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":710,"y":860,"wires":[["12593070.bab62"]]},{"id":"5ea833e8.7b3cac","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":920,"wires":[["bc6192aa.ad13"]]},{"id":"bc6192aa.ad13","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Discharge Limit","tooltip":"","group":"6940fb1e.3ea9f4","order":15,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} V","min":"9","max":"17","step":"0.1","x":680,"y":920,"wires":[["98e41e46.8f702"]]},{"id":"5a7c9ceb.b0cff4","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":260,"wires":[["f867836d.c78fd"]]},{"id":"1ed3292d.359f4f","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":320,"wires":[["efd64b5c.f026b"]]},{"id":"a49b57c2.da7248","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":380,"wires":[["cca9cfff.21a4c"]]},{"id":"6378392a.1e46d8","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":500,"wires":[["3e575334.1346ac"]]},{"id":"7beed0a8.b4a768","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":560,"wires":[["55f6061c.cfe788"]]},{"id":"a9bfaa0b.dd9348","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":620,"wires":[["7dce44d9.ce1c4c"]]},{"id":"57a3b4aa.3093d4","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":680,"wires":[["30b5ef25.0d98d"]]},{"id":"51c0643d.a1b61c","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":740,"wires":[["68d31d65.fe179c"]]},{"id":"8d253816.b274a8","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":800,"wires":[["5a86dd00.dc2b4c"]]},{"id":"12593070.bab62","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":860,"wires":[["6045ec8d.56c5fc"]]},{"id":"98e41e46.8f702","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":920,"wires":[["32c4e761.26565"]]},{"id":"3eb2f325.078bb4","type":"ui_dropdown","z":"6e05060.f1027fc","name":"","label":"Battery Type","tooltip":"Sealed, Gel and flooded have standard profiles which you can see by clicking Read Values. To change these values, set this option to User.","place":"","group":"6940fb1e.3ea9f4","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"User","value":0,"type":"num"},{"label":"Sealed","value":1,"type":"num"},{"label":"Gel","value":2,"type":"num"},{"label":"Flooded","value":3,"type":"num"}],"payload":"","topic":"","topicType":"str","x":670,"y":80,"wires":[["86051216.a2775"]]},{"id":"8080685f.2ebbb8","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Battery Capacity","tooltip":"Battery Capacity in amp hours","group":"6940fb1e.3ea9f4","order":3,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} Ah","min":0,"max":"1000","step":1,"x":690,"y":140,"wires":[["c590784c.6e053"]]},{"id":"29fa5b9e.382874","type":"change","z":"6e05060.f1027fc","name":"Set flow.9000","rules":[{"t":"set","p":"9000","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":80,"wires":[[]]},{"id":"1e71388d.c189a7","type":"ui_button","z":"6e05060.f1027fc","name":"","group":"6940fb1e.3ea9f4","order":18,"width":0,"height":0,"passthru":true,"label":"Write Values","tooltip":"As long as all the options are valid, your settings will be saved in the charge controller","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":250,"y":1280,"wires":[["42dede4d.0a45d","9eeecd8.17b343"]]},{"id":"c590784c.6e053","type":"change","z":"6e05060.f1027fc","name":"Set flow.9001","rules":[{"t":"set","p":"9001","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":140,"wires":[[]]},{"id":"42dede4d.0a45d","type":"function","z":"6e05060.f1027fc","name":"Build Array 0x9000 [15]","func":"var EP9000=flow.get('9000') || 0;\nvar EP9001=flow.get('9001') || 0;\nvar EP9002=flow.get('9002') || 0;\nvar EP9003=flow.get('9003') || 0;\nvar EP9004=flow.get('9004') || 0;\nvar EP9005=flow.get('9005') || 0;\nvar EP9006=flow.get('9006') || 0;\nvar EP9007=flow.get('9007') || 0;\nvar EP9008=flow.get('9008') || 0;\nvar EP9009=flow.get('9009') || 0;\nvar EP900A=flow.get('900A') || 0;\nvar EP900B=flow.get('900B') || 0;\nvar EP900C=flow.get('900C') || 0;\nvar EP900D=flow.get('900D') || 0;\nvar EP900E=flow.get('900E') || 0;\n\nvar list = [ EP9000, EP9001, EP9002, EP9003, EP9004, EP9005, EP9006, EP9007, EP9008, EP9009, EP900A, EP900B, EP900C, EP900D, EP900E];\nvar msg1 = {payload:list};\n\nreturn msg1","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":1280,"wires":[["d6e8489d.b788b"]]},{"id":"fa80012e.2864c8","type":"inject","z":"6e05060.f1027fc","name":"2","props":[{"p":"payload","v":"2","vt":"num"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":90,"y":1280,"wires":[["1e71388d.c189a7"]]},{"id":"32c4e761.26565","type":"change","z":"6e05060.f1027fc","name":"Set flow.900E","rules":[{"t":"set","p":"900E","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":920,"wires":[[]]},{"id":"4498d59d.077934","type":"inject","z":"6e05060.f1027fc","name":"Fake Read Values","props":[{"p":"payload","v":"[0, 172, 300, 1600, 1450, 1500, 1400, 1390, 1380, 1320, 1260, 1220, 1200, 1150, 1060 ]","vt":"json"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[0, 172, 300, 1600, 1450, 1500, 1400, 1390, 1380, 1320, 1260, 1220, 1200, 1150, 1060 ]","payloadType":"json","x":210,"y":680,"wires":[["86f6460e.e872e"]]},{"id":"f3c2d559.c1ba4","type":"change","z":"6e05060.f1027fc","name":"Set flow.9002","rules":[{"t":"set","p":"9002","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":200,"wires":[[]]},{"id":"f867836d.c78fd","type":"change","z":"6e05060.f1027fc","name":"Set flow.9003","rules":[{"t":"set","p":"9003","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":260,"wires":[[]]},{"id":"efd64b5c.f026b","type":"change","z":"6e05060.f1027fc","name":"Set flow.9004","rules":[{"t":"set","p":"9004","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":320,"wires":[[]]},{"id":"cca9cfff.21a4c","type":"change","z":"6e05060.f1027fc","name":"Set flow.9005","rules":[{"t":"set","p":"9005","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":380,"wires":[[]]},{"id":"acab84c.c2e5bf8","type":"change","z":"6e05060.f1027fc","name":"Set flow.9006","rules":[{"t":"set","p":"9006","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":440,"wires":[[]]},{"id":"3e575334.1346ac","type":"change","z":"6e05060.f1027fc","name":"Set flow.9007","rules":[{"t":"set","p":"9007","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":500,"wires":[[]]},{"id":"55f6061c.cfe788","type":"change","z":"6e05060.f1027fc","name":"Set flow.9008","rules":[{"t":"set","p":"9008","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":560,"wires":[[]]},{"id":"7dce44d9.ce1c4c","type":"change","z":"6e05060.f1027fc","name":"Set flow.9009","rules":[{"t":"set","p":"9009","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":620,"wires":[[]]},{"id":"30b5ef25.0d98d","type":"change","z":"6e05060.f1027fc","name":"Set flow.900A","rules":[{"t":"set","p":"900A","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":680,"wires":[[]]},{"id":"68d31d65.fe179c","type":"change","z":"6e05060.f1027fc","name":"Set flow.900B","rules":[{"t":"set","p":"900B","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":740,"wires":[[]]},{"id":"5a86dd00.dc2b4c","type":"change","z":"6e05060.f1027fc","name":"Set flow.900C","rules":[{"t":"set","p":"900C","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":800,"wires":[[]]},{"id":"6045ec8d.56c5fc","type":"change","z":"6e05060.f1027fc","name":"Set flow.900D","rules":[{"t":"set","p":"900D","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":860,"wires":[[]]},{"id":"86051216.a2775","type":"change","z":"6e05060.f1027fc","name":"Battery Type","rules":[{"t":"set","p":"topic","pt":"msg","to":"9000","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"User","fromt":"str","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Sealed","fromt":"str","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Gel","fromt":"str","to":"2","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Flooded","fromt":"str","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":80,"wires":[["29fa5b9e.382874"]]},{"id":"5fb74957.5d3738","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"10000","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"/100","x":530,"y":440,"wires":[["bb027f4b.90d2d"]]},{"id":"e2272154.a04dc","type":"range","z":"6e05060.f1027fc","minin":"0","maxin":"100","minout":"0","maxout":"10000","action":"scale","round":true,"property":"payload","name":"*100","x":890,"y":440,"wires":[["acab84c.c2e5bf8"]]},{"id":"d6e8489d.b788b","type":"modbus-write","z":"6e05060.f1027fc","name":"","showStatusActivities":false,"showErrors":false,"unitid":"1","dataType":"MHoldingRegisters","adr":"0x9000","quantity":"15","server":"b7312c82.e12fe","x":800,"y":1280,"wires":[[],[]]},{"id":"6bd2d460.30370c","type":"function","z":"6e05060.f1027fc","name":"Build Array 0x906B [2]","func":"var EP906B=flow.get('906B') || 0;\nvar EP906C=flow.get('906C') || 0;\n\nvar list = [ EP906B, EP906C];\nvar msg1 = {payload:list};\n\nreturn msg1","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":1340,"wires":[["6691aa95.97294c"]]},{"id":"6691aa95.97294c","type":"modbus-write","z":"6e05060.f1027fc","name":"","showStatusActivities":false,"showErrors":false,"unitid":"1","dataType":"MHoldingRegisters","adr":"0x906B","quantity":"2","server":"b7312c82.e12fe","emptyMsgOnFail":false,"keepMsgProperties":false,"x":800,"y":1340,"wires":[[],[]]},{"id":"9eeecd8.17b343","type":"delay","z":"6e05060.f1027fc","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":380,"y":1340,"wires":[["6bd2d460.30370c"]]},{"id":"6ed0d57.df2682c","type":"modbus-flex-getter","z":"6e05060.f1027fc","name":"Modbus Get","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"c082a42f.1ec8e","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":130,"y":900,"wires":[["68a74ca2.62d16c"],["5dded3a0.f9f39c"]]},{"id":"798ca444.939364","type":"function","z":"6e05060.f1027fc","name":"FC3 0x906B [2]","func":"msg.payload = { \n 'fc': 3, \n 'unitid': 1, \n 'address': 0x906B, \n 'quantity': 2\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":120,"y":840,"wires":[["6ed0d57.df2682c"]]},{"id":"455d7093.048ae8","type":"switch","z":"6e05060.f1027fc","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":370,"y":1040,"wires":[["6909faef.ffd3b4"],["2d2a4c65.2bb9f4"]]},{"id":"68a74ca2.62d16c","type":"split","z":"6e05060.f1027fc","name":"","splt":"\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":190,"y":1040,"wires":[["455d7093.048ae8"]]},{"id":"6909faef.ffd3b4","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Equalization Duration","tooltip":"","group":"6940fb1e.3ea9f4","order":16,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} m","min":"60","max":"120","step":"1","x":700,"y":980,"wires":[["ccc06b35.20d628"]]},{"id":"2d2a4c65.2bb9f4","type":"ui_numeric","z":"6e05060.f1027fc","name":"","label":"Boost Duration","tooltip":"","group":"6940fb1e.3ea9f4","order":17,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}} m","min":"60","max":"120","step":"1","x":680,"y":1040,"wires":[["467478cc.fd"]]},{"id":"ccc06b35.20d628","type":"change","z":"6e05060.f1027fc","name":"Set flow.906B","rules":[{"t":"set","p":"906B","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":980,"wires":[[]]},{"id":"467478cc.fd","type":"change","z":"6e05060.f1027fc","name":"Set flow.906C","rules":[{"t":"set","p":"906C","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":1040,"wires":[[]]},{"id":"795ff192.9b649","type":"inject","z":"6e05060.f1027fc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"10","topic":"","payload":"1","payloadType":"num","x":90,"y":600,"wires":[["86f6460e.e872e"]]},{"id":"5dded3a0.f9f39c","type":"modbus-response","z":"6e05060.f1027fc","name":"0x906B Response","registerShowMax":20,"x":310,"y":960,"wires":[]},{"id":"8c2f0620.78ea08","type":"delay","z":"6e05060.f1027fc","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":100,"y":780,"wires":[["798ca444.939364"]]},{"id":"5a321b98.eab85c","type":"inject","z":"6e05060.f1027fc","name":"3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":90,"y":1440,"wires":[["b6ef3274.499e18"]]},{"id":"b6ef3274.499e18","type":"ui_button","z":"6e05060.f1027fc","name":"","group":"64dde05.682662","order":3,"width":0,"height":0,"passthru":true,"label":"Write Values","tooltip":"Update date & time","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":250,"y":1440,"wires":[[]]},{"id":"f82ed0c0.2b76b","type":"function","z":"6e05060.f1027fc","name":"Build Array 0x9013 3]","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":1480,"wires":[["40791c28.224ec4"]]},{"id":"50df011d.53b8e","type":"function","z":"6e05060.f1027fc","name":"FC3 0x9013 [3]","func":"msg.payload = { \n 'fc': 3, \n 'unitid': 1, \n 'address': 0x9013, \n 'quantity': 3\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":140,"y":1160,"wires":[["b105b507.867b6"]]},{"id":"b105b507.867b6","type":"modbus-flex-getter","z":"6e05060.f1027fc","name":"Modbus Get","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"c082a42f.1ec8e","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":210,"y":1220,"wires":[[],["347bede5.83775a"]]},{"id":"347bede5.83775a","type":"modbus-response","z":"6e05060.f1027fc","name":"0x9013 Response","registerShowMax":20,"x":350,"y":1120,"wires":[]},{"id":"fdd4e8c9.9ad558","type":"delay","z":"6e05060.f1027fc","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":120,"y":1100,"wires":[["50df011d.53b8e"]]},{"id":"40791c28.224ec4","type":"modbus-write","z":"6e05060.f1027fc","name":"","showStatusActivities":false,"showErrors":false,"unitid":"1","dataType":"","adr":"0x9013","quantity":"3","server":"b7312c82.e12fe","emptyMsgOnFail":false,"keepMsgProperties":false,"x":800,"y":1480,"wires":[[],[]]},{"id":"c082a42f.1ec8e","type":"modbus-client","name":"","clienttype":"simpleser","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyXRUSB0","serialType":"RTU-BUFFERD","serialBaudrate":"115200","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true},{"id":"6940fb1e.3ea9f4","type":"ui_group","name":"Settings","tab":"6d3a1d1a.0ff764","order":4,"disp":true,"width":6,"collapse":true},{"id":"b7312c82.e12fe","type":"modbus-client","name":"TracerA12","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":true,"tcpHost":"192.168.4.25","tcpPort":"23","tcpType":"TELNET","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"","commandDelay":"100","clientTimeout":"2000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false},{"id":"64dde05.682662","type":"ui_group","name":"Solar","tab":"6d3a1d1a.0ff764","order":1,"disp":true,"width":"6","collapse":false},{"id":"6d3a1d1a.0ff764","type":"ui_tab","name":"EPEver Dashboard","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

@dtabone
Copy link

dtabone commented Jun 25, 2021

You need to use reassemble the vars and use bitwise conversions to create the array. I'm almost done doing it,

@dtabone
Copy link

dtabone commented Jun 25, 2021

@SCarns see the previous issue - i've uploaded the JSON v0.5 zip file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants