Hello,
I am trying to make zigbee2mqtt working on my raspberry pi.
I installed mosquitto and zigbee2mqtt, but it looks like my mosquitto isn't working right.
Trying to test mosquitto with mosquitto_sub and mosquitto_pub throws me this error: Error: Connection refused
However, when I first type mosquitto -d, it starts to work. But in the way I want it to use it should start automatically and not by first giving that command.
Does someone know how to fix this?
Thanks!
MQTT mosquitto problems
Moderator: leecollings
Re: MQTT mosquitto problems
When installed, there should be a file called mosquitto.service in /etc/systemd/system
If that is the case, start it with sudo systemctl start mosquitto.service
This should start the service, even after a reboot
If that is the case, start it with sudo systemctl start mosquitto.service
This should start the service, even after a reboot
-
- Posts: 132
- Joined: Tuesday 20 October 2015 12:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Re: MQTT mosquitto problems
Thanks!SweetPants wrote: ↑Friday 14 December 2018 19:30 When installed, there should be a file called mosquitto.service in /etc/systemd/system
If that is the case, start it with sudo systemctl start mosquitto.service
This should start the service, even after a reboot
There is no such a file in that folder. So something must have gone wrong during installation?
How can I fix it?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: MQTT mosquitto problems
I installed mosquitto on my PI systems (debian Stretch) as follows
Code: Select all
sudo wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
sudo apt-get install mosquitto
sudo apt-get install mosquitto-clients
sudo update-rc.d mosquitto enable
sudo update-rc.d mosquitto defaults
sudo service mosquitto status
If you already did the first 4 steps then the last 3 steps should do the job. Otherwise uninstall and do all above steps.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 132
- Joined: Tuesday 20 October 2015 12:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Re: MQTT mosquitto problems
I tried reinstalling it. However, my Domoticz stopped working when I enabled the Zigbee2MQTT hardware, so I went looking for errors etc.
I followed this once again: https://koenkk.github.io/zigbee2mqtt/ge ... 2mqtt.html
The page states:
Output should look like:
However, this is what I get:
I am missing these log lines and the Loaded part is different as well.
What am I doing wrong?
I followed this once again: https://koenkk.github.io/zigbee2mqtt/ge ... 2mqtt.html
The page states:
Output should look like:
Code: Select all
pi@raspberry:/opt/zigbee2mqtt $ systemctl status zigbee2mqtt.service
● zigbee2mqtt.service - zigbee2mqtt
Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2018-06-07 20:27:22 BST; 3s ago
Main PID: 665 (npm)
CGroup: /system.slice/zigbee2mqtt.service
├─665 npm
├─678 sh -c node index.js
└─679 node index.js
Jun 07 20:27:22 raspberry systemd[1]: Started zigbee2mqtt.
Jun 07 20:27:23 raspberry npm[665]: > [email protected] start /opt/zigbee2mqtt
Jun 07 20:27:23 raspberry npm[665]: > node index.js
Jun 07 20:27:24 raspberry npm[665]: 2018-6-7 20:27:24 INFO Starting zigbee-shepherd
Jun 07 20:27:25 raspberry npm[665]: 2018-6-7 20:27:25 INFO zigbee-shepherd started
Code: Select all
pi@RP-Domoticz:~$ systemctl status zigbee2mqtt.service
● zigbee2mqtt.service - zigbee2mqtt
Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled)
Active: active (running) since Thu 2019-01-10 16:11:08 CET; 8min ago
Main PID: 606 (npm)
CGroup: /system.slice/zigbee2mqtt.service
├─606 npm
├─886 sh -c node index.js
└─887 node index.js
What am I doing wrong?
Who is online
Users browsing this forum: No registered users and 1 guest