Closed mag1024 closed 2 years ago
Thanks! I'm reviewing the code now.
How have you tested these changes?
Are you planning on updated the config_flow in HA with options? If so, please use the current values for TX and heartbeat as the default.
I tested by running a local Home Assistant instance with a hacked up upb integration -- I guess I'll need to upstream those changes as well. Seems like these kind of parameters might be better off as an Options rather than a Config flow. Either way will keep the tx count defaulting to 1 -- and won't expose the deadline explicitly at all. Might just make a "flags" text box.
Sounds good. Options is right on. I'm OK if you just expose TX count. Probably should not expose flags as a general field is my sense. I'll look some more at the code over the weekend... no time to review right now. If you get started on the option(s) in HA I'll see that code too. Thanks again!
Thanks!
I just published 0.5 to PyPi. I have reviewed the code and seems OK. I'm not in a position to test the on my UPB network until later this week, so I relying on you to test.
tx count of 2 seems to be required for the devices on my network to respond. I don't know for sure, but I suspect it is related to the presence of a repeater. I found this oblique reference in the some repeater documentation that corroborates this theory:
While I was at it, I also added the ability to configure the heartbeat timeout for TCP as requested in #5. It was also triggering for me spuriously.
Closes #5