Wow, seems like a raw sockets connection is the simplest form of communication. If it can do a HTTP Post / Get / Push, you would think it could do a simple socket open, send data, receive data, close socket action.
All the functionality is already there in the HTTP commandset, just need to dumb it down. Most systems are this simple:
Send ASCII command (maybe a null byte at end of command)
This is exactly what is happening if I sniff the
sendHubCommand(new physicalgraph.device.HubAction("""POST ...""", physicalgraph.device.Protocol.LAN, "HexIP"))
command, but with all the extra HTTP overhead.
It would seem that a slight modification or extension to the physicalgraph.device.Protocol.LAN could be added / changed to physicalgraph.device.Protocol.Socket and the response would be parsed out.
This would give ST access to a ton of simple IP based devices on a LAN that don’t have a HTTP API but function far simpler, ie serial control that moved to IP.
Devices include but not limited to:
-Anything over an IP to serial bridge
I’ll try to document it better, but frankly it is so simple, there isn’t much to document.
Maybe the real risk is exposing raw socket capabilities on a cloud connected hub could lead to major issues, but that same risk already exists in modifying the payload of the current HTTP usage.