MQTT - Paper UI - Incoming Value Transformation

if i run it i get:

● mosquitto.service
Loaded: masked (Reason: Unit mosquitto.service is masked.)
Active: inactive (dead)

I use this for installation:

/Torben

Try this: https://stackoverflow.com/questions/49346704/debian-stretch-mosquitto-unit-mosquitto-service-is-masked#49382878

I done so - now i get:

● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
Loaded: loaded (/etc/init.d/mosquitto; generated)
Active: active (exited) since Sun 2020-07-26 21:25:16 BST; 3min 18s ago
Docs: man:systemd-sysv-generator(8)
Process: 3018 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)

Jul 26 21:25:16 openhab systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broker…
Jul 26 21:25:16 openhab systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.

Does this mean that the Misquitto i running?

But i still can not connect:

zigbee2mqtt:error 2020-07-26 21:31:45: Not connected to MQTT server!

No, I don’t think it’s running:

Active: active (exited)

Did you completely uninstall Moquette? And restart openHAB afterwards? It might be that they are fighting for the same port…

Well you do have to tell your zigbee2mqtt service which broker to connect to, now that you have changed it.

I should mean i restarted OH efter uinstalling Moquette - but i am not sure.
Should i install Moquette agian - restart - uninstall Moguette - restart?
/Torben

In Paper UI:

Mosquitto MQTT Broker OFFLINE - COMMUNICATION_ERROR

Yep, you’d expect that if Mosquitto isn’t running, as you’ve previously shown. This could be one of many things, to be honest, so you’re in your own for a bit unfortunately. I’d rule out openHAB completely and shut it down, and just concentrate on getting zigbee2mqtt connected to Mosquitto:

sudo systemctl stop openhab2
sudo systemctl restart mosquitto
sudo systemctl restart zigbee2mqtt

Then check all the statuses…

EDIT: Of course, we could just forget using files altogether, and you continue using Moquette for now - it was working after all, and Moquette won’t disappear tomorrow!

Assuming it’s running on the same device that Moquette was running on no changes should be necessary: the address to the broker will remain the same.

What you are saying is that you think it will be possible to make it running with config.files using the “built-in” moquette-broker.
But I will try one more time, when i get home from work, to get the Mosquitto running, i found some other hints.
/Torben

No, I’m sort of suggesting going back to where you started: Moquette and PaperUI setup of everything - you had that working!

Hi again
I have now started from absolute zero and now it is working - thanks to you.
Everything is set up in config-files, and testet in paper UI.
And now i still have a few questions
I have also startet building up my HAB-panel and making some simple rules.Some of the rules i would like to make, might be a challange for me, do you also have experience with this?
I am using the cc2531 for the bridge, do you know anything about it - is it ok or is there anyting better - here i most of all is thinking about the number of devices that will be able to connect.
I might be using some Z-Wave devices, have you tried that?
The reason why i keep coming back to you, is that the answers/advice you have given me, has been very easy to understand and they worked.- Thanks.
/Torben

Well done on getting it setup!

I also use a CC2531 flashed with zigbee2mqtt firmware. This post provides a method of monitoring the CC2531 and controlling a couple of zigbee2mqtt items from within openHAB.

I only have a few devices connected. I understand from other recent posts in this forum that the CC2531 may struggle with a lot (25+?) of devices: search through this forum, or the zigbee2mqtt pages.

I have a Z-Wave thermostat, which is actually my first ever home automation device. I used it for many years with a Vera Lite hub before discovering openHAB! This is now connected to openHAB through the Vera Lite. That’s all to say: I don’t really know anything about Z-Wave with openHAB, other than lots of people use it!

Yes, but it’s usually best to have a go yourself using the documentation available (and examples in this forum), then start a new post in this forum if you have issues!

(One thing to bear in mind: many of the old MQTT examples in this forum are for the V1 version of the MQTT binding. You are using the V2 version. If you see any examples where an Item has { mqtt=".... instead of { channel="... then it’s a V1 binding example!)

Hi again
I am turning back to you in the hope that you can be my lifeline once again.
I have since last time installed a lot of lights and some sensors everything works.
But now i have run into problems with this Radiator valve with thermostat:


Could i ask you once again to help med with the lines in the things and itemsfiles.
I have been doing a lot of experimentation without getting i working.
Thanks
/Torben

I don’t use this device, and it looks quite complicated, so I won’t be able to help much.

What I would suggest is to install MQTT Explorer and watch what happens when you physically press buttons or change temperature - you’ll see relevant topics flash when they’re changed, and you can read the messages that come with those topics.

OK - thanks
I am using MQTT Explorer and there i works fine (at least reading data):

  • it is the writng of the code in the thingsfile that is my problem.
    /Torben

For this particular example, something like the following might work:

Thing mqtt:topic:029 "029" (mqtt:broker:MosquittoMqttBroker) {
    Channels:
        Type string : system_mode "system_mode" [
            stateTopic = "zigbee2mqtt/029/system_mode"
        ]
        Type number : linkquality "linkquality" [
            stateTopic = "zigbee2mqtt/029/linkquality"
        ]
        Type number : current_heating_setpoint "current_heating_setpoint" [
            stateTopic = "zigbee2mqtt/029/current_heating_setpoint"
        ]
        Type switch : window_detection "window_detection" [
            stateTopic = "zigbee2mqtt/029/window_detection"
        ]
        Type switch : valve_detection "valve_detection" [
            stateTopic = "zigbee2mqtt/029/valve_detection"
        ]
        Type switch : child_lock "child_lock" [
            stateTopic = "zigbee2mqtt/029/child_lock",
            on="LOCKED",
           off="UNLOCKED"
        ]
        Type number : local_temperature "local_temperature" [
            stateTopic = "zigbee2mqtt/029/local_temperature"
        ]
        Type number : battery "Battery level" [
            stateTopic = "zigbee2mqtt/029/battery"
        ]
}

I can not find the difference between the first code i made myself and what you have send me here, but makeking a thingsfile out of your lines, just made it work - thanks again for giving it a chance.
Afterwards i also got the command-topic running, so now i have control over the termostat.
I only have one problem now, i can not really test if it is works in daily use, because we, at the moment (here in Denmark) have outdoor temperaturs over 30 degrees Celcius - i guess you can not help me whit that issue :wink:
/Torben

1 Like

Once you have all your devices setup and working, I think it would be great if you shared your configurations in the Solutions section of this forum!

I’ve done a couple for zigbee2mqtt devices, in the hope that they help someone else with the device! At some point I’m going to try and add these configurations into the zigbee2mqtt documentation.

Enjoy the great weather!!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.