Hi,
with the new binding release I can’t find module:connected, module:connected_since and module:connection_errors possibility to monitor. Do I miss something?
Cheers!
Hi,
with the new binding release I can’t find module:connected, module:connected_since and module:connection_errors possibility to monitor. Do I miss something?
Cheers!
Today I’ve upgraded OpenHab from 2.2 do 2.3, and also observed that there is no module:connected_since and module:connected_since. It was very useful, as in my environment Satel sometimes disconnects from OpenHab (or opposite).
Is there any alternative or way to have such data?
Hey guys.
I removed these features as in OH2 this is easy to achieve that using thing’s status. So you actually can implement such feature for any binding you want. Here is an example:
rule "Connection status changed to ONLINE"
when
Thing "satel:ethm-1:home" changed to ONLINE
then
Satel_Connection.postUpdate(ON)
Satel_ConnSince.postUpdate(new DateTimeType())
Satel_ConnErrors.postUpdate(NULL)
end
rule "Connection status received OFFLINE"
when
Thing "satel:ethm-1:home" received update OFFLINE
then
if (Satel_ConnErrors.state == NULL) {
Satel_Connection.postUpdate(OFF)
Satel_ConnSince.postUpdate(NULL)
Satel_ConnErrors.postUpdate(1)
} else {
val currentState = Satel_ConnErrors.state as DecimalType
Satel_ConnErrors.postUpdate(currentState.intValue + 1)
}
end
I hope it helps
Ok, it worked for me, Thank you
My satel.items
Switch Satel_Connection "Satel Connection [%s]"
DateTime Satel_ConnSince "Connected since [%1$tY-%1$tm-%1$td %1$tH:%1$tM]"
Number Satel_ConnErrors "Errors: [%s]"
Sitemap:
Text item=Satel_Connection
Text item=Satel_ConnSince icon="time"
Text item=Satel_ConnErrors
I believe it is not the best way to do it, but, I’m not programmer, and for now it is enough for me.
Once again, thanks @druciak
Well, I have almost the same items, so this is the right direction.
BTW Is there any feature you would like to have in the Satel Binding?