Hi, know nothing about Node red , but would like to get so you could control this relay via NodRed, send with some instructions ...
On this forum they get it to work
Loxforum
Hi, know nothing about Node red , but would like to get so you could control this relay via NodRed, send with some instructions ...
On this forum they get it to work
Loxforum
Hello!
Im not expert but I had a quick look
Looks like there is 2 ways to control it.. with web or TCP port
You would need to use a http node or a TCP node to do it.. looks pretty simple
Did a quick flow for you.. this should open and close relay 1
Make sure you put the IP address of your board in the TCP node
[{"id":"8319a970.877298","type":"tcp out","z":"eb3d7fa.90ab38","host":"192.168.1.100","port":"1234","beserver":"client","base64":false,"end":true,"name":"","x":450,"y":700,"wires":[]},{"id":"ea489ab5.50ce68","type":"inject","z":"eb3d7fa.90ab38","name":"Open Relay","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"L1\\r\\n","payloadType":"str","x":170,"y":700,"wires":[["8319a970.877298"]]},{"id":"2fb813e6.d4939c","type":"inject","z":"eb3d7fa.90ab38","name":"Close Relay","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"D1\\r\\n","payloadType":"str","x":170,"y":740,"wires":[["8319a970.877298"]]}]
hope that helps!
Thanks, will test when I get home from work
//Baxe
One question only, the idea is that I will control this from my Home seer installation, have the connection ready in Node-Red to Home seer so I know it works, how do I do in Node-Red so that it will be right.
// Baxe
You need to put a debug on virtual device to see what comes out of it.
Then you will need to put a change node in which will change that from its output to L1\n\r for ON and D1\n\r for OFF then it should all work as you wanted it
I get out this when I puch buttons from Homeseer on/off
2021-02-11 06:09:04node: ef12336f.a8582msg.payload : Object
{ ref: 4336, name: "Belysning Biorum", location: "Unknown", location2: "Virtual Device", value: 100 … }
2021-02-11 06:09:08node: ef12336f.a8582msg.payload : Object
{ ref: 4336, name: "Belysning Biorum", location: "Unknown", location2: "Virtual Device", value: 0 … }
Put a change node between your Homeseer and the TCP node and make it look like this
Note: your changing a number to a string
That should work.
Thanks testing when coming home
sorry now i can see the debug properly..
I could be wrong (somebody correct me if i am)
do a function node and put this inside
msg.payload = msg.payload.value
return msg;
Thank you, can you show in more detail where to enter?
//Baxe
before the change node
Why are you putting the code in the function nodes ‘setup’ section and not in the ‘function’ section?
Good question, I know nothing about Node-red, but tested what you said and now it works
Just a question web relay disconnects sometimes, is there any alternative so you can get it to connect before the code is sent?
Tanks
//Baxe
Sorry, I can't help you there. Maybe one of the other posters can.
the TCP port is timing out I would guess.
Change the properties of the TCP node to say "close every connection after message is sent"