homebridge-edomoticz Plugin

Moderator: leecollings

simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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 :D
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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)
Last edited by Marci on Friday 04 November 2016 18:31, edited 2 times in total.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post by Marci »

(look up!)
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post by simon_rb »

I have a file called Mosquitto under /etc/init.d
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post by simon_rb »

Follow the guide above.. Am I doing it from the start and reinstalling or following it from:-

Configuration and startup script
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post by Marci »

from "Create a .service file /etc/systemd/system/mosquitto.service with this content"
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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:~$
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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...

Code: Select all

sudo systemctl restart mosquitto
...then check with ps aux again.
Last edited by Marci on Friday 04 November 2016 18:58, edited 1 time in total.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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:~$
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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').
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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).
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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)
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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..
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post by Marci »

Hunt the mosquitto!

Code: Select all

sudo find / -type f -name mosquitto
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post by simon_rb »

Marci wrote:Hunt the mosquitto!
/etc/init.d/mosquitto
/etc/logrotate.d/mosquitto
User avatar
Marci
Posts: 532
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

homebridge-edomoticz Plugin

Post by Marci »

Mosquitto isn't installed.

Code: Select all

sudo apt-get install mosquitto 
(I think...! Sure it's in the Raspbian repos now. If not, see mosquitto.org)
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post by simon_rb »

Marci wrote:Mosquitto isn't installed.

Code: Select all

sudo apt-get install mosquitto 
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..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest