Hello guys!
I have a problem which makes me completely stucked, and start to drive me crazy
So, I migrated to openhab2.5 (latest openhabian 32bit) with the new mqttv2 binding from 2.3 and mqtt1. I think I have set up everything correctly.
Mosquitto, zigbee2mqtt are running, Openhab is communicating with them, I can switch sonoff/tasmota switches on/off.
My problem is, that openhab simply donât want to read the sensors, and any other datas, like wifi, ipaddress of sonoffs, etc. It not reads the zigbee2mqtt sensors, and not even the temperature and humidity sensors of a Sonoff TH16. But it can read the switch state of the same sonoff, and can turn it on and off.
There is no error in openhab log, or in mosquitto log
What I tried:
- reinstall
- used one broker for all
- used transformations in .things
- used mqtt without user/pass
- used only one sonoff_TH16 and try to get the temperature
- sacreficed a female goat on the top of the highest mountain in my country
- reinstall
- using different version of JAVA (now it is Zulu8 32bit)
- tried different topic, channel namings
I donât know if it is related with my things/items files, but here they are. I hope someone can help, or at least have faced with this kind of problem before.
sonoff.things
Bridge mqtt:broker:sonoff "MQTT Sonoff Broker"
[
host="localhost",
username="......",
password="......",
clientID="openHAB2sonoff",
port=1883,
secure=false
]
{
// Spajz venti
Thing topic sonoff_TH16_01 "Sonoff - SpĂĄjz szellĆzĂ©s" (mqtt:broker:sonoff) {
Channels:
Type switch : VentiSwitch "SpĂĄjz szellĆzĆ" [
stateTopic="stat/sonoff_TH16_01/POWER",
commandTopic="cmnd/sonoff_TH16_01/POWER",
on="ON",
off="OFF"
]
Type number : Temperature "HĆmĂ©rsĂ©klet" [
stateTopic="tele/sonoff_TH16_01/SENSOR/AM2301.Temperature"
]
Type number : Humidity "PĂĄratartalom" [
stateTopic="tele/sonoff_TH16_01/SENSOR/AM2301.Humidity"
]
// KarbantartĂĄs
Type string : Reachable "STH16_01 ĂĄllapot" [
stateTopic="tele/sonoff_TH16_01/LWT", transformationPattern="MAP:reachable.map"
]
Type string : MacAddress "STH16_01 MAC Address" [
stateTopic="stat/sonoff_TH16_01/STATUS5/StatusNET.Mac"
]
Type string : IPAddress "STH16_01 IP Address" [
stateTopic="stat/sonoff_TH16_01/STATUS5/StatusNET.IPAddress"
]
Type number : WifiPower "STH16_01 Wifi power" [
stateTopic="tele/sonoff_TH16_01/STATE/Wifi.RSSI"
]
}
// PadlĂĄs villany
Thing topic sonoff_basic01 "Sonoff - PadlĂĄs vilĂĄgĂtĂĄs" (mqtt:broker:sonoff) {
Channels:
Type switch : LightSwitch "PadlĂĄs villany" [
stateTopic="stat/sonoff_basic01/POWER",
commandTopic="cmnd/sonoff_basic01/POWER",
on="ON",
off="OFF"
]
// KarbantartĂĄs
Type string : Reachable "PadlĂĄs SB01 ĂĄllapot" [
stateTopic="tele/sonoff_basic01/LWT", transformationPattern="MAP:reachable.map"
]
Type string : MacAddress "SB01 MAC Address" [
stateTopic="stat/sonoff_basic01/STATUS5/StatusNET.Mac"
]
Type string : IPAddress "SB01 IP Address" [
stateTopic="stat/sonoff_basic01/STATUS5/StatusNET.IPAddress"
]
Type number : WifiPower "SB01 Wifi power" [
stateTopic="tele/sonoff_basic01/STATE/Wifi.RSSI"
]
}
Thing topic sonoff_basic02 "Sonoff - CsengĆ relĂ©" (mqtt:broker:sonoff) {
Channels:
Type switch : Csengo "CsengĆ relĂ©" [
stateTopic="stat/sonoff_basic02/POWER",
commandTopic="cmnd/sonoff_basic02/POWER",
on="ON",
off="OFF"
]
// KarbantartĂĄs
Type string : Reachable "CsengĆ SB02 ĂĄllapot" [
stateTopic="tele/sonoff_basic02/LWT", transformationPattern="MAP:reachable.map"
]
Type string : MacAddress "SB02 MAC Address" [
stateTopic="stat/sonoff_basic02/STATUS5/StatusNET.Mac"
]
Type string : IPAddress "SB02 IP Address" [
stateTopic="stat/sonoff_basic02/STATUS5/StatusNET.IPAddress"
]
Type number : WifiPower "SB02 Wifi power" [
stateTopic="tele/sonoff_basic02/STATE/Wifi.RSSI"
]
}
// FĂŒrdĆ fƱtĂ©s
Thing topic sonoff_S26_01 "Sonoff - FĂŒrdĆ radiĂĄtor" (mqtt:broker:sonoff) {
Channels:
Type switch : HeatSwitch "FĂŒrdĆ radiĂĄtor" [
stateTopic="stat/sonoff_S26_01/POWER",
commandTopic="cmnd/sonoff_S26_01/POWER",
on="ON",
off="OFF"
]
// KarbantartĂĄs
Type string : Reachable "FĂŒrdĆ S26_01 ĂĄllapot" [
stateTopic="tele/sonoff_S26_01/LWT", transformationPattern="MAP:reachable.map"
]
Type string : MacAddress "S26_01 MAC Address" [
stateTopic="stat/sonoff_S26_01/STATUS5/StatusNET.Mac"
]
Type string : IPAddress "S26_01 IP Address" [
stateTopic="stat/sonoff_S26_01/STATUS5/StatusNET.IPAddress"
]
Type number : WifiPower "S26_01 Wifi power" [
stateTopic="tele/sonoff_S26_01/STATE/Wifi.RSSI"
]
}
}
sonoff.items
//padlĂĄs sonoff_basic01
Switch padlasvillany "Be/Ki" <light> (gLight) { channel="mqtt:topic:sonoff:sonoff_basic01:LightSwitch" }
//KarbantartĂĄs
String SB01_live "sonoff_basic01 (padlĂĄs) ĂĄllapot" (gReachable) { channel="mqtt:topic:sonoff:sonoff_basic01:Reachable" }
String SB01_MACaddress "SB01 MAC: [%s]" <sonoff_basic> { channel="mqtt:topic:sonoff:sonoff_basic01:MacAddress" }
String SB01_ip "SB01 IP: [%s]" <sonoff_basic> { channel="mqtt:topic:sonoff:sonoff_basic01:IPAddress" }
Number SB01_wifi "SB01 Wifi [%d %%]" <network> (gWifi) { channel="mqtt:topic:sonoff:sonoff_basic01:WifiPower" }
//csengĆ sonoff_basic02
Switch Doorbell "AjtĂłcsengĆ teszt" (gbell) {ihc="0x33c311", autoupdate="false"}
Switch Doorbell_state (gbell) {ihc="0x33c312"}
Switch csengo "SB02 power ĂĄllapot" <light> (gLight) { channel="mqtt:topic:sonoff:sonoff_basic02:Csengo", autoupdate="false" }
//KarbantartĂĄs
String SB02_live "sonoff_basic02 (csengĆ) ĂĄllapot" (gReachable) { channel="mqtt:topic:sonoff:sonoff_basic02:Reachable" }
String SB02_MACaddress "SB02 MAC: [%s]" <sonoff_basic> { channel="mqtt:topic:sonoff:sonoff_basic02:MacAddress" }
String SB02_ip "SB02 IP: [%s]" <sonoff_basic> { channel="mqtt:topic:sonoff:sonoff_basic02:IPAddress" }
Number SB02_wifi "SB02 Wifi [%d %%]" <network> (gWifi) { channel="mqtt:topic:sonoff:sonoff_basic02:WifiPower" }
//spĂĄjz TH16_01
Switch spajzventi "Be/Ki" <fan_box> (gVenti) { channel="mqtt:topic:sonoff:sonoff_TH16_01:VentiSwitch" }
//Szenzor
Number spajzhofok "HĆmĂ©rsĂ©klet [%.1f °C]" <temperature> (gTemp) { channel="mqtt:topic:sonoff:sonoff_TH16_01:Temperature" }
Number spajzparatartalom "PĂĄratartalom [%.1f %%]" <humidity> (gHumi) { channel="mqtt:topic:sonoff:sonoff_TH16_01:Humidity" }
//nyomĂłgombhoz:
Switch spajzvent_gomb "SzellĆztetĂ©s" (gVenti) {ihc="0x33c311", autoupdate="false"}
Switch spajzvent_gomb_state (gVenti) {ihc="0x33c312"}
//szellĆzĂ©s ideje
Number szellozido "SzellĆztetĂ©s idĆtartama (perc) [%d]" <time> (gIdozites)
//KarbantartĂĄs
String STH16_01_live "sonoff_TH16_01 (SpĂĄjz venti) ĂĄllapot" (gReachable) { channel="mqtt:topic:sonoff:sonoff_TH16_01:Reachable" }
String STH16_01_MACaddress "STH16_01 MAC: [%s]" <sonoff_basic> {channel=" mqtt:topic:sonoff:sonoff_TH16_01:MacAddress" }
String STH16_01_ip "STH16_01 IP: [%s]" <sonoff_basic> { channel="mqtt:topic:sonoff:sonoff_TH16_01:IPAddress" }
Number STH16_01_wifi "STH16_01 Wifi [%d %%]" <network> (gWifi) { channel="mqtt:topic:sonoff:sonoff_TH16_01:WifiPower" }
//fĂŒrdĆ S26_01
Switch furdofutes "Be/Ki" <radiator> (gFutes) { channel="mqtt:topic:sonoff:sonoff_S26_01:HeatSwitch" }
//nyomĂłgombhoz:
Switch furdofutes_gomb "FƱtés" (gFutes) {ihc="0x33c311", autoupdate="false"}
Switch furdofutes_gomb_state (gFutes) {ihc="0x33c312"}
//szellĆzĂ©s ideje
Number furdofutesido "FƱtĂ©s idĆtartama (perc) [%d]" <time> (gIdozites)
//KarbantartĂĄs
String S26_01_live "sonoff_S26_01 (F. radiĂĄtor) ĂĄllapot" (gReachable) { channel="mqtt:topic:sonoff:sonoff_S26_01:Reachable" }
String S26_01_MACaddress "S26_01 MAC: [%s]" <sonoff_basic> { channel="mqtt:topic:sonoff:sonoff_S26_01:MacAddress" }
String S26_01_ip "S26_01 IP: [%s]" <sonoff_basic> { channel="mqtt:topic:sonoff:sonoff_S26_01:IPAddress" }
Number S26_01_wifi "S26_01 Wifi [%d %%]" <network> (gWifi) { channel="mqtt:topic:sonoff:sonoff_S26_01:WifiPower" }
aqara.things
Bridge mqtt:broker:aqara "MQTT Aqara Broker"
[
host="localhost",
username="......",
password="......",
clientID="openHAB2aqara",
port=1883,
secure=false
]
{
Thing topic zigbeeMQTT "Zigbee2mqtt" {
Channels:
Type switch : permitJoin [ stateTopic="zigbee2mqtt/bridge/config/permit_join", on="true", off="false" ]
Type string : state [ stateTopic="zigbee2mqtt/bridge/state" ]
Type string : logType [ stateTopic="zigbee2mqtt/bridge/log", transformationPattern="JSONPATH:$.type" ]
Type string : logMessage [ stateTopic="zigbee2mqtt/bridge/log", transformationPattern="JSONPATH:$.message" ]
}
Thing topic AqaraHT01 "Aqara - HT01 - Nappali környezeti szenzor" {
Channels:
Type number : Temperature "HĆmĂ©rsĂ©klet" [
stateTopic="zigbee2mqtt/HT01/temperature"
]
Type number : Humidity "PĂĄratartalom" [
stateTopic="zigbee2mqtt/HT01/humidity"
]
Type number : Pressure "LĂ©gnyomĂĄs" [
stateTopic="zigbee2mqtt/HT01/pressure"
]
// KarbantartĂĄs
Type number : Voltage "Elem feszĂŒltsĂ©g" [
stateTopic="zigbee2mqtt/HT01/voltage"
]
Type number : Battery "Elem töltöttség" [
stateTopic="zigbee2mqtt/HT01/battery"
]
Type number : Linkquality "JelerĆssĂ©g" [
stateTopic="zigbee2mqtt/HT01/linkquality"
]
}
Thing topic AqaraHT02 "Aqara - HT02 - FĂŒrdĆ környezeti szenzor" {
Channels:
Type number : Temperature "HĆmĂ©rsĂ©klet" [
stateTopic="zigbee2mqtt/HT02/temperature"
]
Type number : Humidity "PĂĄratartalom" [
stateTopic="zigbee2mqtt/HT02/humidity"
]
Type number : Pressure "LĂ©gnyomĂĄs" [
stateTopic="zigbee2mqtt/HT02/pressure"
]
// KarbantartĂĄs
Type number : Voltage "Elem feszĂŒltsĂ©g" [
stateTopic="zigbee2mqtt/HT02/voltage"
]
Type number : Battery "Elem töltöttség" [
stateTopic="zigbee2mqtt/HT02/battery"
]
Type number : Linkquality "JelerĆssĂ©g" [
stateTopic="zigbee2mqtt/HT02/linkquality"
]
}
Thing topic AqaraHT03 "Aqara - HT03 - Udvari környezeti szenzor" {
Channels:
Type number : Temperature "HĆmĂ©rsĂ©klet" [
stateTopic="zigbee2mqtt/HT03/temperature"
]
Type number : Humidity "PĂĄratartalom" [
stateTopic="zigbee2mqtt/HT03/humidity"
]
Type number : Pressure "LĂ©gnyomĂĄs" [
stateTopic="zigbee2mqtt/HT03/pressure"
]
// KarbantartĂĄs
Type number : Voltage "Elem feszĂŒltsĂ©g" [
stateTopic="zigbee2mqtt/HT03/voltage"
]
Type number : Battery "Elem töltöttség" [
stateTopic="zigbee2mqtt/HT03/battery"
]
Type number : Linkquality "JelerĆssĂ©g" [
stateTopic="zigbee2mqtt/HT03/linkquality"
]
}
Thing topic AqaraWL01 "Aqara - WL01 - FĂŒrdĆszobai csĆtörĂ©s szenzor" {
Channels:
Type switch : Leakage "CsĆtörĂ©s" [
stateTopic="zigbee2mqtt/WL01/water_leak", on="true", off="false"
]
// KarbantartĂĄs
Type number : Voltage "Elem feszĂŒltsĂ©g" [
stateTopic="zigbee2mqtt/WL01/voltage"
]
Type number : Battery "Elem töltöttség" [
stateTopic="zigbee2mqtt/WL01/battery"
]
Type number : Linkquality "JelerĆssĂ©g" [
stateTopic="zigbee2mqtt/WL01/linkquality"
]
}
Thing topic AqaraWL02 "Aqara - WL02 - SzuterĂ©n csĆtörĂ©s szenzor" {
Channels:
Type switch : Leakage "CsĆtörĂ©s" [
stateTopic="zigbee2mqtt/WL02/water_leak", on="true", off="false"
]
// KarbantartĂĄs
Type number : Voltage "Elem feszĂŒltsĂ©g" [
stateTopic="zigbee2mqtt/WL02/voltage"
]
Type number : Battery "Elem töltöttség" [
stateTopic="zigbee2mqtt/WL02/battery"
]
Type number : Linkquality "JelerĆssĂ©g" [
stateTopic="zigbee2mqtt/WL02/linkquality"
]
}
Thing topic AqaraMS01 "Aqara - MS01 - BejĂĄrati 1. mozgĂĄs Ă©rzĂ©kelĆ" {
Channels:
Type switch : Occupancy "MozgĂĄs" [
stateTopic=" zigbee2mqtt/MS01", transformationPattern="JS:getZigbeeOccupancy2Switch.js",
on="true",
off="false"
]
Type number : Illuminance "FĂ©nyerĆ" [
stateTopic = "zigbee2mqtt/MS01/illuminance"
]
// KarbantartĂĄs
Type number : Voltage "Elem feszĂŒltsĂ©g" [
stateTopic="zigbee2mqtt/MS01/voltage"
]
Type number : Battery "Elem töltöttség" [
stateTopic="zigbee2mqtt/MS01/battery"
]
Type number : Linkquality "JelerĆssĂ©g" [
stateTopic="zigbee2mqtt/MS01/linkquality"
]
}
}
aqara.items
// Control zigbee2mqtt
Group gZigbeeMQTT "Zigbee2mqtt"
String ZigbeeState "Zigbee2mqtt state" <switch> (gZigbeeMQTT) { channel="mqtt:topic:myMQTTBroker:zigbeeMQTT:state" }
Switch ZigbeePermitJoin "Permit join new devices" <switch> (gZigbeeMQTT) { channel="mqtt:topic:myMQTTBroker:zigbeeMQTT:permitJoin" }
String ZigbeeLogType "Zigbee2mqtt log type" (gZigbeeMQTT) { channel="mqtt:topic:myMQTTBroker:zigbeeMQTT:logType" }
String ZigbeeLogMessage "Zigbee2mqtt log message" (gZigbeeMQTT) { channel="mqtt:topic:myMQTTBroker:zigbeeMQTT:logMessage" }
//Nappali szenzor
Number HT01_Temperature "HĆmĂ©rsĂ©klet [%.1f °C]" <temperature> (gTemp) { channel="mqtt:topic:aqara:AqaraHT01:Temperature" }
Number HT01_Humidity "PĂĄratartalom [%d %%]" <humidity> (gHumi) { channel="mqtt:topic:aqara:AqaraHT01:Humidity" }
Number HT01_Pressure "LĂ©gnyomĂĄs [%d mbar]" <pressure> (gPres) { channel="mqtt:topic:aqara:AqaraHT01:Pressure" }
Number HT01_Voltage "TĂĄpfeszĂŒltsĂ©g [%d mV]" <energy> (gVolt) { channel="mqtt:topic:aqara:AqaraHT01:Voltage" }
Number HT01_Battery "Töltöttség [%.1f %%]" <battery> (gEnerg) { channel="mqtt:topic:aqara:AqaraHT01:Battery" }
Number HT01_Linkquality "JelerĆssĂ©g (max. 180) [%d]" <network> (gZigBeeWifi) { channel="mqtt:topic:aqara:AqaraHT01:Linkquality" }
//FĂŒrdĆszobai szenzor
Number HT02_Temperature "HĆmĂ©rsĂ©klet [%.1f °C]" <temperature> (gTemp) { channel="mqtt:topic:aqara:AqaraHT02:Temperature" }
Number HT02_Humidity "PĂĄratartalom [%d %%]" <humidity> (gHumi) { channel="mqtt:topic:aqara:AqaraHT02:Humidity" }
Number HT02_Pressure "LĂ©gnyomĂĄs [%d mbar]" <pressure> (gPres) { channel="mqtt:topic:aqara:AqaraHT02:Pressure" }
Number HT02_Voltage "TĂĄpfeszĂŒltsĂ©g [%d mV]" <energy> (gVolt) { channel="mqtt:topic:aqara:AqaraHT02:Voltage" }
Number HT02_Battery "Töltöttség [%.1f %%]" <battery> (gEnerg) { channel="mqtt:topic:aqara:AqaraHT02:Battery" }
Number HT02_Linkquality "JelerĆssĂ©g (max. 180) [%d]" <network> (gZigBeeWifi) { channel="mqtt:topic:aqara:AqaraHT02:Linkquality" }
//Udvari szenzor
Number HT03_Temperature "HĆmĂ©rsĂ©klet [%.1f °C]" <temperature> (gTemp) { channel="mqtt:topic:aqara:AqaraHT03:Temperature" }
Number HT03_Humidity "PĂĄratartalom [%d %%]" <humidity> (gHumi) { channel="mqtt:topic:aqara:AqaraHT03:Humidity" }
Number HT03_Pressure "LĂ©gnyomĂĄs [%d mbar]" <pressure> (gPres) { channel="mqtt:topic:aqara:AqaraHT03:Pressure" }
Number HT03_Voltage "TĂĄpfeszĂŒltsĂ©g [%d mV]" <energy> (gVolt) { channel="mqtt:topic:aqara:AqaraHT03:Voltage" }
Number HT03_Battery "Töltöttség [%.1f %%]" <battery> (gEnerg) { channel="mqtt:topic:aqara:AqaraHT03:Battery" }
Number HT03_Linkquality "JelerĆssĂ©g (max. 180) [%d]" <network> (gZigBeeWifi) { channel="mqtt:topic:aqara:AqaraHT03:Linkquality" }
//FĂŒrdĆszobai vĂzfolyĂĄs Ă©rzĂ©kelĆ
Switch WL01_Leakage "CsĆtörĂ©s [%s]" <flow> (gAlarm) { channel="mqtt:topic:aqara:AqaraWL01:Leakage" }
Number WL01_Voltage "TĂĄpfeszĂŒltsĂ©g [%d mV]" <energy> (gVolt) { channel="mqtt:topic:aqara:AqaraWL01:Voltage" }
Number WL01_Battery "Töltöttség [%.1f %%]" <battery> (gEnerg) { channel="mqtt:topic:aqara:AqaraWL01:Battery" }
Number WL01_Linkquality "JelerĆssĂ©g (max. 180) [%d]" <network> (gZigBeeWifi) { channel="mqtt:topic:aqara:AqaraWL01:Linkquality" }
//SzuterĂ©n vĂzfolyĂĄs Ă©rzĂ©kelĆ
Switch WL02_Leakage "CsĆtörĂ©s [%s]" <flow> (gAlarm) { channel="mqtt:topic:aqara:AqaraWL02:Leakage" }
Number WL02_Voltage "TĂĄpfeszĂŒltsĂ©g [%d mV]" <energy> (gVolt) { channel="mqtt:topic:aqara:AqaraWL02:Voltage" }
Number WL02_Battery "Töltöttség [%.1f %%]" <battery> (gEnerg) { channel="mqtt:topic:aqara:AqaraWL02:Battery" }
Number WL02_Linkquality "JelerĆssĂ©g (max. 180) [%d]" <network> (gZigBeeWifi) { channel="mqtt:topic:aqara:AqaraWL02:Linkquality" }
//BejĂĄrati 1. mozgĂĄsĂ©rzĂ©kelĆ
Switch MS01_Occupancy "MozgĂĄs [MAP(HM-Sen-MDIR-O-2.map):%s]" <motion> (gAlarm) { channel="mqtt:topic:aqara:AqaraMS01:Occupancy", autoupdate="false" }
Number MS01_Illuminance "FĂ©nyerĆ" <sun_clouds> (gLumi) { channel="mqtt:topic:aqara:AqaraMS01:Illuminance" }
Number MS01_Voltage "TĂĄpfeszĂŒltsĂ©g [%d mV]" <energy> (gVolt) { channel="mqtt:topic:aqara:AqaraMS01:Voltage" }
Number MS01_Battery "Töltöttség [%.1f %%]" <battery> (gEnerg) { channel="mqtt:topic:aqara:AqaraMS01:Battery" }
Number MS01_Linkquality "JelerĆssĂ©g (max. 180) [%d]" <network> (gZigBeeWifi) { channel="mqtt:topic:aqara:AqaraMS01:Linkquality" }