question

Kirk B avatar image
Kirk B asked

Write MQTT Msg to Change Current Limit

Using node red to connect to the CCGX mqtt service. I have reading values (subscribing) working well. However, now I'm trying to send a write message to change the current limit on the multiplus. Here are a couple examples of what i have tried using mosquitto tools:

mosquitto_pub -h 192.168.50.20 -t "W/6cece#######/vebus/257/Ac/In/1/CurrentLimit" -m "{"value": 15.5}"

mosquitto_pub -h 192.168.50.20 -t "W/6cece#######/vebus/257/Ac/In/1/CurrentLimit" -m "15.5"

Nothing seems to stick. Any suggestions?


Thanks, Kirk

MQTT
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

6 Answers
ben avatar image
ben answered ·

The problem is with the JSON payload and the nested quotation marks. Try:

mosquitto_pub -h 192.168.1.2  -t ‘W/###########/vebus/257/Ac/ActiveIn/CurrentLimit’ -m ‘{“value”:15.5}’


2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kirk B avatar image Kirk B commented ·

Thanks again Ben! My issue initially was trying to change the specific input and not using the activein. Not sure if that was a factor. The proper use of single and double quotes also did the trick. I now have a functional input current slider on my node red dashboard ... woot!

0 Likes 0 ·

Can we please see some pics?

0 Likes 0 ·
Kirk B avatar image
Kirk B answered ·

Hey Guy! Absolutely ....

All developed in Node Red using Venus OS MQTT Broker. Controls and Tanks Levels are hardcoded values for now and not hooked up. Battery, AC, & Solar are all hooked up to the CCGX MQTT Broker. I'm playing around with UI options for the AC Input Limit. I have a 30a exterior plug and a generator going to AC In on my two Stacked Multiplus 3k. So, generally I'm either using 12a input or 24a input limit. The switch seems a more simpleton implementation vs. the slider.

My RV has a factory tablet solution that feels like it was developed in 1987. However, it does use CANBus. I may look into setting up a CANBus<->MQTT interface which would allow me to control the lighting as well as other features such as hot water, pump, tank levels, RV leveling etc. The alternative it to replace the RV CANbus hardware with IoT Relays or sensors that support MQTT messaging. Anyhow, I've only put about 12 hours into this so far but am really liking the ease of integration with Node Red and Venus OS / MQTT Broker.

Ben has a similar solution utilizing Grafana but requires the use of a DB (which has some advantage). I believe he is also further along in the sensor department than i am.

Other than integration with existing RV systems, I'm also looking to integrate with homekit. Would be nice to ask Siri what the battery SOC is or better have homekit or node red flows that shut down non critical systems when the batteries hit a certain DOD.

Cheers!

Kirk


4 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

Nice!

....

0 Likes 0 ·
Show more comments
geomz avatar image geomz commented ·

I second that, Nice! :)

0 Likes 0 ·
sinbad avatar image sinbad commented ·

Right I'm teaching myself node-red this weekend! This looks absolutely awesome!

0 Likes 0 ·
jpsc avatar image
jpsc answered ·

Hi Kirk.


I'm trying to do this using modbus but without success.

You have a nice layout, is possible to send me your code by email?


Thanks in advance,

José

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kirk B avatar image Kirk B commented ·

José,

I suspect using modbus the messaging and connection would be completely different. Also, I’m using node red. So, the code is really just a collection of flows which I can export if you think it would be helpful. However, it’s really only going to be useful if you are leveraging node red.


Are you using node red? Or another platform? Do you have a CCGX or Venus? If so, why not use mqtt?

0 Likes 0 ·
jpsc avatar image jpsc Kirk B commented ·

Hi Kirb.


I start using node red two weeks ago and I have a CCGX.

At this moment I can read almost everything from modbus except all the address after 1026 at the end of the xls file.


Today I found the way to change the current limit with node red but I’m not able to start generator without forcing the input to 1 every 500 millisecond.


I don’t know if is allowed share my email account here.

0 Likes 0 ·
jpsc avatar image jpsc jpsc commented ·

Hi Kirk.


Please can you export and send to this email,

josepedro.carvalho@icloud.com


Your files will be helpful to learn how to use mqtt and configure the flows.


Thank you

0 Likes 0 ·
Kirk B avatar image
Kirk B answered ·

Jose, I emailed you the code for my AC flow which includes changing the input limit. I'll post it here as well for anyone interested. Before importing into node red, change the VRM_ID to your VRM Portal ID which can be found in the CCGX / Venus settings. Also, change the CCGX_IP to the IP of your CCGX. There is no guarantee that my MQTT message paths will match everyone else's. I did use wildcards where i could but if you aren't seeing data you may need to tweak the MQTT queries.


[{"id":"1947ac4f.be0ef4","type":"tab","label":"AC","disabled":false,"info":""},{"id":"2b44a0e1.6e1ef8","type":"mqtt in","z":"1947ac4f.be0ef4","name":"AC Out","topic":"N/+/vebus/+/Ac/Out/P","qos":"0","broker":"c3f4db70.7e5728","x":190,"y":220,"wires":[["bf840a63.d8db38"]]},{"id":"ba136a39.ffe288","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 0)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":220,"wires":[["b66104c3.6bb55","8c285755.ca7a5","3864baca.0577e6"]]},{"id":"b66104c3.6bb55","type":"ui_gauge","z":"1947ac4f.be0ef4","name":"","group":"a8fa322c.c4455","order":6,"width":"3","height":"3","gtype":"donut","title":"AC Out","label":"Watts","format":"{
                  {value}}","min":0,"max":"6000","colors":["#4e7a27","#e6e600","#b51a00"],"seg1":"600","seg2":"3600","x":920,"y":180,"wires":[]},{"id":"bf840a63.d8db38","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":390,"y":220,"wires":[["62a46e.6c6b0b94"]]},{"id":"62a46e.6c6b0b94","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":570,"y":220,"wires":[["ba136a39.ffe288"]]},{"id":"10623dd6.839c9a","type":"mqtt in","z":"1947ac4f.be0ef4","name":"AC In","topic":"N/+/vebus/+/Ac/ActiveIn/L1/P","qos":"0","broker":"c3f4db70.7e5728","x":190,"y":280,"wires":[["c6240cc9.5ec558"]]},{"id":"3acb357e.db5ae2","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 0)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":280,"wires":[["bd276abe.1716d","fa9fb76e.aa3f","3864baca.0577e6"]]},{"id":"bd276abe.1716d","type":"ui_gauge","z":"1947ac4f.be0ef4","name":"","group":"a8fa322c.c4455","order":5,"width":"3","height":"3","gtype":"donut","title":"AC In","label":"Amps","format":"{
                  {value}}","min":0,"max":"3000","colors":["#b51a00","#e6e600","#4e7a27"],"seg1":"200","seg2":"500","x":930,"y":300,"wires":[]},{"id":"c6240cc9.5ec558","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":390,"y":280,"wires":[["aa8fb427.0f0578"]]},{"id":"aa8fb427.0f0578","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":570,"y":280,"wires":[["3acb357e.db5ae2"]]},{"id":"a40bcf88.13f6d","type":"ui_chart","z":"1947ac4f.be0ef4","name":"","group":"2d6ebde8.d7f8a2","order":2,"width":"24","height":"8","label":"In / Out","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"No Data","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":1280,"y":240,"wires":[[],[]]},{"id":"8c285755.ca7a5","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":1100,"y":220,"wires":[["a40bcf88.13f6d"]]},{"id":"fa9fb76e.aa3f","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":1100,"y":280,"wires":[["a40bcf88.13f6d"]]},{"id":"f0bc446b.5ca04","type":"mqtt in","z":"1947ac4f.be0ef4","name":"Current Limit","topic":"N/+/vebus/+/Ac/ActiveIn/CurrentLimit","qos":"0","datatype":"auto","broker":"c3f4db70.7e5728","x":210,"y":380,"wires":[["49edaff7.8a7778"]]},{"id":"49edaff7.8a7778","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":370,"y":380,"wires":[["332ad723.484348"]]},{"id":"332ad723.484348","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":380,"wires":[["c6c73d70.769908","f7e031e2.cb1918"]]},{"id":"6b68f38a.884e3c","type":"mqtt out","z":"1947ac4f.be0ef4","name":"CCGX MQTT","topic”:”W/VRM_ID/vebus/257/Ac/ActiveIn/CurrentLimit","qos":"","retain":"","broker":"c3f4db70.7e5728","x":1090,"y":380,"wires":[]},{"id":"acde5043.94acb","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"value\": msg.payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":380,"wires":[["6b68f38a.884e3c"]]},{"id":"c5a95188.e4c6","type":"mqtt in","z":"1947ac4f.be0ef4","name":"","topic":"N/+/vebus/+/Ac/Out/L1/V","qos":"0","broker":"c3f4db70.7e5728","x":250,"y":500,"wires":[["2a3f9f5d.b27cd8"]]},{"id":"6627eca2.70991c","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 1)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":500,"wires":[["d09a3d0d.492108"]]},{"id":"2a3f9f5d.b27cd8","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":470,"y":500,"wires":[["525669fa.5a326"]]},{"id":"525669fa.5a326","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":650,"y":500,"wires":[["6627eca2.70991c"]]},{"id":"d09a3d0d.492108","type":"ui_text","z":"1947ac4f.be0ef4","group":"a8fa322c.c4455","order":7,"width":"2","height":"1","name":"","label":"Volts Out","format":"{
                  {msg.payload}} V","layout":"col-center","x":1030,"y":500,"wires":[]},{"id":"560fe668.38762","type":"mqtt in","z":"1947ac4f.be0ef4","name":"","topic":"N/+/vebus/+/Ac/Out/L1/I","qos":"0","broker":"c3f4db70.7e5728","x":250,"y":560,"wires":[["31319b0d.f80a8c"]]},{"id":"c60c03c8.465dc8","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 1)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":560,"wires":[["3513c986.0e95a6"]]},{"id":"31319b0d.f80a8c","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":470,"y":560,"wires":[["de60ce19.57b7c8"]]},{"id":"de60ce19.57b7c8","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":650,"y":560,"wires":[["c60c03c8.465dc8"]]},{"id":"3513c986.0e95a6","type":"ui_text","z":"1947ac4f.be0ef4","group":"a8fa322c.c4455","order":8,"width":"2","height":"1","name":"","label":"Amp Out","format":"{
                  {msg.payload}} A","layout":"col-center","x":1030,"y":560,"wires":[]},{"id":"56693986.f42a7","type":"mqtt in","z":"1947ac4f.be0ef4","name":"","topic":"N/+/vebus/+/Ac/Out/L1/F","qos":"0","broker":"c3f4db70.7e5728","x":250,"y":620,"wires":[["a96c7f72.d41b68"]]},{"id":"412860b3.82493","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 1)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":620,"wires":[["5fa8bf86.243e18"]]},{"id":"a96c7f72.d41b68","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":470,"y":620,"wires":[["c1b474d1.409018"]]},{"id":"c1b474d1.409018","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":650,"y":620,"wires":[["412860b3.82493"]]},{"id":"5fa8bf86.243e18","type":"ui_text","z":"1947ac4f.be0ef4","group":"a8fa322c.c4455","order":9,"width":"2","height":"1","name":"","label":"Freq Out","format":"{
                  {msg.payload}} Hz","layout":"col-center","x":1030,"y":620,"wires":[]},{"id":"caef9059.54bfc","type":"mqtt in","z":"1947ac4f.be0ef4","name":"","topic":"N/+/vebus/+/Ac/ActiveIn/L1/V","qos":"0","broker":"c3f4db70.7e5728","x":260,"y":680,"wires":[["fd65236.827726"]]},{"id":"ba4cf240.6490e8","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 1)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":680,"wires":[["2d898ef8.c86eda"]]},{"id":"fd65236.827726","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":470,"y":680,"wires":[["36e224d0.2fabec"]]},{"id":"36e224d0.2fabec","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":650,"y":680,"wires":[["ba4cf240.6490e8"]]},{"id":"2d898ef8.c86eda","type":"ui_text","z":"1947ac4f.be0ef4","group":"a8fa322c.c4455","order":10,"width":"2","height":"1","name":"","label":"Volts In","format":"{
                  {msg.payload}} V","layout":"col-center","x":1030,"y":680,"wires":[]},{"id":"dc6f6b25.9919b","type":"mqtt in","z":"1947ac4f.be0ef4","name":"","topic":"N/+/vebus/+/Ac/ActiveIn/L1/I","qos":"0","broker":"c3f4db70.7e5728","x":260,"y":740,"wires":[["25760079.5082a"]]},{"id":"2ba756c8.fa2dda","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 1)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":740,"wires":[["60f361c.8db50a"]]},{"id":"25760079.5082a","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":470,"y":740,"wires":[["dca58e19.d7d4a"]]},{"id":"dca58e19.d7d4a","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":650,"y":740,"wires":[["2ba756c8.fa2dda"]]},{"id":"60f361c.8db50a","type":"ui_text","z":"1947ac4f.be0ef4","group":"a8fa322c.c4455","order":11,"width":"2","height":"1","name":"","label":"Amp In","format":"{
                  {msg.payload}} A","layout":"col-center","x":1030,"y":740,"wires":[]},{"id":"86887eed.b618c","type":"mqtt in","z":"1947ac4f.be0ef4","name":"","topic":"N/+/vebus/+/Ac/ActiveIn/L1/F","qos":"0","broker":"c3f4db70.7e5728","x":260,"y":800,"wires":[["e2655a1b.667608"]]},{"id":"dfb57cce.d2fc98","type":"change","z":"1947ac4f.be0ef4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round(payload.value, 1)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":800,"wires":[["814a48b7.0a5c78"]]},{"id":"e2655a1b.667608","type":"delay","z":"1947ac4f.be0ef4","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":470,"y":800,"wires":[["e46c3ed9.959458"]]},{"id":"e46c3ed9.959458","type":"json","z":"1947ac4f.be0ef4","name":"","property":"payload","action":"","pretty":false,"x":650,"y":800,"wires":[["dfb57cce.d2fc98"]]},{"id":"814a48b7.0a5c78","type":"ui_text","z":"1947ac4f.be0ef4","group":"a8fa322c.c4455","order":12,"width":"2","height":"1","name":"","label":"Freq In","format":"{
                  {msg.payload}} Hz","layout":"col-center","x":1030,"y":800,"wires":[]},{"id":"3864baca.0577e6","type":"ui_chart","z":"1947ac4f.be0ef4","name":"","group":"a8fa322c.c4455","order":13,"width":"6","height":"2","label":"","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":930,"y":240,"wires":[[],[]]},{"id":"c6c73d70.769908","type":"ui_dropdown","z":"1947ac4f.be0ef4","name":"","label":"Service","tooltip":"","place":"Select option","group":"a8fa322c.c4455","order":3,"width":"4","height":"1","passthru":false,"options":[{"label":"15 Amp","value":12,"type":"num"},{"label":"Gen x 1","value":"13","type":"str"},{"label":"Gen x 2","value":"23","type":"str"},{"label":"30 Amp","value":"24","type":"str"}],"payload":"","topic":"","x":720,"y":380,"wires":[["acde5043.94acb"]]},{"id":"f7e031e2.cb1918","type":"debug","z":"1947ac4f.be0ef4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":750,"y":440,"wires":[]},{"id":"c3f4db70.7e5728","type":"mqtt-broker","z":"","name":"ccgx","broker”:”CCGX_IP”,”port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"a8fa322c.c4455","type":"ui_group","z":"","name":"AC","tab":"fbf17a66.102028","order":3,"disp":true,"width":"6","collapse":false},{"id":"2d6ebde8.d7f8a2","type":"ui_group","z":"","name":"AC","tab":"718279cd.11c33","disp":true,"width":"24","collapse":false},{"id":"fbf17a66.102028","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"718279cd.11c33","type":"ui_tab","z":"","name":"History","icon":"dashboard","disabled":false,"hidden":false}]


8 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jpsc avatar image jpsc commented ·

Kirk, I see your email and your code worked perfectly.


When you have some free time please share the rest of the code with us because it is a plus for all.


Thanks a lot for the help.

0 Likes 0 ·

As much as I would try your code, its not practicable to copy and paste from your message without getting errors while importing into NR.

0 Likes 0 ·
jpsc avatar image jpsc Stefanie (Victron Energy Staff) ♦♦ commented ·

open this link and fix the code

https://jsonlint.com

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ jpsc commented ·

Did that already with no success. Exchanging the comma for a colon produces other syntax or parse errors. Maybe you can share through dropbox?

0 Likes 0 ·
sinbad avatar image sinbad Stefanie (Victron Energy Staff) ♦♦ commented ·

Hi

Issue with the code as pasted is that some of the quote marks are actually typographic ones instead of the usual " marks. Opening the code in Notepad++ will show these, and you can search and replace - I think there are 6

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ sinbad commented ·

Thanks, Sinbad.

That really helped. Fixed and running.

0 Likes 0 ·
Kirk B avatar image Kirk B Stefanie (Victron Energy Staff) ♦♦ commented ·

Thanks for helping folk Sinbad. I hesitant to reimport without mucking up my work and don't have a clean server to test on. I'll export the remaining Victron related flows and try to upload as a file. Hopefully, that will resolve the quote issue. Quotes and nulls, the bane of the IT warrior :)

0 Likes 0 ·
sinbad avatar image sinbad Kirk B commented ·

Happy to be able to help :) Personally I believe there's a special place in hell for whoever made spaces syntatically significant in YAML! :D

0 Likes 0 ·
Kirk B avatar image
Kirk B answered ·

Attached is a flow to output all Victron MQTT Topics to a CSV file. You will need to change the IP address of your CCGX/Venus and you will need to modify the output path on the file output node. This is a handy utility type flow for researching available topics as well as troubleshooting.

OutputVictronTopics.zip


6 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kirk B avatar image Kirk B commented ·

Here is a keep alive flow important to keep the CCGX/Venus awake. Update the IP address from 192.168.50.20 to whatever your IP address is for the CCGX/Venus. Also, you will need to add in your VRM ID in place of ABCDEFG in the MQTT output node.

KeepAlive.zip

0 Likes 0 ·
keepalive.zip (1.2 KiB)
Kirk B avatar image Kirk B commented ·

Here is my "Battery" Flow(s) which i believe is heavily dependent on a BMV Battery Monitor. Again change the IP from 192.168.50.20 to whatever your IP is for your CCGX/Venus,

Battery.zip

0 Likes 0 ·
battery.zip (2.7 KiB)
Kirk B avatar image Kirk B commented ·

Here is my MPPT flow. Again change the IP address from 192.168.50.20 to whatever your IP is for your CCGX/Venus. Also, I carved out some solar radiation data i get from my weather station. So hopefully this still works. I have 3 MPPT controllers. If you have just one you may want to drop the bar graph from the dashboard. For my configuration it display each individual controllers output.

MPPT.zip

0 Likes 0 ·
mppt.zip (2.1 KiB)
Kirk B avatar image Kirk B commented ·

Reposting the AC flow since folks had issues importing it. This is the AC flow. You will need to replace the ABCDEFG in the file with your VRM portal ID. Likewise you will need to update the IP address from 192.168.50.20 to whatever your CCGX/Venus IP address is set to.

AC.zip

0 Likes 0 ·
ac.zip (3.2 KiB)
Kirk B avatar image Kirk B commented ·

Hopefully this helps everyone. It is a work in progress for me as i attempt to integrate as many systems as possible to perform more sophisticated automation eg, "Hey Siri Level the RV" or have the awnings retract if the weather station detects gusts over a certain mph. Integration with victron and some 12v relays will open the possibility of creating rules such as powering on an electric water heater if it's before 2pm and the batteries are charged. Possibilities are endless and go well beyond just having a nice dashboard :)

We are prepping to head out for AK in the next 10 days. So, sorry for the rush. Please provide feedback if the flows do not import for some reason and i will do what i can to get things corrected. This is obviously not the best place to maintain code. So, if there is enough interest, I may simply post these flows (cleaned up) on the node red site.

Cheers,


Kirk

0 Likes 0 ·
sinbad avatar image sinbad Kirk B commented ·

This is awesome, thank you

I will be importing most of these tonight, will post feedback,

You could also create a project for yourself on github and host there?

0 Likes 0 ·
ozdw avatar image
ozdw answered ·

Kirk,

I'm trying to change the AC input current limit on my Quattro using MQTT and, indeed, seem to be able to do so. It doesn't seem to "stick" for long, though, as it reverts periodically to the original value. I note that N/xyzzy/vebus/257/Ac/ActiveIn/CurrentLimitIsAdjustable is set to 0, which would lead me to conclude this setting isn't writeable. I've tried updating it to 1 and re-writing the current limit, but the limit reverts within a few minutes to the original value.

Any thoughts on why this is behaving this way?

@Kirk B

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

ben avatar image ben ♦ commented ·

Did you remember to enable "overruled by remote" when you set up your Quattro?

0 Likes 0 ·
Kirk B avatar image Kirk B commented ·

Do you have a Venus or ccgx? Either way, use a web browser http://ipofvenus or the ccgx interface to change the input limit. Also shut down node red for this test. If it reverts back after making the change then you need to use veconfig to change a setting related to overriding the current limit. Forget the actual name but it will be obvious when you see it in veconfig. If the test above doesn’t result in the value being overritten then it’s no doubt an issue with you code. I would verify that node red is changing the value by watching the ccgx or Venus directly to see if the value gets updated. You can also add a debug node to your mqqt output node to see if your code is resetting the value. Also make sure you are using a keep alive flow. I posted one here. If you don’t have that running the mqqt service will become unresponsive. Good luck.

0 Likes 0 ·

Related Resources