Problem occurs with the WIFI reading, by no means it shows the wifi data, it looks like there is a problem with the transformationPattern. When it is more then 1 level ‘deep’ (like Wifi.RSSI), it does not decode it.
After a lot of testing and restarting, it looks like it has to do with defining Items:
As soon as it is an number, it cannot be linked anymore to a channel.
Thing mqtt:topic:son192 "Sonoff192" (mqtt:broker:mybroker) {
Channels:
Type switch : outlet "Output" [ stateTopic="stat/sonoff192/POWER", commandTopic="cmnd/sonoff192/POWER", on="ON", off="OFF"]
Type string : status "Status" [ stateTopic="tele/sonoff192/LWT"]
Type number : vcc "Vcc" [ stateTopic="tele/sonoff192/STATE", transformationPattern="JSONPATH:$.Vcc"]
Type string : uptime "Uptime" [ stateTopic="tele/sonoff192/STATE", transformationPattern="JSONPATH:$.Uptime"]
Type number : wifi "Wifi" [ stateTopic="tele/sonoff192/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
Type number : today "Energy Today" [ stateTopic="tele/sonoff192/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Today"]
Type number : voltage "Voltage" [ stateTopic="tele/sonoff192/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Voltage"]
Type number : current "Current" [ stateTopic="tele/sonoff192/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Current"]
Type number : period "Energy Period" [ stateTopic="tele/sonoff192/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Period"]
}
frontail (filtered on 192):
2019-02-01 17:06:11.803 [me.event.ThingUpdatedEvent] - Thing 'mqtt:topic:son192' has been updated.
2019-02-01 17:06:23.757 [vent.ItemStateChangedEvent] - sonoff192_Uptime changed from UNDEF to 0T00:10:14
2019-02-01 17:06:23.773 [vent.ItemStateChangedEvent] - mqtt_topic_son192_wifi changed from UNDEF to 82
2019-02-01 17:06:23.776 [vent.ItemStateChangedEvent] - mqtt_topic_son192_vcc changed from UNDEF to 3.244
2019-02-01 17:06:23.817 [vent.ItemStateChangedEvent] - mqtt_topic_son192_voltage changed from UNDEF to 0.0
2019-02-01 17:06:23.829 [vent.ItemStateChangedEvent] - mqtt_topic_son192_current changed from UNDEF to 0.0
2019-02-01 17:06:23.835 [vent.ItemStateChangedEvent] - mqtt_topic_son192_today changed from UNDEF to 0.176
2019-02-01 17:06:34.423 [ome.event.ItemCommandEvent] - Item 'sonoff192_Switch' received command ON
2019-02-01 17:06:34.476 [nt.ItemStatePredictedEvent] - sonoff192_Switch predicted to become ON
2019-02-01 17:06:34.544 [vent.ItemStateChangedEvent] - sonoff192_Switch changed from UNDEF to ON
2019-02-01 17:06:37.807 [vent.ItemStateChangedEvent] - mqtt_topic_son192_voltage changed from 0.0 to 233.5
2019-02-01 17:06:37.810 [vent.ItemStateChangedEvent] - mqtt_topic_son192_current changed from 0.0 to 0.098
2019-02-01 17:06:39.258 [ome.event.ItemCommandEvent] - Item 'sonoff192_Switch' received command OFF
2019-02-01 17:06:39.268 [nt.ItemStatePredictedEvent] - sonoff192_Switch predicted to become OFF
2019-02-01 17:06:39.306 [vent.ItemStateChangedEvent] - sonoff192_Switch changed from ON to OFF
2019-02-01 17:06:41.331 [ome.event.ItemCommandEvent] - Item 'sonoff192_Switch' received command ON
2019-02-01 17:06:41.339 [nt.ItemStatePredictedEvent] - sonoff192_Switch predicted to become ON
2019-02-01 17:06:41.357 [vent.ItemStateChangedEvent] - sonoff192_Switch changed from OFF to ON
2019-02-01 17:08:12.530 [vent.ItemStateChangedEvent] - sonoff192_Status changed from Online to Offline
2019-02-01 17:08:12.533 [vent.ItemStateChangedEvent] - sonoff192_Status changed from Offline to Online
2019-02-01 17:08:21.959 [vent.ItemStateChangedEvent] - sonoff192_Uptime changed from 0T00:10:14 to 0T00:00:13
2019-02-01 17:08:21.965 [vent.ItemStateChangedEvent] - mqtt_topic_son192_wifi changed from 82 to 80
2019-02-01 17:08:21.971 [vent.ItemStateChangedEvent] - mqtt_topic_son192_vcc changed from 3.244 to 3.243
2019-02-01 17:08:22.135 [vent.ItemStateChangedEvent] - mqtt_topic_son192_voltage changed from 233.5 to 234.6
2019-02-01 17:08:22.143 [vent.ItemStateChangedEvent] - mqtt_topic_son192_current changed from 0.098 to 0.105
I’m using JSONPATH in other bindings (MQTT 1.x) and there it works fine.
The log doesn’t help as we do not the see the part where the item linking happens.
Could you please lookup in Paper UI if the channels are indeed linked? We need to find out if it is a binding issue, an openHAB core issue or an xtend .items file parser issue.
Linking happens when the .item file parser detects those statements: { channel = "mqtt:topic:mybroker:son192:outlet"}. If you misspell channels or the parser encountered any other problems, links will not be created and silently ignored.
I’m not a big fan of those ancient .items files so can’t help any further unfortunately.