Closed brianjmurrell closed 3 years ago
Yes, I have had an issue with getting disconnected, and ending up in a bad state. Thank you for the tip, I’ll look into this the next time I have some time to do tesing.
-Bendik
As far as I can see, this is already done in igrill.py def run(self)
?
All calls to device.read_temperature() ( and device.read_battery() ) is wrapped a try/except Exception, and on the next cycle the device is reconnected with device = self.device_types[self.type](self.address, self.name)
Am I missing something?
Mine is reconnecting after loosing the connection.
I'm closing this due to inactivity
Hi. Great to see a fork of this great work surviving. Although, if I'm honest, I wish the basic igrill functionality and your mqtt implementation on top of it were separated into separate repos, but it is what it is. I just honestly don't need the mqtt functionality. But I digress.
Do you not find that you can get disconnected from your iGrill periodically? I ended up doing this to deal with it:
As you can see, I've modified
read_temperature
to reconnect if trying to read the temps fails with aBTLEDisconnectError
. Do you think this is is something theiGrill()
class itself could benefit from?