Problems when creating an Item

Hi!
I just installed OH2 and am trying to connect my esp8266 light switch . I am using the integrated mqtt broker and i`m just reusing the item string from my old installation which was using mosquitto. But I cant seem to figure out with what do I need to replace the “mosquitto” part so it can work with the integrated broker.
this is the string from my old installation:
Switch House_Livingroom_Light “Light” (all) {mqtt=">[mosquitto:House/Livingroom/Light:command:OFF:OFF], >[mosquitto:House/Livingroom/Light:command:ON:ON], <[mosquitto:House/Livingroom/Light:state:default]"}

You are using MQTTv1
In the services folder add the new broker to mqtt.cfg
Name it whatever you want. for example, embededbroker
And then replace the mosquitto part with embededbroker

I would alos recommend that your install the mosquitto broker and use that instead of the embeded broker.
It is based on moquette which afaik is not a maintained project anymore

Yes, actualy I just started over from the beginnig and now I`m installing mosquitto and will use it. But i cant find the mqtt.cfg, do I need to create it?

You need to install the MQTTv1 binding and it will be created automatically

I strongly recommend that you move on to he MQTTv2 binding instead as you are starting over

1 Like

I have installed binding-mqtt - 2.4.0 form the paper UI and its the only one available, but it has not created the mqtt.cfq. I still have a copy from my old one can i use it?

No the setup and use on the v2 binding is VERY different than v1
See:

and

and from the forum:

There are more

I strongly recommend that you create you broker thing and MQTT generic thing with the PaperUI as the *.things files can be difficult to get right

It looks difficult but once you get the hang of it it’s much more “compatible” with the way that OH2 works

I got it working with the v1 binding. I will try the v2 another time, since i still need to solve the homekit stuff and then I will test the v2binding.
Thanks for the help!

Please mark the thread as solved. Thanks

1 Like