I'm using the port 39501 support for sending messages into a device on my Hubitat from another (arduino-based) device. I suspect the answer is no, but I was curious if keep-alive is meant to work for 39501 (so that some of my GETs could be served without reopening the TCP connection.)
Again, I think the answer is no, and I would maybe even guess that is by-design, but if this is meant to work I would try to figure out what I am doing wrong. Anybody know for sure?
1 Like
I have a little experience with this as I wrote the Tasmota Sync drivers. I donβt know what is happening under the covers but the Tasmota device could be idle for 24 hours and then send info to 39501 and it would get routed into the parse() function of the device driver that matched the MAC address without any preliminary commands.
There was never any need to open a port in my implementation but this was slightly abstracted so itβs not guaranteed but my guess is you just send to that port and its up to the driver to decide what to do.
Oh, yeah, I don't have any problem with the port not being open or the Hubitat not responding, so I'm happy to leave well-enough alone. Given the occasional chattiness of communication I just feel like I ought to reuse the connection if I can. Seems like they don't support it and I should just stay happily unoptimized.
IIRC, by the way, I think I stole this idea for arduino-to-hubitat-via-http from you and borrowed mercilessly from your tasmota code. (This let me no longer need to keep a home assistant box running just to have an MQTT broker, so thank you, @garyjmilne.)
2 Likes