Hi there, for almost one year, trying to STARTUP my smarthome APPLICATION … up today I was able to find every solution in this rich community, but today I am stuck.
I’ve got SERIAL BINDING WORKING perfect, but I would like to do some IMPROVMENTS:
All the examples in the README do not put a space between the , and the REGEX. Beyond that I always assumed that the REGEX was for incoming data, not to parse outgoing data.
An alternative way to implement this, assuming that the REGEX won’t work at all once you remove the space, is to use one Item to represent the Serial link to ttyUSB0 and use Proxy Items and Rules to control what gets published to the device.
2019-12-24 20:01:24.751 [thome.event.ItemStateEvent] - UPS_Current updated to 6380
2019-12-24 20:01:24.793 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF
2019-12-24 20:01:24.815 [vent.ItemStateChangedEvent] - UPS_Current changed from 6305 to 6380
2019-12-24 20:01:24.842 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12472
2019-12-24 20:01:24.856 [vent.ItemStateChangedEvent] - UPS_Voltage changed from 12516 to 12472
2019-12-24 20:01:26.253 [thome.event.ItemStateEvent] - UPS_Current updated to 6180
2019-12-24 20:01:26.290 [vent.ItemStateChangedEvent] - UPS_Current changed from 6380 to 6180
2019-12-24 20:01:26.307 [thome.event.ItemStateEvent] - Main_Power_220 updated to OFF
2019-12-24 20:01:26.341 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12492
2019-12-24 20:01:26.354 [vent.ItemStateChangedEvent] - UPS_Voltage changed from 12472 to 12492
2019-12-24 20:01:27.754 [thome.event.ItemStateEvent] - UPS_Current updated to 4640
2019-12-24 20:01:27.791 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-24 20:01:27.841 [vent.ItemStateChangedEvent] - UPS_Current changed from 6180 to 4640
2019-12-24 20:01:27.859 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12720
2019-12-24 20:01:27.876 [vent.ItemStateChangedEvent] - UPS_Voltage changed from 12492 to 12720
2019-12-24 20:01:29.255 [thome.event.ItemStateEvent] - UPS_Current updated to -122
2019-12-24 20:01:29.304 [thome.event.ItemStateEvent] - Main_Power_220 updated to ON
2019-12-24 20:01:29.345 [thome.event.ItemStateEvent] - UPS_Voltage updated to 12744
2019-12-24 20:01:29.361 [vent.ItemStateChangedEvent] - UPS_Current changed from 4640 to -122
as we can see data parced correctle bu why item Main_Power_220 updated not changed from OFF to ON?
this is sitemap:
Group item=Hardware label="UPS" icon="heating" {
Text item=UPS_Current
Text item=UPS_Voltage
Switch item=Main_Power_220 valuecolor=[Main_Power_220=="ON"="red",Main_Power_220=="OFF"="black"]
}
UPS_Current and UPS_Voltage displayed fine. But Main_Power_220V does not change depending on item state. @rlkoshak