The bug causing level events not to be created happens when the setLevel
command runs in the cloud but the Device Type Handler is running locally
in the hub. Since state is not synced from the cloud to the hub the
`state.trigger` value was never set to `"setLevel"` on the hub which means
no level events would be created. The change is to not be reliant on state.
Instead we just don't create level events if the level is 0 since there is
no legitimate way for the level to be 0.
https://smartthings.atlassian.net/browse/DVCSMP-2219
* original Health check implementation did not send refresh() commands to hub and thus the device. This fixes that problem.
* updated() does not have its return value processed as a list of hub commands. These must be sent explicitly
* Explicit returns rock
This adds support for ETI devices which have a firmware bug in which the
binding table is not properly cleared on network leave. So the DTH will
on configure (and refresh) look at the binding table and remove any
entries to not the current hub.
This resolves: https://smartthings.atlassian.net/browse/DVCSMP-2175
Currently these DTHs return null when they parse a message that they
don't have specific handling for. This ends up sending the message up
to the cloud as an event, which prevented us from potentially parsing
that message in the cloud. By instead returning an empty map we can
instead send the message up to the cloud to be parsed there. This
allows us to add handling in the cloud for new message without requiring
and AppEngine deploy for them to work.
This resolves: https://smartthings.atlassian.net/browse/DPROT-200
Many DTHs that are generating battery events use the same bit of
copy/pasted code and in that code over voltage is sent as a battery
event with a value of "--" however, that non-numeric value results in
stack traces. Instead we now report over voltage as 100% battery.
This resolves: https://smartthings.atlassian.net/browse/DVCSMP-2177
Because of the interaction between the DTH running in the cloud and the
one running in appengine, we can't make this change yet as for unupdated
devices the humidity gets replaced with null. So we back out the call
with the new mfgID as there aren't devices out there yet using it.
This relates to: https://smartthings.atlassian.net/browse/DPROT-183
* checkInterval set to 12 min (2 misses + leeway)
* configure a healthPoll every 5 min
* refreshes on/off state, switch level, and white color temperature
* schedule and set interval from either configure() or updated()
* but only once per execution
* ping refreshes level setting
* checkInterval set to 12 min (2 misses + leeway)
* configure a healthPoll every 5 min
* refreshes on/off state, switch level, and white color temperature
* schedule and set interval from either configure() or updated()
* but only once per execution
* ping refreshes level setting