I’m using openhab 2.5 and the new bindings.
Hi, I’m very new to openhab but i love it. I’m trying to configure my mqtt bindings using files, (if i can’t user paper UI for everything i prefere to use the files for what I can).
I already configure mosquitto and it;s working with my sonoff switches. Now I’m trying to configure my Sonoff RF433 Bridge (all my sonoff use tasmota).
I have one problem and one question
The question first, can I separate my bridge and my things in diferent files? If yes how i mustr rewrite my mqtt things?
Now the problem, the first two things are sensor, one pir the orther door (contact). When activate the send one command (alfa numeric) The ones in the OPEN option. But openhab complains about this value.
[WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '698489' not supported by type 'OpenCloseValue': No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.698489
I read a lot, buty i’m not sure how to proced.
Finally i left here my mqtt.thing with my configuration. I copy from other post, so there may be some wrong or not necesari, any advice on how to tune it I’ll apreciate.
mqtt.things
Bridge mqtt:broker:MosquittoMqttBroker “Mosquitto MQTT Broker (mio2)” @ “MQTT” [
host=“localhost”,
secure=false,
port=1883,
qos=0,
retain=false,
clientid=“Oh2Mqtt2Thing”,
//certificate="",
//certificatepin=false,
//publickey="",
//publickeypin=false,
keep_alive_time=30000,
reconnect_time=60000,
//lastwill_message="",
//lastwill_qos=1,
//lastwill_topic="",
username=“openhabian”,
password=“password”
]
{
// sonoff Bridge
Thing mqtt:topic:sonoffBridge “Sonoff Bridge” @ “MQTT” {
Channels:
Type contact : movimiento "movimientoVestibulo" [
stateTopic="tele/bridge/RESULT",
transformationPattern="JSONPATH:$.RfReceived.Data",
OPEN="EDAC6E",
CLOSED=""
]
Type contact : puerta01 "Apertura de Puera 01" [
stateTopic="tele/bridge/RESULT",
transformationPattern="JSONPATH:$.RfReceived.Data",
OPEN="698489",
CLOSED=""
]
}
// Sonoff siberiaLed
Thing mqtt:topic:siberiaLed "siberiaLed" @ "MQTT" {
Channels:
Type switch : switch "Power Switch" [
stateTopic="stat/siberiaLed/POWER",
commandTopic="cmnd/siberiaLed/POWER",
//retained=false,
//postCommand="",
//transformationPattern="JSONPATH:$.POWER",
//formatBeforePublish="%s",
on="ON",
off="OFF"
]
Type string : state01 "Switch State 01" [
stateTopic="stat/siberiaLed/POWER",
on="ON",
off="OFF"
]
Type string : state03 "Switch State 03" [
stateTopic="stat/siberiaLed/RESULT",
transformationPattern="JSONPATH:$.POWER",
on="ON",
off="OFF"
]
Type string : wifi-ap "Wifi AP" [
stateTopic="tele/siberiaLed/STATE",
transformationPattern="JSONPATH:$.Wifi.AP"
]
Type string : wifi-ssid "Wifi SSID" [
stateTopic="tele/siberiaLed/STATE",
transformationPattern="JSONPATH:$.Wifi.SSId"
]
Type string : wifi-channel "Wifi Channel" [
stateTopic="tele/siberiaLed/STATE",
transformationPattern="JSONPATH:$.Wifi.Channel"
]
Type string : wifi-rssi "Wifi RSSI" [
stateTopic="tele/siberiaLed/STATE",
transformationPattern="JSONPATH:$.Wifi.RSSI"
]
Type string : uptime "Uptime" [
stateTopic="tele/siberiaLed/STATE",
transformationPattern="JSONPATH:$.Uptime"
]
Type string : time "Time" [
stateTopic="tele/siberiaLed/STATE",
transformationPattern="JSONPATH:$.Time"
]
Type string : devicestate "Device State" [
stateTopic="tele/siberiaLed/LWT"
]
}
}
Thanks.
PD: After this i will contionue with rules to retuen somo thing like stanby status to the sensor, but I’m, still reading it. Any advice is welcome.