homebridge-edomoticz Plugin

Moderator: leecollings

anasazi
Posts: 43
Joined: Saturday 06 August 2016 9:53
Target OS: Windows
Domoticz version:
Location: Sweden
Contact:

Re: homebridge-edomoticz Plugin

Post by anasazi »

G3rard wrote:
simon_rb wrote:@G3rard

Code: Select all

sudo rm -r /usr/lib/node_modules/homebridge-edomoticz/
then in /usr/lib/node_modules/

Code: Select all

sudo git clone https://github.com/PatchworkBoy/homebridge-edomoticz.git 
But restarting homebridge gives the following error:

Code: Select all

Error: The requested platform 'eDomoticz' was not registered by any plugin.
What am I missing? I tried a 'npm update' but that makes no difference.
Also the homebridge-edomoticz gets installed in that folder, so that went okay.
I was also getting this error but got it working by running this command after the git clone:

Code: Select all

sudo npm install
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 »

Thanks for sharing. Will try that with the next update.
Not using Domoticz anymore
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 »

Yeah, plugin crashes because it can't find mqtt and/or request. You'll have to install those. Using npm install is a good way, yeah.

Regarding the 99%, that's because Domoticz does not get 100% for hue lamps. They turn off when sending 100%. So I'm sending 254 for all dimmers. Corresponds to 99.something%. I'll try to make a fix.
aram wrote:I have an outdoor Oregon temp/humidity/pressure device + weather underground setup. on domoticz web interface all the measurements are correct.
however using Eve and Home apps negative temperature values are converted to positive. e.g. now its -4.8C outside, it shows as 4.8C in Eve and 5C in Home. I had the same issue with both non MQTT version and after switching to MQTT. Bug or an issue on my side?

Another strange issue - Eve shows all devices from Domoticz while Home shows Unsupported or does not show at all. is this expected behaviour?
This is fixed in Git on the master branch. Not in npm yet though!
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 »

Npm will be updated this afternoon... you got an npmjs user account Ramon?? Can add you as an owner...
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 »

TheRamon wrote:Regarding the 99%, that's because Domoticz does not get 100% for hue lamps. They turn off when sending 100%. So I'm sending 254 for all dimmers. Corresponds to 99.something%. I'll try to make a fix.
Is this why we are 1% out?
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 »

TheRamon wrote:@simon_rb:

I have just fixed the issue with brightness. How I reproduced it:
- Open Home app
- Dim value to 50% or so.
- Turn off the lamp
- Close and kill Home app
- Reopen Home app
- Turn on the lamp (would return to 100% here..)

Have also committed a new version to the master branch.
You fixed the on not being sent if the dimmer/switch is on, however has the same been applied for the off. IE, if the switch is off and you ask to turn off it wont send an off command? Only reason I ask is sometimes someone might turn a light on at the wall (so domoticz still thinks its off) and later you ask to turn them off and can't anymore as it thinks its already off. Then you say turn on just so you can say turn off but then it sends an On command so the lights go crazy lol. No biggy really - just no harm in sending an off command if they are already off lol. If its difficult to do, don't worry! :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 »

Marci wrote:Npm will be updated this afternoon... you got an npmjs user account Ramon?? Can add you as an owner...
Nope, did not have one until now. xtheramon :mrgreen:
I'll have to figure that out though. NPM 101!
simon_rb wrote:Is this why we are 1% out?
Yep it is! Working on that.
simon_rb wrote: You fixed the on not being sent if the dimmer/switch is on, however has the same been applied for the off. IE, if the switch is off and you ask to turn off it wont send an off command? Only reason I ask is sometimes someone might turn a light on at the wall (so domoticz still thinks its off) and later you ask to turn them off and can't anymore as it thinks its already off. Then you say turn on just so you can say turn off but then it sends an On command so the lights go crazy lol. No biggy really - just no harm in sending an off command if they are already off lol. If its difficult to do, don't worry! :lol:
Yeah err.. I changed the code so that it would not send off if the device's off. Same for on, won't send if the device is already on. Basically: if old_powerstate != new_powerstate. It's only plugin based though. I won't look at Domoticz values for that. So if you've turned it off in Domoticz and try to turn it on @ plugin (Home app) you might run into some problems.
Not sure though. Looking in to that!
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 »

Ah, ok. Would it be possible to send off even if it's off? Don't know if that causes problems for anyone else? Like I said earlier with the off command I can't see sending an off command if it thinks it's already off does and harm? For me, people turn lights on from the wall switches (they only receive 433mhz signals and do not send their state) so domoticz thinks they are off still. So I'll ask Siri to turn them off but obviously no off command is sent.

I don't know if people have an issue with off being sent if it's already off. I can't see any issues? Unless I have missed something obvious! :D

Of course, thank you for listening to my comments and suggestions. You, Marci and all the others are a credit to this forum! Cheers!!!


Sent from my iPhone using Tapatalk
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 »

Have just fixed the 1% issue. Turned out to be a "rounding" issue. HomeKit would always round values like 55.18% to 55%, and 55.98% to 56%. Domoticz does a "floor" on all values so 55.98% becomes 55%.
I have just edited this functionality and am testing this locally.

The way switches work in Domoticz is still a bit weird though. I, for example, have a switch that when slided to 100% will show 96% as it's maximum value. (Because of its steps). The plugin now copies this behaviour which I guess is correct.
It is still weird though that Domoticz does not "show" 100% for these switches to make up for the "step" bug. Nevertheless, I presume when Domoticz makes this change, the plugin will automatically adapt.
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 »

simon_rb wrote:Ah, ok. Would it be possible to send off even if it's off? Don't know if that causes problems for anyone else? Like I said earlier with the off command I can't see sending an off command if it thinks it's already off does and harm? For me, people turn lights on from the wall switches (they only receive 433mhz signals and do not send their state) so domoticz thinks they are off still. So I'll ask Siri to turn them off but obviously no off command is sent.

I don't know if people have an issue with off being sent if it's already off. I can't see any issues? Unless I have missed something obvious! :D

Of course, thank you for listening to my comments and suggestions. You, Marci and all the others are a credit to this forum! Cheers!!!


Sent from my iPhone using Tapatalk
I'm totally getting your point but I'm not sure whether to make this functionality just because of the 433mhz bug. Basically, there's a problem. Your switches won't get switched (occasionally). I think there's a few fixes to this problem:

- You could move the receiver closer to your sender.
- The RFLink / RFXComm should send the off command longer.
- Domoticz should send multiple "off" commands if it detects the device is 433mhz.
- You could make a script in Domoticz that sends the command multiple times.
- HomeKit plugin could change so that when a device is already off, the off command gets sent again.

You're basically suggesting the last pt. in my list. I don't really agree though because in Domoticz you can't double-off either. If you turn the switch off in Domoticz you'll have to turn it on first before switching it off again. I'd love to keep this functionality the same to Domoticz so no weird experiences occur.

What do you think?
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 didn't have any weird occasions when you send an off if its already off.

The issue isn't the device not receiving the off but that domoticz doesn't know the lights are on as they were turned on at the wall. Domoticz will send an off even off the switch is already off. In events for example. And if I need to turn them off when they are on and domoticz thinks it's off I'd either use pilot app which allows you to send an off command no matter what state the switch is in or use Siri, the latter not working since the On/Dimmer change :D

Make sense?


Sent from my iPhone using Tapatalk
Last edited by simon_rb on Monday 14 November 2016 15:54, edited 1 time in total.
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: homebridge-edomoticz Plugin

Post by Nautilus »

simon_rb wrote:I didn't have any weird occasions when you send an off of its already off.

The issue isn't the device not receiving the off but that domoticz doesn't know the lights are on as they were turned on at the wall. Domoticz will send an off even off the switch is already off. In events for example. And if I need to turn them off when they are on and domoticz thinks it's off I'd either use pilot app which allows you to send an off command no matter what state the switch is in or use Siri, the latter not working since the On/Dimmer change :D

Make sense?
Can you just add the remote button to Domoticz via RFLink / RFXCom and link them to appropriate lights? I'm using the Telldus Live for 433MhZ which cannot be directly connected to Domoticz so I've taught it to read all the remote codes and update the switch status in Telldus Live accordingly. Then, using their API I read the status of all the lights once a minute and update in Domoticz if the status is different there. So in my setup, there's up to a minute delay in updating the status but in your case you should be able to update it immediately?
Marci wrote:Npm will be updated this afternoon... you got an npmjs user account Ramon?? Can add you as an owner...
Thanks! :) But was it really updated? I think it still says there on the site "published 3 weeks ago" and also when running the update command on my RPi, it seemed that nothing was done.
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 »

Nautilus wrote:
Can you just add the remote button to Domoticz via RFLink / RFXCom and link them to appropriate lights? I'm using the Telldus Live for 433MhZ which cannot be directly connected to Domoticz so I've taught it to read all the remote codes and update the switch status in Telldus Live accordingly. Then, using their API I read the status of all the lights once a minute and update in Domoticz if the status is different there. So in my setup, there's up to a minute delay in updating the status but in your case you should be able to update it immediately?
No, the light switches do no send an on command, the wall switches are only receivers. They are hard wired into the light circuit so when they are turned on/off at the wall Domoticz has no idea. They don't send at all, only receive. I thought it was handy to be able to send off commands, what if you say turn off something using Siri and the RF signal clashed with another and the switch doesn't receive it - you can just issue the off command again. The only issue with the on command was that if dimmers were on and you sent and on command they would go nuts dimming and brightening where as off commands I can't see doing anything wrong other than adding another 'off' in the switches log.. lol

If i'm the only person who finds this useful then theres no point in changing it - I used to use the off command when stuff was on but domoticz thought it was off already so thats why I have missed it 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 »

Alright, have changed a few things.. Now able to send multiple power off calls as requested.
We'll call this a test. If there are any issues I'm afraid I'll have to reverse it. I don't think there will be any issues though, but lets see.

Other than that, I have also pushed a new version to Git containing the percentage fix I mentioned earlier.

There is an issue with Hue lights in Domoticz though. Please see the following calls I have tested:

Set dim level 100%: /json.htm?type=command&param=switchlight&idx=14&switchcmd=Set%20Level&level=100

Code: Select all

{
  "status": "OK",
  "title": "SwitchLight"
}
Status: /json.htm?type=devices&rid=14

Code: Select all

      ...     
      "Image": "Light",
      "IsSubDevice": false,
      "LastUpdate": "2016-11-14 16:15:59",
      "Level": 99,
      "LevelInt": 99,
      "MaxDimLevel": 100,
      "Name": "Hue Lamp 1",
      ...
As you can see, Domoticz returns 99 for the level. I'm sending level=100 though. So that 99% bug for Hue lamps, I can't fix.
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 »

Thanks mate! Funny enough I just issued a Git pull 30 secs ago and saw he changes lol. Will test now :D


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 »

TheRamon wrote:Alright, have changed a few things.. Now able to send multiple power off calls as requested.
We'll call this a test. If there are any issues I'm afraid I'll have to reverse it. I don't think there will be any issues though, but lets see.
Just tested and works like it used it. There shouldn't be any issues as this was how it worked before and I don't believe anyone mentioned any issues :D
TheRamon wrote:Other than that, I have also pushed a new version to Git containing the percentage fix I mentioned earlier.
This hasn't worked for me, all my 100 step dimmers still set things to 1% less
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 »

simon_rb wrote:
TheRamon wrote:Alright, have changed a few things.. Now able to send multiple power off calls as requested.
We'll call this a test. If there are any issues I'm afraid I'll have to reverse it. I don't think there will be any issues though, but lets see.
Just tested and works like it used it. There shouldn't be any issues as this was how it worked before and I don't believe anyone mentioned any issues :D
TheRamon wrote:Other than that, I have also pushed a new version to Git containing the percentage fix I mentioned earlier.
This hasn't worked for me, all my 100 step dimmers still set things to 1% less
On 100% only, right? Try a random value like 56% or so. Does it still offset there, too?
'Cause I think the 100%-99% issue is Domoticz related. Check the switch value in the API as I mentioned, even Domoticz returns 99% instead of 100%.
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 »

TheRamon wrote: On 100% only, right? Try a random value like 56% or so. Does it still offset there, too?
Never tried 100% as these 100 step dimmers are all for my volume controls and never have them that high :D Tried 50% and its says its setting to 50% it sets them to 49%. Same happens at any number I ask it to. If I use the sliders in iOS 10 Home App, I can set it to say 50% but then when you let go it drops to 49% and sets it all to 49%.. So if I set slider to 70% it will drop to 69% and set everything to 69%.

@G3rard

Did this fix your percentage issue or is it the same as above? Maybe its my setup....
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 »

Weird! Let's check at G3rards side first.
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 »

Will have a look at it this evening.
Not using Domoticz anymore
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest