Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
venus-os:large [2024-04-03 19:07] – [5.1 Introduction] mvader | venus-os:large [2024-06-24 21:08] – dfaber |
---|
===== 5. Node-RED ===== | ===== 5. Node-RED ===== |
| |
{{ :venus-os:node-red-contrib-victron-nodes.png?nolink |}} | {{:venus-os:node-palette.png?direct&nolink |}} |
==== 5.1 Introduction ==== | ==== 5.1 Introduction ==== |
| |
| |
==== 5.4 Controlling relays ==== | ==== 5.4 Controlling relays ==== |
| |
| For a relay to be controllable via Node-RED, it needs to be switched to manual control first. In most cases this needs to be done by using [[https://www.victronenergy.com/panel-systems-remote-monitoring/victronconnect|VictronConnect]]. |
| |
| ;#; |
| {{:venus-os:victron-connect-relay-manual.png?400|}} |
| ;#; |
| |
=== GX Device relays === | === GX Device relays === |
| |
=== SolarCharger MPPT Relay === | === SolarCharger MPPT Relay === |
Currently it is not possible to control the relay in a MPPT Solar Charger, even though there is a Victron node offering such functionality. The reason it doesn't work, is that VictronConnect does not have the required "Manual control" option in the list of selectable Relay modes for the MPPTs. This will be fixed at some point. | In order to switch the relay via Node-RED, first use VictronConnect to switch the operation mode to //manual control//. |
| |
Note that only the larger model solar chargers feature a relay. | Note that only the larger model solar chargers feature a relay. |
| |
=== RS series (inverter, multi) relays === | === RS series (inverter, multi) relays === |
Currently not controllable. Will be controllable in the future. | First set the relay to //manual control// using VictronConnect. Once that has been done, the relay can be controlled using Node-RED. |
| |
=== Charger relays === | === Charger relays === |
| |
And restart Node-RED. | And restart Node-RED. |
| |
| === Q11: Is there a way to have the context survive reboots? === |
| |
| By default the context is stored in memory of the GX device only. If the GX device gets rebooted, the |
| content of the memory gets reset and you loose the context information. |
| |
| In order to keep the context data, it is needed to [[https://nodered.org/docs/api/context/store/localfilesystem|store the context to disk]]. This can be achieved by creating (or adding to) a user configuration file ''/data/home/nodered/.node-red/settings-user.js'', containing: |
| |
| module.exports = { |
| contextStorage: { |
| default: { |
| module: "localfilesystem", |
| config: { |
| flushInterval: 300 // Save context data every 5 minutes |
| } |
| } |
| } |
| } |
| |
| With the above settings, context files will get created periodically in ''/data/home/nodered/.nodered/context/''. In order not to wear out the flash too much, don't write too often. |
===== 6. Signal K ===== | ===== 6. Signal K ===== |
| |
* [[https://demo.signalk.org/documentation/|The official Signal K documentation]] | * [[https://demo.signalk.org/documentation/|The official Signal K documentation]] |
* [[https://community.victronenergy.com/search.html?c=&includeChildren=&f=&type=question+OR+idea+OR+kbentry+OR+answer+OR+topic+OR+user&redirect=search%2Fsearch&sort=relevance&q=signal+k|Signal K topics on the Victron Community forum]] | * [[https://community.victronenergy.com/search.html?c=&includeChildren=&f=&type=question+OR+idea+OR+kbentry+OR+answer+OR+topic+OR+user&redirect=search%2Fsearch&sort=relevance&q=signal+k|Signal K topics on the Victron Community forum]] |
* [[http://slack-invite.signalk.org/|Signal K Slack]] - a real time chat group including a special Victron channel. | * [[https://discord.gg/uuZrwz4dCS |Signal K Discord]] - a real time chat group including a special Victron channel. |
| |
Do not contact normal Victron support for any help on SignalK. Its based on community support, not official support. | Do not contact normal Victron support for any help on SignalK. Its based on community support, not official support. |
| |
* [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-00-backup-data-partition.tgz|venus-data-00-backup-data-partition.tgz]] - copies all that is on the ''/data'' partition onto the usb stick | * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-00-backup-data-partition.tgz|venus-data-00-backup-data-partition.tgz]] - copies all that is on the ''/data'' partition onto the usb stick |
* [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-20-signalk-reset.tgz|venus-data-20-signalk-reset.tgz]] - wipes everything from ''/data/conf/signalk/'' | * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-20-signalk-reset.tgz|venus-data-20-signalk-reset.tgz]] - removes all files and directories from ''/data/conf/signalk/'', which lets you start over again with SignalK. |
* [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-30-signalk-delete-data-logs.tgz|venus-data-30-signalk-delete-data-logs.tgz]] - removes all SignalK loging | * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-30-signalk-delete-data-logs.tgz|venus-data-30-signalk-delete-data-logs.tgz]] - removes all SignalK loging |
* [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-20-node-red-reset.tgz|venus-data-20-node-red-reset.tgz]] - wipes all in ''/data/home/nodered/'' | * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-20-node-red-reset.tgz|venus-data-20-node-red-reset.tgz]] - removes the files from ''/data/home/nodered/'', which lets you start with Node-RED from scratch. |
| |
See [[https://www.victronenergy.com/live/ccgx:root_access#hooks_to_install_run_own_code_at_boot|here]] for more information on how this process works. | See [[https://www.victronenergy.com/live/ccgx:root_access#hooks_to_install_run_own_code_at_boot|here]] for more information on how this process works. |