@David_Graeff One additional question. Everything works now but after a reboot I get the following line as one of the first in the log file
2019-01-21 18:27:39.852 [WARN ] [.MqttBrokerConnectionServiceInstance] - MqttBroker connection configuration faulty: host : You need to provide a hostname/IP!
but just to be sure: If I define the MQTT broker in the things file I don’t need anything else correct? or do I still need a mqttConnections.things file like described in https://www.openhab.org/addons/bindings/mqtt/
Because you are having an “mqtt.cfg” or “mqtt.config” file somewhere around in your openHAB directories. Please remove that file, there is apparently an invalid broker configured. And yes, that file gets auto generated if you click the wrong button (Services->MQTT system broker) in Paper UI.
But my mqtt.cfg is my MQTT1 configuration file, I can only delete that one once I have migrated all MQTT items from version 1 to the new version. As long as I run V1 next to the new version (during migration) I can’t (yet)
The file I define my things in (my .things file) is called mqtt.things can that be an issue? The only other thing in my conf directories is mqtt-eventbus.cfg (but that doesn’t have anything but the explanation text which is all commented out)
The only one that I can see is the ./userdata/config/org/eclipse/smarthome/mqttbroker.config
this has one line
service.pid="org.eclipse.smarthome.mqttbroker"
But I don’t dare to delete that file as I’m 100% sure I didn’t create it so afraid of deleting system file that is needed.
Do you see anything that could cause the error
2019-01-21 18:27:39.852 [WARN ] [.MqttBrokerConnectionServiceInstance] - MqttBroker connection configuration faulty: host : You need to provide a hostname/IP!
I have the exact same situation and also had to update the REGEX. Although the syntax was correct, I only got NaN in Openhab. I had to restart my container to let it work, without changing anything else.
I agree this can be used in the example documentation, as the flukso config was one of the examples in the MQTT v1 docs
Jan, indeed I also need to restart the entire Openhab container every time I change something in the MQTT things file otherwise it doesn’t work or take the channel changes
It uses the same MQTT bridge as for the sensors and that is working, I also see the lights thing online in the PaperUI and I see it linked in the Paper UI to the button but it doesn’t do anything. I don’t see any MQTT message sent out in MQTT lense.
Something related when configuring a channel through the GUI there is a toggle “is command” how do you configure that in channel definition the .things file?
This is not the issue as I tried creating everything through the GUI and didn’t get any MQTT messages sent out either, so probably it’s something in the item configuration.
Thanks that helps a lot, yes the bureauzij and badkamer was intentional, 2 different lights one controlled via MQTT1 the other via the 2.4 so I could see difference in MQTT lense for debugging pruposes.
With regards to the “is command” toggle in the channel config GUI, how do I add that ?
Honestly I forgot. I have added that to the documentation for OH 2.5, but because of all the code moving that happens at the moment, the documentation pages cannot be rebuild I assume.
You need to look at the latest README.md page of the binding in the code repository, I’m afraid.
Unfortunately, it is not possible to do that with the new binding.
Only the commandTopic sends outgoing messages
You will need another channel and a proxy item
Vincent no there is a toggle button in the GUI config to do that. To consider an incoming state topic as a command for the item. The question was just how to set that button through the .things file configuration.
Because my 2 key bindings are OH1 binidngs, so untill those are migrated (which won’t happen as they are not actively maintained any more) I’m stuck to text configurations and I rather keep one single config method than mixing GUI and text.
But if I can’t replicate that MQTT1 command I really don’t see any reason for me to use the MQTT v2. Rather than just adding something in the item definition I not only need to add a channel but I need to add multiple channels or proxy items. That’s massive I have over 100 items to cover.