question

haelo avatar image
haelo asked

How to convert a node red result into an external relais-action

I have an ESS system (EM24- ethernet, Cerbo GX, solar-MPPT, MP2, Pylontech) and want to use the PV-Ecesss energy to heat my water system. I want to use this electricity in my own grid, but at a distance from the victron installation .

I installed node red in (venus large) the GX and Home Assistant on my PC. How can I convert the results of my node red operation, transport it from GX via my LAN/WIFI/Home Assistant, into a switching action? What steps do I need to take?

Thanks in advance

ESSNode-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 @Haelo


So you want GX device to send a switch on message to home assistant?

Few ways.

The way i have it setup is I use a shelly smart switch (as my relay) and a http node in node red to turn on the switch directly (wouldnt even need homeassistant).

What I do is have the shelly device in openhab (an alternative to home assistant) so although GX deice controls shelly directly the status still shows up in openhab (homeassistant will definitely be able to do the same)



Alternatively you would use homeassistants API to send a query using HTTP node in node red to homeassistant and then homeassistant activates the relay.

REST API | Home Assistant Developer Docs (home-assistant.io)


2 |3000

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

haelo avatar image
haelo answered ·

Thanks Matt for your response. I understand what you posted, but how do I find the address of the smart switch?

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 ·
@Haelo


It'll be assigned an IP address. You can find local IP's of devices in various ways. You router's DHCP sever settings will likely list then.


However you can also check the shelly smart switch settings which will show IP once it's connected to wifi.

Or use network scanning apps. I quite like Fing on android (not sure if there's an iOS equivalent).


Or do you mean how do you know what address to send the command to?


0 Likes 0 ·
haelo avatar image
haelo answered ·

Thank you Matt, I think I am starting to understand. I can probably find the Shelly IP in my router, when the Shelly's powered ( I don't have one yet). So I have to configure a command in node red what sends "on or off" command. Can you give an example of the command? i. e.HTTP REQUEST? what are the properties for operation? For example to put-on a lamp or relais?

1 method, 2 URL, 3 payload etc.

Thanks,

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 ·
Hi @Haelo ..

It will depend which shelly device you get as they have different api versions.


The details can be found here:https://shelly-api-docs.shelly.cloud/


Happy to help with setting up command if you can share which api version/shelly device you plan to use.


Off the top of my head I think the shelly v1 is something like

Method:post

Url Http://shellyip/relay/0/command

Where shellyip is replaced with the internal ip

Payload: on, off or toggle

0 Likes 0 ·