Page 53 of 86
Re: homebridge-edomoticz Plugin
Posted: Tuesday 08 November 2016 19:34
by bdormael
When I do npm update , nothing happens, I suppose it's on another branch?
I'm on the master branch
Verzonden vanaf mijn iPad met Tapatalk
Re: homebridge-edomoticz Plugin
Posted: Tuesday 08 November 2016 19:44
by simon_rb
bdormael wrote:When I do npm update , nothing happens, I suppose it's on another branch?
I'm on the master branch
I cloned the Git repo, used that and it works
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 3:42
by thom
It works ! thank you for your patience.
TheRamon wrote:Check your config file. The plugin is not called homebridge. It's called eDomoticz. Change that and it'll work.
@simon_rb, hpapagaj:
I'll have a look at Siri!
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 9:21
by madrian
Good morning,
I have the npm version installed on my system.
Here is what I did to update to git version:
Code: Select all
$ cd /usr/lib/node_modules/
$ sudo mv homebridge-edomoticz/ homebridge-edomoticz_npm/
$ sudo git clone https://github.com/PatchworkBoy/homebridge-edomoticz.git
$ sudo /etc/init.d/homebridge restart
Code: Select all
2016-11-09 09:18:17.629 User: Admin initiated a switch command (25/LED/Set Level)
2016-11-09 09:18:17.635 LUA: dev Set Level: 96 %
2016-11-09 09:18:17.635 LUA: Value received from Domoticz was 31
2016-11-09 09:18:17.635 LUA: Calculated value for ESP is 1023
2016-11-09 09:18:17.635 LUA: Dimming LED to 1023
2016-11-09 09:18:17.635 LUA: echo Fadetimer=2000,LED1_target=1023 | socat - TCP:192.168.1.10:43333
2016-11-09 09:18:17.630 (Quinled_1) Lighting 5 (LED)
2016-11-09 09:18:17.721 User: Admin initiated a switch command (25/LED/On)
2016-11-09 09:18:17.729 LUA: dev On
2016-11-09 09:18:17.729 LUA: Turning on LED
2016-11-09 09:18:17.730 LUA: echo Fadetimer=2000,LED1_target= 8 | socat - TCP:192.168.1.10:43333
2016-11-09 09:18:17.722 (Quinled_1) Lighting 5 (LED)
...not working.
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 9:36
by bdormael
Did a git pull, restarted,
still same issue I'm afraid.
Changing the state of SecPanel via LUA.
Then check on my phone in "Home" on 4G connection, still shows old state;
Go out of "Home" and go back in again, then the new state is reflected.
In fact what I noticed is:
- When opening "Home" after the status is changed, it shows the correct status, then it shows "Updating" (on the switch) in "Home", then the status shows the previous state again
- Then when closing "Home" and opening it again, the correct status is reflected.
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 11:48
by TheRamon
simon_rb wrote:Genius! My dimmers are working with Siri and the sliders in iOS 10 Home app!!! Whoop Whoop!
Thanks!
dfranco wrote:Hi all after installing my homebridge I’m getting the follow error:
/home/pi/domoticz/homebridge/node_modules/homebridge-edomoticz/index.js:1107
motionService.getCharacteristic(new Characteristic.StatusLowBattery()).on('get', this.getLowBatteryStatus.bind(this));
^
Any idea?
It looks like you're using a very very old version. Try to update the plugin.
sudo npm install -g homebridge-edomoticz
NewFolk wrote:Is Npm version the same to Git master branch?
Nope, the git master is a few commits ahead.
bdormael wrote:
When I do npm update , nothing happens, I suppose it's on another branch?
I'm on the master branch
Try to get the version through git. Remove your homebridge-edomoticz folder in
/usr/lib/node_modules/homebridge/node_modules/ or
/usr/local/lib/node_modules/homebridge/node_modules/.
Then, in that node_modules folder type:
sudo git clone https://github.com/PatchworkBoy/homebri ... moticz.git
thom wrote:It works ! thank you for your patience.
Thank you!
hpapagaj wrote:...not working.
Looks like you took the correct steps.. What app are you using? The plugin is not updating any "on" or "off" states anymore if the device was already "on" or "off".
bdormael wrote:
still same issue I'm afraid.
Changing the state of SecPanel via LUA.
Then check on my phone in "Home" on 4G connection, still shows old state;
Go out of "Home" and go back in again, then the new state is reflected.
Your LUA script might not update through MQTT. Could you post a domoticz log of when you change the state to "away" or something through lua?
I'm curious because whenever the sec panel updates, a MQTT message is sent. The homekit (plugin/app) picks this up and changes state accordingly.
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 12:01
by bdormael
Your LUA script might not update through MQTT. Could you post a domoticz log of when you change the state to "away" or something through lua?
I'm curious because whenever the sec panel updates, a MQTT message is sent. The homekit (plugin/app) picks this up and changes state accordingly.
The only logging which is done when changing the status of the SecPanel is:
2016-11-09 11:52:24.743 (Domoticz Internal) Security (Alarm)
The LUA updates for my other switches 'eg. light switches) are updated correctly.
The LUA I'm using for changing the secpanel status is:
commandArray['SecPanel']='Disarm'
In fact what I noticed is:
- When opening "Home" after the status is changed, it shows the correct status, then it shows "Updating" (on the switch) in "Home", then the status shows the previous state again
- Then when closing "Home" and opening it again, the correct status is reflected.
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 12:10
by MikeF
Forgive me, but I'm confused (not difficult!).
I'm running the pre-MQTT version of homebridge-edomoticz, and I've been following this thread to try to understand the implications of MQTT integration.
I don't currently use MQTT, or have it installed. My set-up is Domoticz (3.5181) running on a RPi (Jessie) over WiFi to my local network, with a MySensors (2.0.0) Arduino USB serial gateway and various nodes.
To use the current version of homebridge-edomoticz, must I install MQTT on the RPi? and what about my gateway - do I need to change the way it connects to the controller (i.e., by Ethernet / WiFi)?
Alternatively, am I 'stuck' with the 'old' version of homebridge-edomoticz?
Thanks in anticipation,
Mike
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 12:45
by TheRamon
bdormael wrote:
In fact what I noticed is:
- When opening "Home" after the status is changed, it shows the correct status, then it shows "Updating" (on the switch) in "Home", then the status shows the previous state again
- Then when closing "Home" and opening it again, the correct status is reflected.
Wow, great info. I can now reproduce the problem. Will have a look!
MikeF wrote:
To use the current version of homebridge-edomoticz, must I install MQTT on the RPi? and what about my gateway - do I need to change the way it connects to the controller (i.e., by Ethernet / WiFi)?
Hi Mike,
Yes, you'll have to have a MQTT broker (think of it as a server) running. You can try and test if you have MQTT by typing
mosquitto[enter] on your Raspberry. Default Domoticz installation comes with mosquitto as a default. If that command works, you could try:
/etc/init.d/mosquitto status.
With a bit of luck you'll see:
Active: active (running).
After that it's just a matter of downloading the newest version of the plugin through npm (easiest) by typing:
sudo npm install -g homebridge-edomoticz.
Change your config as stated in the readme here:
https://github.com/PatchworkBoy/homebridge-edomoticz and you're good to go!
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 12:56
by TheRamon
@bdormael:
Please see the latest version in git. Use git pull in your homebridge-edomoticz directory. Should be fixed now.
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 13:56
by madrian
@TheRamon,
iOS 10 Home app + iPhone 7 Plus. Domoticz V3.5837. Isn't there a cache or something?
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 14:16
by TheRamon
Not that I know of. The only way the "On" command can be resent is if the device was actually Off.. did you try multiple times? It shouldn't send the On command more than once if the device was already on. Just the dimming (Set Level).
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 17:10
by madrian
Video is better, than 100 words.
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 17:37
by TheRamon
Haha nice. I didn't see you restart homebridge though. Is this your problem?
Try: sudo /etc/init.d/homebridge restart
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 18:24
by madrian
I forgot to restart on the video, but I did after recording. Nothing.
Code: Select all
$ sed -n 88p lib/domoticz_accessory.js
this.cachedValues[Characteristic.On.UUID] = powerOn;
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 19:06
by MikeF
Ramon wrote:
After that it's just a matter of downloading the newest version of the plugin through npm (easiest) by typing: sudo npm install -g homebridge-edomoticz.
Change your config as stated in the readme here:
https://github.com/PatchworkBoy/homebridge-edomoticz and you're good to go!
Unfortunately that didn't work (I got MQTT to work) - devices weren't updating in Eve / iOS Home - so I tried reinstalling homebridge and homebridge-edomoticz, and still no joy. Then I followed the Jessie start-from-scratch instructions from page 1, and removed nodejs (I think I was on 2.something), and installed nodejs (i.e., npm) 6.3.1. I then reinstalled homebridge and homebridge-edomoticz again, and although they installed OK, I get the following error when I run homebridge (i.e., just typing 'homebridge' on the command line):
Code: Select all
pi@raspberrypi:~/.homebridge $ homebridge
/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/dns_sd.js:35
throw ex;
^
Error: Module version mismatch. Expected 48, got 14.
at Error (native)
at Object.Module._extensions..node (module.js:568:18)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/dns_sd.js:24:20)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 23:07
by simon_rb
@TheRamon,
Curiosity with the dimmers... if they are not used for a few mins when I turn them on using Apples Home app they always go to 100% and don't save the previous levels even though they are in Domoticz. Is this because the way it caches stuff now?
Cheers dude
Re: homebridge-edomoticz Plugin
Posted: Wednesday 09 November 2016 23:21
by MikeF
OK, working now
Required an npm rebuild in homebridge folder, also deleted homebridge folders in /usr/lib/, which were obviously confusing things.
Thanks for help, @TheRamon
Re: homebridge-edomoticz Plugin
Posted: Thursday 10 November 2016 9:08
by bdormael
TheRamon wrote:@bdormael:
Please see the latest version in git. Use git pull in your homebridge-edomoticz directory. Should be fixed now.
Working perfect now, thx for the swift support
Re: homebridge-edomoticz Plugin
Posted: Thursday 10 November 2016 10:46
by TheRamon
hpapagaj wrote:I forgot to restart on the video, but I did after recording. Nothing.
Code: Select all
$ sed -n 88p lib/domoticz_accessory.js
this.cachedValues[Characteristic.On.UUID] = powerOn;
Oh wow. So weird. I'll look into this. Video is crystal clear though. I see them dim to at 100%, then revert to the percentage you set when turning "on". (50% or so? doesn't matter.)
simon_rb wrote:@TheRamon,
Curiosity with the dimmers... if they are not used for a few mins when I turn them on using Apples Home app they always go to 100% and don't save the previous levels even though they are in Domoticz. Is this because the way it caches stuff now?
Cheers dude
Yeah! I had the same problem. Will look into this. Looks like after a "refresh" of Domoticz values every dimmer turns to 100% instead of the saved value.
@bdormael, MikeF:
Good to hear! Nice!!
@MikeF: I forgot to mention, you need to add a MQTT hardware device though to connect to your broker. But anyways, you've got it working!