Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin will stop updating domoticz if Airly sensor is not reachable #1

Closed
mstojek opened this issue Nov 10, 2017 · 1 comment
Closed
Assignees
Labels

Comments

@mstojek
Copy link

mstojek commented Nov 10, 2017

If Airly sensor connection fails plugin will never update Domoticz since we set variable self.inProgress = True and never change it to False.

Proposed fix in function OnHeartbeat around line 360:
except SensorNotFoundException as snfe:
self.inProgress = False
Domoticz.Error(("Sensor id (%(sensor_id)d) not exists") % {'sensor_id': int(Parameters["Mode2"])})
except UnauthorizedException as ue:
self.inProgress = False
Domoticz.Error(
("Not authorized"))

As you can see I added "self.inProgress = False" when exception is caught.

@lrybak lrybak added the bug label Nov 19, 2017
@lrybak lrybak self-assigned this Nov 19, 2017
@lrybak
Copy link
Owner

lrybak commented Nov 19, 2017

Hello,
Thanks for reporting the issue. It's fixed already in v0.2.
self.inProgress is set to False in the 'finally' block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants