Hello
i’ve got th following Problem:
I want to switch on/off ma Shelly1-Device using the mqtt I have read many posts in th group and i have tryed many examples but they all missed my problem.
My workaround:
I use a MacMini Server 2011, openHAB 2.4, mosqitto from mosquitto.org, both as service. I can use bindings in openHAB, i have integrates my Netatmo-Devices and i can switch on and off my shelly1-Device using mqtt.fx. I can read the status of the schell1-Device, if i switch it on or off ba using mqtt and i have used following configuration files:
mqtt.things:
Bridge mqtt:broker:mosquitto “Mosquitto” [ host=“localhost”, port=1883, secure=false, username=“XXXXX”, password=“XXXXX”, clientID=“openHAB2” ]
{
// shelly1
Thing topic shelly1 “shelly1” @ “Some Room” {
Channels:
Type string : mode “Mode” [ stateTopic=“shellies/shelly1-500ECD/relay/0” ]
Type switch : power “Power” [ stateTopic=“shellies/shelly1-500ECD/relay/0”, commandTopic=“shellies/shelly1-500ECD/relay/0/command” ]
}
}
mqtt.items:
Group GF_shelly1
“shelly1”
<sonoff_s20_uk>
(GF_Kitchen, shelly1)
Switch GF_shelly1_Power
“Power”
<sonoff_s20_uk>
(GF_shelly1)
//mappings=[ON=on, OFF = off]
{ channel=“mqtt:topic:mosquitto:shelly1:power”}
String GF_shelly1_Mode
“Mode: %s”
(GF_shelly1)
{ channel=“mqtt:topic:mosquitto:shelly1:mode” }
The switch is reachable in the kitchen.
In the openhab.log i get the message:
2019-01-02 18:15:50.233 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid openHAB2 and file store ‘/Applications/openhab-2-4/userdata/mqtt/localhost’
2019-01-02 18:15:50.240 [WARN ] [eneric.internal.generic.ChannelState] - Command ‘off’ not supported by type ‘OnOffValue’: No enum constant org.eclipse.smarthome.core.library.types.OnOffType.off
Is there anbody with same problems or better with a solution for my problems?
thanks for answering