Page 63 of 86

Re: homebridge-edomoticz Plugin

Posted: Wednesday 04 January 2017 8:10
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.

Re: homebridge-edomoticz Plugin

Posted: Wednesday 04 January 2017 9:11
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

Re: homebridge-edomoticz Plugin

Posted: Wednesday 04 January 2017 9:52
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

Re: homebridge-edomoticz Plugin

Posted: Wednesday 04 January 2017 19:50
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:

Re: homebridge-edomoticz Plugin

Posted: Friday 06 January 2017 9:17
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! :)

Re: homebridge-edomoticz Plugin

Posted: Friday 06 January 2017 9:43
by TheRamon
@MaKin:

I have just committed a new version (also available in npm) which contains support for Humidity sensors.

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 9:42
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:

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 12:00
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.

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 12:12
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.

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 12:12
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.

homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 12:14
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.

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 12:21
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.

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 13:55
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

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 14:06
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.

Re: homebridge-edomoticz Plugin

Posted: Saturday 07 January 2017 14:16
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

Re: homebridge-edomoticz Plugin

Posted: Sunday 08 January 2017 13:24
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 :)

Re: homebridge-edomoticz Plugin

Posted: Sunday 08 January 2017 19:11
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 3338 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!

Re: homebridge-edomoticz Plugin

Posted: Monday 09 January 2017 16:37
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

Re: homebridge-edomoticz Plugin

Posted: Monday 09 January 2017 18:07
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

Re: homebridge-edomoticz Plugin

Posted: Monday 09 January 2017 19:08
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!