UDP Datagrams
-
I've implemented this:
https://smarthome.community/topic/20/openluup-version-log/18
into my own MQTT Server and that's cool, since I'm now pushing every variable via MQTT, originating from the Vera.
Just a couple of questions for @akbooer
- do I need to check that sock is connected, from time to time?
- is there anything specifically to retry the command?
I'm running it in the latest hour, and everything seems OK, but I want to code it for the worst situations. Thanks, always inspiring!
-
I've implemented this:
https://smarthome.community/topic/20/openluup-version-log/18
into my own MQTT Server and that's cool, since I'm now pushing every variable via MQTT, originating from the Vera.
Just a couple of questions for @akbooer
- do I need to check that sock is connected, from time to time?
- is there anything specifically to retry the command?
I'm running it in the latest hour, and everything seems OK, but I want to code it for the worst situations. Thanks, always inspiring!
@therealdb said in UPD Datagrams:
do I need to check that sock is connected, from time to time?
No, because there is no permanent connection formed in UDP. If you look on the console System > Server page you can see that it always appears unconnected:
@therealdb said in UPD Datagrams:
is there anything specifically to retry the command?
Again no (if you're meaning that in the context of sending a datagram) becuase there is no way of knowing whether or not it failed to arrive.
How have you selected ALL your Vera variables? (Simply an exhaustive list of possible services?)
-
@therealdb said in UPD Datagrams:
do I need to check that sock is connected, from time to time?
No, because there is no permanent connection formed in UDP. If you look on the console System > Server page you can see that it always appears unconnected:
@therealdb said in UPD Datagrams:
is there anything specifically to retry the command?
Again no (if you're meaning that in the context of sending a datagram) becuase there is no way of knowing whether or not it failed to arrive.
How have you selected ALL your Vera variables? (Simply an exhaustive list of possible services?)
-
So, I've left it running all the night and it's pushing things like a pro to my MQTT broker.
Bonus points:
- I've finally migrated my dashboard to WebSockets, instead of long-polling. I can't finish to press a button that the UI is updated. Brilliant!
- I've finally rewritten my own VeraBridge in C#, so no polling and less CPU usage on my Vera
- I'll probably port more things to my C# app, at this point, since I now have sub-second updates of variables
- I modified other parts where I was calling http endpoints from my Vera, to push UDP datagrams.
I still must find some time to fully test openLuup's MQTT broker, but @akbooer you already gave me a lot of inspiration, as always. Thanks!