openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

[MQTT] state topic empy => No connection or no command topic #5700

Open sifourquier opened 5 years ago

sifourquier commented 5 years ago

Hi when i configure a Channels in Generic MQTT Thing if i left empty "MQTT state" topic the commande are not send and in log is write

2018-11-10 17:38:50.610 [DEBUG] [.e.s.i.r.c.i.item.ItemResource:380 ] - Received HTTP POST request at 'items/mqtt_topic_124b3b30_657468451' with value '65'. 2018-11-10 17:38:50.610 [INFO ] [arthome.event.ItemCommandEvent:53 ] - Item 'mqtt_topic_124b3b30_657468451' received command 65 2018-11-10 17:38:50.611 [DEBUG] [.s.c.t.i.p.ProfileCallbackImpl:69 ] - Delegating command '65' for item 'mqtt_topic_124b3b30_657468451' to handler for channel 'mqtt:topic:124b3b30:657468451' 2018-11-10 17:38:50.611 [DEBUG] [.s.c.i.c.InvocationHandlerSync:55 ] - Already in a safe-call context, executing 'ThingHandler.handleCommand()' directly on 'org.eclipse.smarthome.binding.mqtt.generic.internal.handler.GenericThingHandler@415f398e'. 2018-11-10 17:38:50.611 [DEBUG] [g.i.h.AbstractMQTTThingHandler:130 ] - Successfully published value 65 to topic 2018-11-10 17:38:50.611 [INFO ] [.event.ItemStatePredictedEvent:53 ] - mqtt_topic_124b3b30_657468451 predicted to become 65 2018-11-10 17:38:50.612 [INFO ] [smarthome.event.ItemStateEvent:53 ] - mqtt_topic_124b3b30_657468451 updated to 65 2018-11-10 17:38:50.612 [INFO ] [ome.event.ThingStatusInfoEvent:53 ] - 'mqtt:topic:124b3b30' updated: OFFLINE (COMMUNICATION_ERROR): No connection or no command topic! 2018-11-10 17:38:50.612 [INFO ] [nt.ThingStatusInfoChangedEvent:53 ] - 'mqtt:topic:124b3b30' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No connection or no command topic! 2018-11-10 17:38:50.613 [INFO ] [s.event.ItemStateChangedEvent :53 ] - mqtt_topic_124b3b30_657468451 changed from 38 to 65 2018-11-10 17:38:50.618 [DEBUG] [.s.c.t.i.p.ProfileCallbackImpl:101 ] - Delegating update '65' for item 'mqtt_topic_124b3b30_657468451' to handler for channel 'mqtt:topic:124b3b30:657468451' 2018-11-10 17:38:50.618 [DEBUG] [.s.c.i.c.InvocationHandlerSync:55 ] - Already in a safe-call context, executing 'ThingHandler.handleUpdate()' directly on 'org.eclipse.smarthome.binding.mqtt.generic.internal.handler.GenericThingHandler@415f398e'.

Steps to Reproduce (for bugs)

add a Generic MQTT Thing add a channel and left empty "MQTT state" and change the "MQTT command topic" for exemple "out" connect a slider to this channel move the slider

Context

openHAB2 run in eclipse debian mosquito in local

9037568 commented 5 years ago

Need to see the related configurations and items.