sendHubCommand to send HTTP GET or TCP

Hello all, first post. I’ve read the various threads about not being able to parse responses from HTTP GET requests or TCP messages from other network devices, but that’s fine for me.

All I am trying to do is send a TCP message (or HTTP request) to a Nodered server running on a RaspberryPi inside my LAN.

I understand I need to use sendHubCommand since the device is inside my LAN and doesn’t have any WAN IP exposed. I’ve also read the posts about how to cobble together the payload for ‘sendHubCommand’. But my question is this: the IP address I need to send to is in the form 192.168.X.Y:1880/path. I can see how (I hope) to define and convert to hex the IP and port, but I’ve not seen any examples of also using the path. (And my skills are limited to copy-pasting other people’s work!)

Appreciate any help here…

See this

Thanks for the pointer RBoy. In the end I found a NodeRed add-on that did what I needed quite neatly. The NR node is here:

And the code for the SmartApp that pairs with it is here: