Page 21 of 86

Re: eDomoticz Homebridge-Plugin

Posted: Sunday 24 July 2016 20:16
by Marci
markk wrote:I was wondering if you've yet had a chance to amend the instructions to reflect the changes on the current Domoticz image so I don't hit the same issues again. If not, could I use an older Domoticz image, install the Homebridge plugin then upgrade Domoticz to the latest version?
Current instructions (which haven't changed in ages) work perfectly for me, and always have. I’ve just added some minor tweaks to them which cease any confusion caused by the pre-existing homebridge installation.

Ultimately the steps for any linux distribution are the same.
  • Install node & npm
  • Install homebridge using npm
  • Install the plugin using npm
  • If on wheezy install forever using npm
Run everything (via forever if using wheezy).

I won’t be testing and reviewing instructions for every image update.

Re: eDomoticz Homebridge-Plugin

Posted: Sunday 24 July 2016 20:39
by Marci
How do you do it with say ceiling lights? They are called living room - ceiling light, Hallway - Ceiling Light etc.. I can't change them both to ceiling light can I? But have them in different rooms?
You use HomeKit device groups, accessory types/icons, and rooms to categorise them. Eve offers different icons for lights which denote main lights, desk lamps, floor lamps... and you should create your full room structure in Eve, then assign your devices to those rooms. The devices can be called Fred and Linda as far as HomeKit is concerned - it will look at the location, service & icon type to determine what and where it is. NAMING your devices with the info just causes confusion. If Siri is your primary interface to Domoticz, then you adapt everything in Domoticz to work the HomeKit way.

Re: eDomoticz Homebridge-Plugin

Posted: Wednesday 27 July 2016 14:16
by G3rard
TheRamon wrote:
bxlouis wrote:
Marci wrote:-
Hi Marci,

Will you provide an update about this issue ? At least the second one ?

Many thanks

Hi bxlouis,

I have improved the blinds support.
When my pull request gets approved the blinds will function properly, and you will be able to handle "inverted" blinds too.

https://github.com/PatchworkBoy/homebri ... cz/pull/28
I have 2 Somfy blinds which after the above update show in Eve as blinds percentage, but they are normal blinds. See one of the JSON outputs below (other one is the same). "SwitchType" : "Blinds", "SwitchTypeVal" : 3.
If I change the percentage it's not responding.

Before the update these were shown as On/Off.
Any idea's how to fix this?

Code: Select all

{
   "ActTime" : 1469620742,
   "ServerTime" : "2016-07-27 13:59:02",
   "Sunrise" : "05:49",
   "Sunset" : "21:34",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Open",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 4,
         "HardwareName" : "RFXCOM - RFXtrx433",
         "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
         "HardwareTypeVal" : 1,
         "HaveDimmer" : false,
         "HaveGroupCmd" : false,
         "HaveTimeout" : false,
         "ID" : "012233",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-07-27 12:02:08",
         "Level" : 0,
         "LevelInt" : 0,
         "MaxDimLevel" : 0,
         "Name" : "Zonnescherm voor",
         "Notifications" : "false",
         "PlanID" : "20",
         "PlanIDs" : [ 20 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Open",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "RFY",
         "SwitchType" : "Blinds",
         "SwitchTypeVal" : 3,
         "Timers" : "false",
         "Type" : "RFY",
         "TypeImg" : "blinds",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "71"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

Re: eDomoticz Homebridge-Plugin

Posted: Wednesday 27 July 2016 16:20
by Marci
Shall investigate - bear with me!

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 28 July 2016 16:57
by sandurz
Great work on the plugin! Just getting into external server -> HomeBridge stuff and was very pleased with the quick setup.

Having a problem with HomeBridge not receiving all updates from Domoticz - I've got a HTTP Ping device checking for my laptop to be awake and tried using that as both a switch and a motion sensor. Domoticz gets the status perfect but these updates aren't seeming to make it into HomeBridge. When I first boot up HomeBridge I see the proper interval of data update - every 5 seconds it pings and updates the status accordingly, and the correct status shows up in HomeBridge logs and on the device status on HomeKit. But after that it seems like these updates just drop off the face of the earth...connections sent TO Domoticz work just fine all the while.

Any tips?

And again, thanks!

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 28 July 2016 17:00
by Marci
See second reply in this post - same issue: viewtopic.php?f=36&t=10272&start=360#p90623

Homebridge-eDomoticz does not ‘receive' updates. It ‘requests’ them.

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 28 July 2016 17:09
by sandurz
Lol I went back and read the whole thread and was gonna come leave an edit/response and you managed to respond in that time. Thanks!

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 28 July 2016 18:39
by Artic1980
I noticed that the percentage of app homekit cpu says it is not a supported accessory instead Eve sees no problems
thank you

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 28 July 2016 22:23
by Marci
Some apps support custom-defined service types outside of the HomeKit spec (such as Eve) and some don't. Down to your choice of app - nothing I can do about it I'm afraid.

Re: eDomoticz Homebridge-Plugin

Posted: Friday 29 July 2016 10:16
by TheRamon
G3rard wrote: I have 2 Somfy blinds which after the above update show in Eve as blinds percentage, but they are normal blinds. See one of the JSON outputs below (other one is the same). "SwitchType" : "Blinds", "SwitchTypeVal" : 3.
If I change the percentage it's not responding.

Before the update these were shown as On/Off.
Any idea's how to fix this?

Code: Select all

{
   "ActTime" : 1469620742,
   "ServerTime" : "2016-07-27 13:59:02",
   "Sunrise" : "05:49",
   "Sunset" : "21:34",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Open",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 4,
         "HardwareName" : "RFXCOM - RFXtrx433",
         "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
         "HardwareTypeVal" : 1,
         "HaveDimmer" : false,
         "HaveGroupCmd" : false,
         "HaveTimeout" : false,
         "ID" : "012233",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-07-27 12:02:08",
         "Level" : 0,
         "LevelInt" : 0,
         "MaxDimLevel" : 0,
         "Name" : "Zonnescherm voor",
         "Notifications" : "false",
         "PlanID" : "20",
         "PlanIDs" : [ 20 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Open",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "RFY",
         "SwitchType" : "Blinds",
         "SwitchTypeVal" : 3,
         "Timers" : "false",
         "Type" : "RFY",
         "TypeImg" : "blinds",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "71"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
Hi G3rard,

To be honest, I think this is an "issue" with the Eve app. The Blinds in HomeKit (Window Covering) must have two characteristics:
  • Current position
  • Target position
The HomeKit app on iOS 10 handles this perfectly. Upon tapping the blind, the blind will open/close fully. (100%/0%)
The plugin sees these values and will trigger a On/Off command. Upon changing the percentage, the plugin checks if the percentage is below 50%, and will close the blind. 50+ equals open.
Ofcourse, blinds that support percentage will behave according to the percentage.

I have tested in the Eve app, and indeed shows a percentage. When I change the percentage above 50% though, the blinds "open" in Domoticz.
Eve does not have a "full close/open" button in their app, so using the blinds in their app is kind of a PITA yeah..

To give you an impression of the iOS 10 homekit way:
Spoiler: show
Default:
Image
Image

After tapping the icon:
Image
Image

After holding the homekit icon, one can enter the "percentage change" view:
Image
Image

Eve app:
Image
Image

After changing the percentage:
Image
Image

PS. I will investigate if there is another hack/way/whatever to make "normal" blinds act as switches, but behave as blinds in Siri.

Re: eDomoticz Homebridge-Plugin

Posted: Friday 29 July 2016 13:20
by G3rard
@TheRamon,
Thanks for the reply. I will try the 50% in Eve (as I haven't tried it up to 50% yet :) ).
And I will wait for any updates or iOS 10 :mrgreen:

Re: eDomoticz Homebridge-Plugin

Posted: Friday 29 July 2016 13:24
by simon_rb
Blinds are working fine for me on iOS 10 and HomeKit app. I have curtains in the living room and can say close the curtains in the living room and it will. Shame Siri replies I have set the curtains to 100% or 0% lol. Working well though. Great work.


Sent from my iPhone using Tapatalk

Re: eDomoticz Homebridge-Plugin

Posted: Friday 29 July 2016 19:42
by Jochem
Hi All,

Does anyone know if the wind and rain equipment from TFA is supported in homebridge???

Regard, Jochem

Re: eDomoticz Homebridge-Plugin

Posted: Friday 29 July 2016 20:04
by Marci
See...
q: Is my [device] supported?
...in the first post.

Re: eDomoticz Homebridge-Plugin

Posted: Wednesday 03 August 2016 16:32
by sandurz
So after poking around on some Wemo switches I have running through Homebridge with the wemo platform plugin, I've seen that they have the capability to update Homekit with their status and push those changes from the Homebridge server. I can toggle the manual switch and the HomeKit status updates almost instantly. Part of that is easy with Wemo since the switches broadcast changes and the plugin has a client listening for those Wemo updates and acts accordingly.

Perhaps you've already explored this, but how feasible would it be to:

1) Listen for Domoticz changes, either through a JSON poll of all devices or some LUA script we run that broadcasts the deviceschanged array
2) Take those changes and update Homebridge in the same manner that wemo-platform does

There's some interactivity that's so close when it comes to Domoticz <> pure HomeKit devices that just doesn't work as well as it could if we didn't have to trigger those manual global Homebridge status updates by refreshing whatever HomeKit app we use. I've just seen that it's possible with Homebridge and wanted to let you know! Sorry to bother you on the topic again if you've been aware of this previously, and thanks for all your work!

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 04 August 2016 0:03
by Marci
Am aware... just a matter of available time to integrate an MQTT client into the plugin to subscribe to Domoticz's existing realtime MQTT Output stream.

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 04 August 2016 0:06
by TheRamon
Would certainly be nice, but when we're taking this approach we should definitely look at MQTT for this. It's basically a "stream" of messages with device statuses that instantly get pushed though there when a device changes its status. You could imagine it as a push message on your iOS device.

Edit: oh wow. Jinx.

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 04 August 2016 10:05
by deejc
That sounds amazing, if the plugin had real time status that would be the pinnacle of its usefulness, I mean don't get me wrong I love it and find it really responsive except for the sometimes scrolling I have to do to get an update to show in Home app but Marci is a great dev and this plugin is easily one of the best written for homebridge.


Sent from my iPhone using Tapatalk

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 04 August 2016 14:47
by sandurz
Oh wow even better! Had no idea Domoticz had an MQTT stream at all. That's perfect. Thanks for the reply!

eDomoticz Homebridge-Plugin

Posted: Thursday 04 August 2016 16:52
by Marci
Yup, hence the SD Card images come with Node-RED and Mosquitto pre installed by default.

See https://www.domoticz.com/wiki/MQTT#Usef ... sibilities