victronenergy / node-red-contrib-victron

MIT License
87 stars 18 forks source link

Node Red Relay control for Relay 5&6 #136

Closed Benthegreat closed 2 years ago

Benthegreat commented 2 years ago

I am using A raspberry Pi 3B running the latest beta program with the large for node red. Node red has relay control for Relay 1-4 but not 5&6. I have used Kevin Windrem setup helper to add the additional relays that are possible. I currently have LED status lights connected but will use the additional relays to control other items. Is there anything I can do to make the last two relays? I love having node red control to help automate my system.
I am using V2.90~12 image image

Thank you for the help and all the hard work.

dirkjanfaber commented 2 years ago

In the services.json file all of the relays that can be switched from Node-RED are defined. The usual Victron devices (Cerbo GX, CCGX and Venus GX) have only 2 relays. For the Raspberry Pi with the relay hats I already have increased the number of defined relays to 4 (/usr/lib/node_modules/@victronenergy/node-red-contrib-victron/src/services/services.json).

If you want to add more, you can add extra in the input-relay / system and output-relay / system part (around line 3235 and line 5017). You can add 2 extra relays there. Just make sure that the json file remains valid. After changing the file you need to restart Node-RED (cd /service; svc -d node-red-venus; svc -u node-red-venus).

As the file is already really large, I am a bit reluctant to add more than 4 to the mainstream release. But that means that you will need to manually add the 2 extra relays after each update for now.

dirkjanfaber commented 2 years ago

I'll close this issue as it is resolvable with the above instructions. In order to get more than 4 relays working, you will need to do some modifications anyway, so this one can be on that list as well.

Benthegreat commented 2 years ago

Thank you for the help. I got 5&6 to work. Thanks for all the hard work you put in.