Node Red TCP connection to Helvar DALI router

630 views
Skip to first unread message

Alberto Gazzin

unread,
Jan 11, 2017, 3:38:44 AM1/11/17
to Node-RED

Hi all,
I need to push HelvarNet (example of ASCII string for request a firmware version to router: >V:1,C:191#) string to Helvar DALI Router.
I use the TCP-in connection block and I set the IP of my Helvar Router. The block show me "Connected". At the input of this block i put the inject block with ASCII command >V:1,C:191# as string payload type.
I put the TCP-out block and I set the IP of my Helvar Router. The block show me "Connected". I connect the output of TCP-out block with debug block for read the response from my Helvar Router. It should be ?V=1,C=1, but nothing appear in debug window.


Where I have a mistake?
Many thanks for your help!

Mark Setrem

unread,
Jan 11, 2017, 5:03:40 AM1/11/17
to Node-RED
So unless your tcp-in node receives something the flow won't trigger.

Have you tried splitting your flow?

[Inject]---[function]---[tcp-out]

And a second flow

[tcp-in]---[debug]

You can then control when the flow starts and receive any messages coming back

Dave C-J

unread,
Jan 11, 2017, 5:13:45 AM1/11/17
to node...@googlegroups.com
Or indeed - have you tried the tcp-request node - as that may be more suitable for this sort fo request/response type of interaction....

Alberto Gazzin

unread,
Jan 13, 2017, 4:37:57 PM1/13/17
to Node-RED
Hi all!
thank you for your response!!

I test the Mark Setrem way. I split the flow:


[Inject]---[function]---[tcp-out]


the [function block] contain:


msg.payload=msg.payload + '\n';
return msg;


And a second flow


[tcp-in]---[debug]



I run WireShark and i can see that the Helvar Router send to my PC (where node-red is installed) the correct response to my [tcp-out] request, but i can't see that in debug window on node-red.

I check the TCP-IN configuration and it's correct ("Connect to" port "50000" at host 192.168.xxx.xxx - Output "single" "string" payload(s)). I have tested all the possible configuration in [tcp-in] node, but doesn't work!


Any ideas?


Many thanks!


Mark Setrem

unread,
Jan 13, 2017, 4:41:07 PM1/13/17
to Node-RED

I'd try the way Dave C-J suggested I had forgotten that node existed.

Alberto Gazzin

unread,
Jan 13, 2017, 6:02:37 PM1/13/17
to Node-RED
Well done!!!
The Dave C-J solution works well for me!!
 After TCP request block i have insert a function with msg.payload=msg.payload.toString ('utf8') for convert the HEX value to ASCII String
.
Many thanks to all!!
Bye!
Reply all
Reply to author
Forward
0 new messages