question

harold avatar image
harold asked

Help with connection Node-Red

Hi Techs,

Who can help me a little to start my connection with Node-Red.
Installation:
- CCGX
- Victron Quattro, MPPT etc etc

- iHost (small home automation server), running Node Red
- All on 1 local Teltonika router, LAN system (via Wifi)

Node Red runs, IHost and the other home automation divices seems to connect and work

No good clue how to connect the CCGX!

Thanks Harold

CCGX Color ControlNode-RED
2 |3000

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

3 Answers
matt1309 avatar image
matt1309 answered ·

HI @Harold


There's a few options. Could just read from ccgx via local modbus or mqtt service that runs on ccgx.

Or you could try integrate victron's node red nodes into your external node red setup:

(Need to setup Dbus TCP connection explained here:

node-red-contrib-victron (node) - Node-RED (nodered.org)

2 |3000

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

harold avatar image
harold answered ·

Thnaks Matt,
I tried the second, installed @victronenergy/node-red-contrib-victron

I can 'see' th victron client, but I cannot find out how to connect it

1 comment
2 |3000

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

matt1309 avatar image matt1309 commented ·

I've never done this but I think it's this section below: ie enabling dbus tcp and then setting environment variable to get node red to connect

Particularly the "set environment variables NODE_RED_DBUS_ADDRESS to connect via TCP"

1715849285733.png


0 Likes 0 ·
1715849285733.png (77.8 KiB)
harold avatar image
harold answered ·

Thanks for your time!

Yes, I have read this, but:1715849948055.png

Where to enter this...?


and this:

1715850036225.png

Or are there easier ways???


1715849948055.png (34.0 KiB)
1715850036225.png (82.3 KiB)
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.

matt1309 avatar image matt1309 commented ·

The first will be on the ccgx. You need to edit the value in dbus service. You can do this using commandline command they provide:


ie the dbus -y ..... etc


To execute command line command on gx you will need to ssh into gx device, which is explained here: Venus OS: Root Access [Victron Energy]


My assumption for the second is you set the environment variable on the system running node red guessing your iHost device. So you'd ssh into that system and set the environment varaible using export NODE_RED_DBUS_ADDRESS=[insert ip of gx device]

You might need to write the var every boot


If you're running node red as a service you may need to do this in your service file:

Environment="NODE_RED_DBUS_ADDRESS=192.168.1.9:78"


to /lib/systemd/system/nodred.service or whereever your node red file is stored


MQTT option may be easier, you can read the data via mqtt, just install mqtt on node red system and you'll have access to all data.


Some others were discussing this setup here, might help. In case you're running into same issues as them

External Node Red on Ubuntu connecting to CCGX - Victron Community (victronenergy.com)

0 Likes 0 ·
harold avatar image harold matt1309 commented ·
Thanks!

I will try!

1 Like 1 ·
harold avatar image harold harold commented ·
by the way, had MQTT conncted in the past, so may be that's easier
0 Likes 0 ·
matt1309 avatar image matt1309 harold commented ·

Openhab / Homeassistant tend to use modbus tcp or mqtt for their integrations.


Given yours is node red based i imagine it'll be nice to have the victron nodes supported natively but if it is a massive headache then MQTT might be your next best bet.


(Let me know if you go node red route) I've never actually tried it would be good to know if it is as simple as following the above or if you end up running into quirks.

1 Like 1 ·