- Platform information:
- Hardware: LXC
- OS: openhabian
- Java Runtime Environment: which java platform is used and what version
- openHAB version: 2.5.8
- Issue of the topic: I am trying to enable a shelly-1 relay over MQTT. Doesn’t work, either thru rules or CLI. See logs below. I am not using input switch, and set shelly to be in detached mode.
items file:
Switch Shelly1Piscine_Online "Online [MAP(ON_OFF_out.map):%s]"
{ channel="mqtt:topic:mosquitto:Shelly1Piscine:shelly1-xxx-online" }
Switch Shelly1Piscine_Relais "Relais [MAP(ON_OFF_out.map):%s]" <switch>
{ channel="mqtt:topic:mosquitto:Shelly1Piscine:shelly1-xxx-relay-0" }
Switch Shelly1Piscine_Bouton "Bouton [MAP(ON_OFF_out.map):%s]" <switch>
{ channel="mqtt:topic:mosquitto:Shelly1Piscine:shelly1-xxx-input-0" }
Switch Shelly1Piscine_BoutonLongpush "Bouton appui-long [MAP(ON_OFF_out.map):%s]" <switch>
{ channel="mqtt:topic:mosquitto:Shelly1Piscine:shelly1-xxx-input-0-longpush" }
Number Shelly1Piscine_SondesTemp1 "Sonde #1 [%s °C]" <temperature>
{ channel="mqtt:topic:mosquitto:Shelly1Piscine:shelly1-xxx-temp-0" }
Number Shelly1Piscine_SondesTemp2 "Sonde #2 [%s °C]" <temperature>
{ channel="mqtt:topic:mosquitto:Shelly1Piscine:shelly1-xxx-temp-1" }
Number Shelly1Piscine_SondesTemp3 "Sonde #3 [%s °C]" <temperature>
{ channel="mqtt:topic:mosquitto:Shelly1Piscine:shelly1-xxx-temp-2" }
Number Shelly1Piscine_Temp "Température Piscine [%.1f °C]" <temperature>
Number timerRelaisPiscine "Timer pour la pompe de piscine"
things file:
Thing mqtt:topic:mosquitto:Shelly1Piscine "Shelly1 Piscine et Sondes Température" (mqtt:broker:mosquitto) @ "Shellies" {
Channels:
Type switch : shelly1-xxx-online "Online" [ stateTopic="shellies/shelly1-xxx/online", on="true", off="false"]
Type switch : shelly1-xxx-relay-0 "Pompe-Piscine" [ stateTopic="shellies/shelly1-xxx/relay/0", on="on", off="off", commandTopic="shellies/shelly1-553A95/relay/0/command", on="on", off="off" ]
Type switch : shelly1-xxx-input-0 "Input-0" [ stateTopic="shellies/shelly1-xxx/input/0", on="1", off="0"]
Type switch : shelly1-xxx-input-0-longpush "Input-0-longpush" [ stateTopic="shellies/shelly1-xxx/longpush/0", on="1", off="0"]
Type number : shelly1-xxx-temp-0 "Temp-0" [ stateTopic="shellies/shelly1-xxx/ext_temperature/0"]
Type number : shelly1-xxx-temp-1 "Temp-1" [ stateTopic="shellies/shelly1-xxx/ext_temperature/1"]
Type number : shelly1-xxx-temp-2 "Temp-2" [ stateTopic="shellies/shelly1-xxx/ext_temperature/2"]
}
File ON_OFF_out.map
on=ON
off=OFF
0=OFF
1=ON
false=OFF
true=ON
FALSE=OFF
TRUE=ON
NULL=OFF
UNDEF=OFF
-=OFF
open=ON
close=OFF
closed=OFF
Here is what happens when I try to send ON command : Shelly1Piscine_Relais.sendCommand(ON)
2020-09-07 22:22:46.552 [ome.event.ItemCommandEvent] - Item ' **Shelly1Piscine_Relais** ' received command ON
2020-09-07 22:22:46.552 [nt.ItemStatePredictedEvent] - **Shelly1Piscine_Relais** predicted to become ON
2020-09-07 22:22:46.553 [vent.ItemStateChangedEvent] - **Shelly1Piscine_Relais** changed from OFF to ON
2020-09-07 22:23:11.164 [vent.ItemStateChangedEvent] - **Shelly1Piscine_Relais** changed from ON to OFF
Any clue? First time I am playing with shelly relays…