Victron venus-os_dbus-mqtt-battery installer

Using this flow you can install the MQTT battery driver from https://github.com/mr-manuel/venus-os_dbus-mqtt-battery

You have to VenusOS Large firmware installed and MQTT on LAN enabled. First you have to set te root password for root using Victron remote console. Next install @arcsoft/node-red-sshtools node in your Venus device. Before install you must set SSH credentials for exec node using your root password for your Cerbo or Rpi. Install using inject from step 1 to step 5. After every step wait for return code 0 appears in the debug.

More info about the driver: https://github.com/mr-manuel/venus-os_dbus-mqtt-battery

[{"id":"2e68eb40815bd09a","type":"debug","z":"e000134bd49833d1","name":"Wait after every  step  to RC:0 return","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1080,"y":520,"wires":[]},{"id":"9f0464b2dc431bb8","type":"sshexec","z":"e000134bd49833d1","name":"","sshccfg":"","command":"","addpay":"payload","append":"","useSpawn":"false","timer":"","sigint":false,"x":850,"y":520,"wires":[["2e68eb40815bd09a"],["2e68eb40815bd09a"],["2e68eb40815bd09a"]]},{"id":"349e4569fc9d3ce3","type":"inject","z":"e000134bd49833d1","name":"Step 1 wget master.zip and unpack","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"cd /data/etc && wget https://github.com/mr-manuel/venus-os_dbus-mqtt-battery/archive/refs/heads/master.zip && unzip master.zip","payloadType":"str","x":580,"y":480,"wires":[["9f0464b2dc431bb8"]]},{"id":"6f24704781d9c5a7","type":"inject","z":"e000134bd49833d1","name":"Step 2 move dbus-mqtt-battery to /data/etc/","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"cd /data/etc/ && mv venus-os_dbus-mqtt-battery-master/dbus-mqtt-battery/ /data/etc/ ","payloadType":"str","x":560,"y":520,"wires":[["9f0464b2dc431bb8"]]},{"id":"9144eedb4107fb07","type":"sshwrite","z":"e000134bd49833d1","name":"","sshccfg":"","filename":"/data/etc/dbus-mqtt-battery/config.ini","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":1090,"y":560,"wires":[[]]},{"id":"fc1d8b12fedfbcae","type":"template","z":"e000134bd49833d1","name":"","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"; CONFIG FILE\n; GitHub reporitory: https://github.com/mr-manuel/venus-os_dbus-mqtt-battery\n; remove semicolon ; to enable desired setting\n\n[DEFAULT]\n; Set logging level\n; ERROR = shows errors only\n; WARNING = shows ERROR and warnings\n; INFO = shows WARNING and running functions\n; DEBUG = shows INFO and data/values\n; default: WARNING\nlogging = WARNING\n\n; Device name\n; default: MQTT Battery\ndevice_name = GTF Battery\n\n; Device VRM instance\n; default: 41\ndevice_instance = 41\n\n; Specify after how many seconds the driver should exit (disconnect), if no new MQTT message was received\n; default: 60\n; value to disable timeout: 0\ntimeout = 60\n\n[MQTT]\n; IP addess or FQDN from MQTT server\nbroker_address = 127.0.0.1\n\n; Port of the MQTT server\n; default plaintext: 1883\n; default TLS port: 8883\nbroker_port = 1883\n\n; Enables TLS\n; 0 = Disabled\n; 1 = Enabled\n;tls_enabled = 1\n\n; Absolute path to the Certificate Authority certificate file that is to be treated as trusted by this client\n;tls_path_to_ca = /data/keys/mosquitto.crt\n\n; Disables verification of the server hostname in the server certificate\n; 0 = Disabled\n; 1 = Enabled\n;tls_insecure = 1\n\n; Username used for connection\n;username = myuser\n\n; Password used for connection\n;password = mypassword\n\n; Topic where the meters data as JSON string is published\n; minimum required JSON payload: { \"dc\": { \"power\": 321.6, \"voltage\": 52.6  }, \"soc\": 63 }\ntopic = gtf/battery\n","output":"str","x":860,"y":560,"wires":[["9144eedb4107fb07"]]},{"id":"e7a94d03c323519a","type":"inject","z":"e000134bd49833d1","name":"Step 3 create config.ini --> customize template before","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":520,"y":560,"wires":[["fc1d8b12fedfbcae"]]},{"id":"4de2eb76ec0dd9c2","type":"inject","z":"e000134bd49833d1","name":"Step 4 install driver","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"cd /data/etc/dbus-mqtt-battery/ && bash ./install.sh","payloadType":"str","x":630,"y":600,"wires":[["9f0464b2dc431bb8"]]},{"id":"b3307190439622c4","type":"inject","z":"e000134bd49833d1","name":"Step 5 Cleanup","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"cd /data/etc/ && rm /data/etc/master.zip && rm -r /data/etc/venus-os_dbus-mqtt-battery-master/","payloadType":"str","x":640,"y":640,"wires":[["9f0464b2dc431bb8"]]},{"id":"b14c8ee8cd607ed6","type":"comment","z":"e000134bd49833d1","name":"Read me","info":"You have to VenusOS Large firmware installed.\nFirst you have to set te root password for root using Victron remote console.\nNext install @arcsoft/node-red-sshtools node in your Venus device.\nBefore install you must set SSH credentials for exec node using your root password for your Cerbo or Rpi.\nInstall using inject from step 1 to step 5. After every step wait for return code 0 appears in the debug.\n\nMore info about the driver: https://github.com/mr-manuel/venus-os_dbus-mqtt-battery","x":1000,"y":480,"wires":[]}]

Collection Info

Flow Info

Created 2 years, 3 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • comment (x1)
  • debug (x1)
  • inject (x5)
  • template (x1)
Other

Tags

  • victron
  • venusos
  • mqtt
  • battery
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option