0

I am using OpenHab 1.7 I am trying to publish messages throw MQTT,

I want to publish my EnOcean Rocker switch updates but when I change my switch state nothing is published, Here is my item configuration:

Switch MyRocker () {enocean="{id=00:25:7F:9A, eep=F6:02:01, channel=B, parameter=I}", mqtt=">[eclipsemqttbroker:myRockerState:command:ON:1],>[eclipsemqttbroker:myRockerState:command:OFF:0]"}

In the debug mode I got the following messages

13:54:25.404 [DEBUG] [.io.transport.mqtt.MqttService:123  ] - Starting MQTT Service...
13:54:26.471 [INFO ] [.io.transport.mqtt.MqttService:108  ] - MQTT Service initialization completed.
13:54:26.480 [INFO ] [o.i.t.m.i.MqttBrokerConnection:114  ] - Starting MQTT broker connection 'eclipsemqttbroker'
13:54:26.537 [DEBUG] [o.i.t.m.i.MqttBrokerConnection:294  ] - Creating new client for 'tcp://m2m.eclipse.org:1883' using id 'openHabEnOcean' and file store '/tmp/eclipsemqttbroker'

13:34:11.850 [DEBUG] [b.mqtt.internal.MqttItemConfig:71   ] - Loaded MQTT config for item 'MyRocker' : 0 subscribers, 2 publishers
13:34:11.904 [DEBUG] [m.internal.MqttEventBusBinding:61   ] - MQTT: Activating event bus binding.

Any ideas why no message has not been published?

Note : I only use the mqtt transport bundle I did not use the persistance bundle.

Thanks in advance for your help!

sabrina2020
  • 2,102
  • 3
  • 25
  • 54

1 Answers1

0

This configuration works:

Switch MyRocker () {enocean="{id=00:25:7F:9A, eep=F6:02:01, channel=B, parameter=I}", mqtt=">[eclipsemqttbroker:myRockerState:state:ON:default],>[eclipsemqttbroker:myRockerState:state:OFF:default]"}
sabrina2020
  • 2,102
  • 3
  • 25
  • 54