homebridge-edomoticz Plugin

Moderator: leecollings

bing69
Posts: 139
Joined: Thursday 05 June 2014 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: 's-Hertogenbosch, NL
Contact:

Re: homebridge-edomoticz Plugin

Post by bing69 »

thanks for your response. For now I solved it by creating a dummy switch and hang a script with the content: sudo service home bridge starts.
These switches every 6 hours and solves the time being.

This does not deserve any prizes and I'm looking also for a good solution.
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post by TheRamon »

Sounds like that could do the job. More interesting is why homebridge crashes / hangs though. You should try and get the contents of /var/log/homebridge.err before you restart. There might be something in there. :D
Awst6000
Posts: 108
Joined: Thursday 12 February 2015 7:51
Target OS: Linux
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by Awst6000 »

TheRamon wrote:
Awst6000 wrote:I also tried the parameter usescenes, but still no luck.

Hi, have just checked. there is no usescenes or loadscenes parameter. We would have to build this. I'll check this out
Hi TheRamon,
Is this other software? How can I check this?
https://github.com/nfarina/homebridge/pull/129/files
Txs
MaKin
Posts: 1
Joined: Wednesday 04 January 2017 19:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by MaKin »

Hello everyone,

I am coming from Home-Assistant so please excuse my lack of knowledge regarding Domoticz. :)

Can you tell me how to have Temperature and Humidity sensors shown in the iOS Homeapp? I added my mysensors devices to domoticz and they are listed as following:

TempHum Livingroom (Temp is shown, Humidity can be found under details)
TempHum Bedroom (Temp is shown, Humidity can be found under details)
Hum Livingroom ("not yet supported" is shown)
Hum Bedroom ("not yet supported" is shown)


This is weird, as the sensors actually are made up like this NodeX with two children (V_HUM, V_TEMP).

Is there a simple way to have temperature and humidity listed?

Thanks in advance.

Also another strange behavior is, that under devices there is a MySensors "Security Device" from type "Lighting 2" and Subtype "AC" listed. Any idea what this is supposed to mean? :lol:
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post by TheRamon »

Awst6000 wrote:
TheRamon wrote:
Awst6000 wrote:I also tried the parameter usescenes, but still no luck.

Hi, have just checked. there is no usescenes or loadscenes parameter. We would have to build this. I'll check this out
Hi TheRamon,
Is this other software? How can I check this?
https://github.com/nfarina/homebridge/pull/129/files
Txs
I'm not sure what the Domoticz plugin is, but this plugin is called eDomoticz. I did not know there was a 'Domoticz' plugin.. :geek: So yeah, I think it's other software.

MaKin wrote:Hello everyone,

I am coming from Home-Assistant so please excuse my lack of knowledge regarding Domoticz. :)

Can you tell me how to have Temperature and Humidity sensors shown in the iOS Homeapp? I added my mysensors devices to domoticz and they are listed as following:

TempHum Livingroom (Temp is shown, Humidity can be found under details)
TempHum Bedroom (Temp is shown, Humidity can be found under details)
Hum Livingroom ("not yet supported" is shown)
Hum Bedroom ("not yet supported" is shown)


This is weird, as the sensors actually are made up like this NodeX with two children (V_HUM, V_TEMP).

Is there a simple way to have temperature and humidity listed?

Thanks in advance.

Also another strange behavior is, that under devices there is a MySensors "Security Device" from type "Lighting 2" and Subtype "AC" listed. Any idea what this is supposed to mean? :lol:
Hi MaKin,

I think Humidity sensors are not (yet) supported. I'll have a look and see if I can implement them. Temperature sensors are already implemented.
Not sure what that "Security Device" thingy is! :)
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post by TheRamon »

@MaKin:

I have just committed a new version (also available in npm) which contains support for Humidity sensors.
bing69
Posts: 139
Joined: Thursday 05 June 2014 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: 's-Hertogenbosch, NL
Contact:

Re: homebridge-edomoticz Plugin

Post by bing69 »

TheRamon wrote:Sounds like that could do the job. More interesting is why homebridge crashes / hangs though. You should try and get the contents of /var/log/homebridge.err before you restart. There might be something in there. :D
i search for the file but there is no homebridge.err file :evil:
User avatar
Marci
Posts: 531
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 »

Awst6000 wrote:
TheRamon wrote:
Awst6000 wrote:I also tried the parameter usescenes, but still no luck.

Hi, have just checked. there is no usescenes or loadscenes parameter. We would have to build this. I'll check this out
Hi TheRamon,
Is this other software? How can I check this?
https://github.com/nfarina/homebridge/pull/129/files
Txs
That's from the original Domoticz homebridge plugin shipped with earlier Domoticz releases... hasn't been in active development for 2 years, and only supported on/off switches and dimmers. Completely different plugin.

eDomoticz has never supported the scenes side of things.
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!
User avatar
Marci
Posts: 531
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 »

bing69 wrote:
TheRamon wrote:Sounds like that could do the job. More interesting is why homebridge crashes / hangs though. You should try and get the contents of /var/log/homebridge.err before you restart. There might be something in there. :D
i search for the file but there is no homebridge.err file :evil:
Run...

Code: Select all

sudo touch /var/log/homebridge.err
sudo chmod 777 /var/log/homebridge.err
Then launch homebridge with the DEBUG=* prefix.
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!
Awst6000
Posts: 108
Joined: Thursday 12 February 2015 7:51
Target OS: Linux
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by Awst6000 »

@Marci,
Thanks for the update. So I'll have to keep using the scenes within Elgato Eve.
That works fine except for 1 Kaku dimmer that simply doesn't respond.
User avatar
Marci
Posts: 531
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 »

You can add a manual on/off switch in Domoticz and set it's on/off actions to the relevant http / json api endpoints for the scene you want it to control. Link to json api docs for domoticz are in OP & Domoticz wiki.

The eDomoticz plugin will then detect the scene as a simple power on/off switch for Homebridge use.
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!
User avatar
Marci
Posts: 531
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 »

bing69 wrote:thanks for your response. For now I solved it by creating a dummy switch and hang a script with the content: sudo service home bridge starts.
These switches every 6 hours and solves the time being.

This does not deserve any prizes and I'm looking also for a good solution.
I have a cron job set up which restarts Domoticz & Homebridge every 24hrs, alongside a switch in Domoticz for manual restarts of homebridge when required.
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:I have a cron job set up which restarts Domoticz & Homebridge every 24hrs, alongside a switch in Domoticz for manual restarts of homebridge when required.
Curious to know what your Cron Job look like. Is it advisable to restart everyday?

Cheers


Sent from my iPhone using Tapatalk
User avatar
Marci
Posts: 531
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 »

Not strictly necessary... just minimises unexpected unresponsiveness from either system on the particular Pi I’m currently running on (an old ModelB which is now doing quite a lot of additional work as well as home automation). Script is simple...

/root/monitor.sh:

Code: Select all

systemctl restart domoticz && systemctl restart homebridge
Root’s Crontab entry:

Code: Select all

30     02     *     *     *         /root/monitor.sh
Restarts Domoticz then Homebridge at 2.30am daily.
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 might have to implement this :-)
My Nest plugin loses contact with Nest every so often and restarting homebridge fixes it.

Cheers


Sent from my iPhone using Tapatalk
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: homebridge-edomoticz Plugin

Post by G3rard »

TheRamon wrote: Hehehe, alright. I have just reverted the setcolbrightnessvalue commit since it's not yet working 100%.. Does not have support for RGB values and such. I'll wait for Domoticz to implement that, too..
Maybe this can help?
http://www.domoticz.com/forum/viewtopic ... 38&t=14941
https://github.com/t0mg/reacticz/blob/m ... tchRGBW.js
It is also using MQTT and I can change the colors of my Hue lights.
But I have no RGB lights, so not sure if this is the solution you're searching for :)
Not using Domoticz anymore
matv
Posts: 8
Joined: Sunday 08 January 2017 18:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: EU
Contact:

Re: homebridge-edomoticz Plugin

Post by matv »

Marci wrote:

Code: Select all

sudo service homebridge stop
sudo npm set prefix '/usr' -g
sudo npm update -g homebridge --unsafe-perm
sudo npm update -g homebridge-edomoticz --unsafe-perm
cd /usr/lib/node_modules
sudo npm rebuild homebridge
sudo npm rebuild homebridge-edomoticz
[...]

Code: Select all

sudo pico ~/.homebridge/config.json
Launch homebridge!

Code: Select all

homebridge
I'm completely stuck and I hope someone is able to give me some general directions..
After following the outdated Wiki and finding out that that is not the way to go anymore I started with these instructions.
Being completely new to Unix it naturally involves a lot of trial and error for me..

The first error I get when executing the code above;
-bash: cd: /usr/lib/node_modules: No such file or directory

I found that there's a way to search with find / -name "node_modules" and that showed the location of the folder:
/usr/local/lib/node_modules

I then changed the code on top, replcaing cd /usr/lib/node_modules with the path I just found.
The error is gone but when is type ls in /usr/local/lib/node_modules, I only see a folder called npm with the following contents:
Screen Shot 2017-01-08 at 19.08.37.png
Screen Shot 2017-01-08 at 19.08.37.png (76.88 KiB) Viewed 3227 times
Could someone provide me with some tips on how to proceed? All the folders, Node-installs and file locations are getting a bit too much to oversee at this point.. Thanks in advance!
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post by TheRamon »

G3rard wrote:
TheRamon wrote: Hehehe, alright. I have just reverted the setcolbrightnessvalue commit since it's not yet working 100%.. Does not have support for RGB values and such. I'll wait for Domoticz to implement that, too..
Maybe this can help?
http://www.domoticz.com/forum/viewtopic ... 38&t=14941
https://github.com/t0mg/reacticz/blob/m ... tchRGBW.js
It is also using MQTT and I can change the colors of my Hue lights.
But I have no RGB lights, so not sure if this is the solution you're searching for :)
Yes, thank you so much but the MQTT call itself does not support a RGB value yet. I'm happy to convert to Hue, saturation and brightness but 'saturation' does not work. So we're left with Hue and brightness. We really need to wait for Domoticz to get full color support instead of only the brightest of the bunch. (100% saturation).

matv wrote: I'm completely stuck and I hope someone is able to give me some general directions..
After following the outdated Wiki and finding out that that is not the way to go anymore I started with these instructions.
Being completely new to Unix it naturally involves a lot of trial and error for me..

The first error I get when executing the code above;
-bash: cd: /usr/lib/node_modules: No such file or directory

I found that there's a way to search with find / -name "node_modules" and that showed the location of the folder:
/usr/local/lib/node_modules

I then changed the code on top, replcaing cd /usr/lib/node_modules with the path I just found.
The error is gone but when is type ls in /usr/local/lib/node_modules, I only see a folder called npm with the following contents:

Could someone provide me with some tips on how to proceed? All the folders, Node-installs and file locations are getting a bit too much to oversee at this point.. Thanks in advance!
Hi,

You were almost there! Nice job though doing this without any knowledge.

The command sudo npm set prefix '/usr' -g sets the 'main' directory for npm. This has to be:
sudo npm set prefix '/usr/local' -g on your end.

Try the following list instead:

Code: Select all

* Installing homebridge and the plugin *
sudo service homebridge stop
sudo npm set prefix '/usr/local' -g
sudo npm install -g homebridge --unsafe-perm
sudo npm install -g homebridge-edomoticz --unsafe-perm
cd /usr/local/lib/node_modules
sudo npm rebuild homebridge
sudo npm rebuild homebridge-edomoticz

* To edit your config: *
sudo nano -w ~/.homebridge/config.json

* Starting homebridge *
homebridge

* Auto-starting homebridge *
sudo service homebridge start
matv
Posts: 8
Joined: Sunday 08 January 2017 18:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: EU
Contact:

Re: homebridge-edomoticz Plugin

Post by matv »

Thank you so much Ramon!
Looking at the culprit it makes complete sense to me now. I learned something today :)

Homebridge does start now, with the aforementioned warnings that are described in Marci's first post of this topic.
And I was pleasantly surprised that I can also control my 'Domoticz lamps (switches)' straight from the iOS Home app! No 3rd party app needed.
Amazing. Thanks agian :)

(I did get one scary error during install, regarding node/node-gyp/curve (?)
Just for my peace of mind I'd like to verify that this is all good.)

Code: Select all

pi@raspberrypi:~ $ cd /usr/local/lib/node_modules
pi@raspberrypi:/usr/local/lib/node_modules $ sudo npm rebuild homebridge

> [email protected] install /usr/local/lib/node_modules/homebridge/node_modules/curve25519-n
> node-gyp rebuild

gyp ERR! clean error 
gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile'
gyp ERR! stack     at Error (native)
gyp ERR! System Linux 4.4.38-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/curve25519-n
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 

npm ERR! Linux 4.4.38-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "rebuild" "homebridge"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the curve25519-n package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs curve25519-n
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls curve25519-n
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/npm-debug.log
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post by TheRamon »

Nice!!!!

Yeah that error is no biggie. It was trying to rebuild something. It didn't have the permission to do so. But apparently there's already a built version on your system, hence the program up and running.

Enjoy!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest