Page 50 of 86
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:24
by simon_rb
pi@raspberrypi:~$ ps aux | grep mosquito
pi 1434 0.0 0.2 4276 2012 pts/0 S+ 17:23 0:00 grep mosquito
pi@raspberrypi:~$
Take it its not running? How do I make it run lol... Sorry, Well beyond my skills. Im good at following instructions and learn at the same time

Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:25
by Marci
(see edits above)
If above doesn’t work, head to /etc/init.d and see if there’s a file in there called mosquitto. If not, check /etc/systemd/system and see if there’s a file in there called mosquitto.
If not, you’ve lost your start-as-service script for mosquitto. See 'Configuration and startup script' section at
https://alexander-rudde.com/2014/02/ins ... rch-linux/ to put one back in place - follow from...
Create a .service file /etc/systemd/system/mosquitto.service with this content
...onwards. (Guide says for arch-linux, but is identical process as for raspbian)
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:27
by simon_rb
So that might be my problem..
pi@raspberrypi:~$ sudo systemctl enable mosquito
Failed to execute operation: No such file or directory
pi@raspberrypi:~$ pi@raspberrypi:~$ sudo systemctl enable mosquitto
-bash: pi@raspberrypi:~$: command not found
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:29
by Marci
(look up!)
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:31
by simon_rb
I have a file called Mosquitto under /etc/init.d
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:32
by Marci
k - Guessing raspbian have changed something so that systemctl no longer parses scripts in /etc/init.d (which is the old wheezy way of doing things).
Follow guide in post above to make a new jessie style systemctl service file, then try run the three systemctl commands again.
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:36
by simon_rb
Follow the guide above.. Am I doing it from the start and reinstalling or following it from:-
Configuration and startup script
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:40
by Marci
from "Create a .service file /etc/systemd/system/mosquitto.service with this content"
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:45
by simon_rb
Its now running but same error within domoticz
● mosquitto.service - Mosquitto MQTT Broker daemon
Loaded: loaded (/etc/systemd/system/mosquitto.service; enabled)
Active: active (exited) since Fri 2016-11-04 14:15:12 GMT; 3h 29min ago
pi@raspberrypi:~$
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:48
by Marci
Confirm it’s running with ps aux | grep mosquitto - that looks like it’s notifying you that it exited 3hrs or so ago...
Active: active (exited) since Fri 2016-11-04 14:15:12 GMT; 3h 29min ago
Issue...
...then check with ps aux again.
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:50
by simon_rb
Marci wrote:Confirm it’s running with ps aux | grep mosquitto - systemctl can lie!
Your right, it lied. I have done whats in the guide and it still hasn't worked... Hmm
pi@raspberrypi:~$ ps aux | grep mosquitto
pi 10681 0.0 0.1 4276 1844 pts/0 S+ 17:49 0:00 grep mosquitto
pi@raspberrypi:~$
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 18:51
by Marci
What happens if you just type mosquitto [enter]?
Code: Select all
pi@rasprf ~/ $ sudo systemctl stop mosquitto
pi@rasprf ~/ $ mosquitto
1478281912: mosquitto version 1.4.10 (build date Thu, 25 Aug 2016 10:12:09 +0100) starting
1478281912: Using default config.
1478281912: Opening ipv4 listen socket on port 1883.
1478281912: Opening ipv6 listen socket on port 1883.
1478281913: New connection from 127.0.0.1 on port 1883.
1478281913: New client connected from 127.0.0.1 as mqttjs_043a2957 (c1, k10, u'marci').
1478281913: New connection from 127.0.0.1 on port 1883.
1478281913: New client connected from 127.0.0.1 as mqttjs_360b9376 (c1, k10).
1478281919: New connection from 127.0.0.1 on port 1883.
1478281919: New client connected from 127.0.0.1 as mosq/[Yw (c1, k60, u'marci').
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 19:13
by simon_rb
Post in hour. Off out to take my 4 year to his first little school disco
Sent from my iPhone using Tapatalk
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 20:21
by simon_rb
Well that works..
pi@raspberrypi:~$ mosquitto
1478287139: mosquitto version 1.4.10 (build date Thu, 25 Aug 2016 10:12:09 +0100) starting
1478287139: Using default config.
1478287139: Opening ipv4 listen socket on port 1883.
1478287139: Opening ipv6 listen socket on port 1883.
1478287140: New connection from 127.0.0.1 on port 1883.
1478287140: New client connected from 127.0.0.1 as mqttjs_80ba6477 (c1, k10).
1478287152: New connection from ::1 on port 1883.
1478287152: New client connected from ::1 as mosq/^kO?7t\QcNaKRIfFv] (c1, k60).
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 20:41
by Marci
K - in the service file, remove the -d off the end of the command if it’s there (according to comments at the bottom of the blog post), and check that mosquitto is where that file thinks it is (/usr/sbin)
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 20:52
by simon_rb
Removed the -d and no luck however
ExecStart=/usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
the file inside /etc/mosquitto is there but there is nothing inside usr/local/sbin..
Re: homebridge-edomoticz Plugin
Posted: Friday 04 November 2016 23:30
by Marci
Hunt the mosquitto!
Code: Select all
sudo find / -type f -name mosquitto
Re: homebridge-edomoticz Plugin
Posted: Saturday 05 November 2016 1:03
by simon_rb
Marci wrote:Hunt the mosquitto!
/etc/init.d/mosquitto
/etc/logrotate.d/mosquitto
homebridge-edomoticz Plugin
Posted: Saturday 05 November 2016 1:15
by Marci
Mosquitto isn't installed.
(I think...! Sure it's in the Raspbian repos now. If not, see mosquitto.org)
Re: homebridge-edomoticz Plugin
Posted: Saturday 05 November 2016 1:17
by simon_rb
Marci wrote:Mosquitto isn't installed.
Oh.. How is it running? Is it just running but not installed lol... As a temp measure I ran mosquitto & and thats running fine and homekit is working as expected.. All was working until the apt update/upgrade..