tylerrmit / homebridge-coviva-hager

Homebridge plugin for Coviva by Hager (unofficial)
MIT License
3 stars 0 forks source link

Supporting coviva shutter/blinds module #1

Closed benni4k closed 3 years ago

benni4k commented 3 years ago

I would like to ask for the support of an additional Coviva module. I am using it to control the shutters.

The message in the homebridge logfile about these modules: Ignoring device [Ankleide] with unsupported profile [2002] [Unknown]

https://mobile.hager.de/schalterprogramme-und-gebaeudesteuerung/knx-gebaeudesystemtechnik/knx-funk-quicklink/jalousieaktoren/knx-funk-jalousieaktor-1fach-binaereingang-2fach-up/trm692g/169749.htm

The coviva plug-in is perfect and I would appreciate if there is a way to add this shutter /blinds module to my HomeKit.

tylerrmit commented 3 years ago

Hi thanks for the feedback! I'm thrilled that someone else is using it and benefiting from it.

I've just published a new version v0.1.29 to help gather a little bit more info about unsupported devices. Could you please update and show me what it says about the "attributes" of the unsupported device, below the line about it being ignored?

E.g. here's what I get for one of my deliberately unsupported Netatmo Presence camera:

[05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Ignoring device [Drive Entrance] with unsupported profile [3027] [Netatmo Presence Camera] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [179] min [0] max [1] current [1] unit [n%2Fa] step value [1] state [1] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [181] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [182] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [250] min [0] max [2] current [2] unit [n%2Fa] step value [1] state [1] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [251] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [252] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [253] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1] [05/12/2020, 5:55:39 pm] [CovivaHagerPlatform] Attribute type [256] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1]

Also please let me know what state your shutters/blinds were at the time, IE fully open or fully closed, or maybe something in between.

Does the Coviva module allow you to have the blinds partially open? Do you hold down the button to raise/lower until you're happy with the position? Or is it just fully open/fully closed?

benni4k commented 3 years ago

Thanks for the fast response and the update. Here's the logfile for two blind modules after updating the plug-in. The blind "Bad OG" ist fully opened, the "Buero" is closed 20%. It seems, that there is no difference

[5.12.2020, 10:10:57] [CovivaHagerPlatform] Ignoring device [Buero] with unsupported profile [2002] [Unknown]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [15] min [0] max [100] current [20] unit [%25] step value [1] state [1]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [110] min [1] max [255] current [19] unit [s] step value [1] state [1]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [111] min [1] max [255] current [19] unit [s] step value [1] state [1]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [115] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Ignoring device [Bad OG] with unsupported profile [2002] [Unknown]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [15] min [0] max [100] current [0] unit [%25] step value [1] state [1]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [110] min [1] max [255] current [19] unit [s] step value [1] state [1]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [111] min [1] max [255] current [19] unit [s] step value [1] state [1]
[5.12.2020, 10:10:57] [CovivaHagerPlatform] Attribute type [115] min [0] max [1] current [0] unit [n%2Fa] step value [1] state [1]

Yes, the blinds can be opened partially. For example: After holding the button "down" for ~1 second the blind closes completely, even when I release the button. Pressing the button "down" again will stop the blind at the current position. To stop the blind I don't need to hold 1 second, but I have to hold round about 1 seconed to start shutting up or down. In the Coviva iOS App it can be controled similar to dimmer modules. If it will help you I can try to trace the Coviva iOS App like you described in the plug-in credits with the charles debugging app.

tylerrmit commented 3 years ago

Thanks! It sounds like the device attribute with type=15 is the percentage closed, where 0 = fully open and 100 = fully closed.

Hopefully that's enough information. I'll have a look into how to present it to Homebridge as a WindowCovering as soon as I can.

If you did use Charles to trace the traffic to your "koala" WebSocket, it would remove all doubt about what "PUT" command to send to Coviva to move the curtains/blinds. You'd want to run the trace while opening the app (it'll send a "GET:all", and we'd want to see the response to that) and then when you perform an action (it'll send a "PUT" with some parameters, and we'd want to see the detail of what it sent with that "PUT".)

But I reckon it's a matter of sending a "PUT" for attribute type 15 to set the "percentage closed", and leaving attribute types 110/111/115 alone

tylerrmit commented 3 years ago

Hi @benni4k I've just released a new "pre-release" version v0.1.30 on GitHub, if you'd like to try that. I haven't formally published it to NPM yet, because I don't have an actual Roller Shutter / Blinds module to test against myself.

Are you able to download and test the pre-release version from GitHub?

I believe you'd grab it and build it something like this:

$ mkdir pre-release $ cd pre-release $ git clone https://github.com/tylerrmit/homebridge-coviva-hager.git $ cd homebridge-coviva-hager $ npm run build

Then tell NPM to use that version of the plugin with Homebridge, and run Homebridge in debug mode with extra logging:

$ npm link $ homebridge -D

to end the test instance of Homebridge To go back to using the regular NPM release version: $ npm unlink Please see the "Releases" section of GitHub for more release notes. Sorry if it doesn't work perfectly first time. Typescript and Homebridge development are new for me, and I can't test it as I'd like, because I just don't have the part here. I hope it either works or at least sets us on the right path. Also in this latest release, I've added a "tools" directory with three Python scripts, for anyone who is into Python and wants to test how you'd send commands to Coviva: * get_all.py * get_nodes.py These just need you to update the path to your Python interpreter (line 1) and update three lines giving your Coviva username/password/covivaID. They will run "GET:all" and "GET:nodes" respectively. "GET:all" is what your iPhone runs when it first connects. It gets everything about your Coviva site/configuration -- users, the phones/devices they logged in under, the "nodes" -- the Coviva modules under control, etc. It's pretty verbose. "GET:nodes" just gets you the "nodes" section of that * put.py This is an example of how you would send a "PUT" command to change an attribute/state for a Coviva device. You have to edit the same 4 lines as before, plus you'd want to edit the "command" so that it is directing the command to the desired Coviva module (node) and the relevant attribute and the desired target value. In this example, it's sending PUT:nodes/1/attributes/5?target_value=50 Which means send it to node #1 (which happens to be a dimmable module in my house) And update attribute #5 (which happens to have attribute type #2 which is the brightness with min=0 max=100) And set it to a value of 50.
benni4k commented 3 years ago

Hi @tylerrmit, unfortunately I was not able to install the pre-release version. I tried to follow you instructions, but got some error message when running "npm run build":

pi@raspberrypi:~ $ cd pre-release/
pi@raspberrypi:~/pre-release $ cd homebridge-coviva-hager/
pi@raspberrypi:~/pre-release/homebridge-coviva-hager $ npm run build

> homebridge-coviva-hager@0.1.30 build /home/pi/pre-release/homebridge-coviva-hager
> rimraf ./dist && tsc

sh: 1: tsc: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! homebridge-coviva-hager@0.1.30 build: `rimraf ./dist && tsc`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the homebridge-coviva-hager@0.1.30 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-12-05T19_28_13_056Z-debug.log

I attached to logfile in that comment.

Sorry, but since this is my very first rasbperry / homebridge project I'm not familiar in installing stuff like that and using linux commands.

tylerrmit commented 3 years ago

Hi @benni4k no problem!

New strategy, which should be a bit more sustainable: Download the latest release v0.1.32 from NPM, you can do this from the Homebridge GUI.

Then go into the "Settings" for the Coviva plugin. There is a new option "enableExperimental", which is set to 'false' by default.

Set it to true, and you will 'opt-in' to test any new "experimental" device types like this one -- where I've tried to add support but haven't tested it myself, and haven't received confirmation from an end user such as yourself that it works, yet.

Restart Homebridge, and when it starts up, you should see a log message to say that it's enabled:

[06/12/2020, 8:58:32 am] [CovivaHagerPlatform] Initializing CovivaHagerPlatform platform...
[06/12/2020, 8:58:32 am] [CovivaHagerPlatform] Support for experimental device types is enabled

Then we'll see how it goes!

benni4k commented 3 years ago

Hi @tylerrmit , thank you again for updating the plug-in an trying to find a solution for this. I installed the update and activated the Experimental device support and now I can find all modules in the HomeKit App. But the blinds where shown as unsupported and I am not able to open / close the shutter via HomeKit.

Here is the logfile of Homebridge:

[6.12.2020, 01:19:03] Homebridge is running on port 51826.
[6.12.2020, 01:19:05] [CovivaHagerPlatform] Opening WebSocket connection to Coviva API
[6.12.2020, 01:19:06] [CovivaHagerPlatform] Opened WebSocket connection to Coviva API
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Ignoring device [homee] with unsupported profile [1] [Coviva Base Station]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Attribute type [205] min [0] max [200] current [0] unit [n%2Fa] step value [1] state [1]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Attribute type [241] min [0] max [0] current [1607268736] unit [unixtimestamp] step value [1] state [1]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Attribute type [242] min [0] max [0] current [1607238656] unit [unixtimestamp] step value [1] state [1]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [100] Current Position [100] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [-0] Current Position [-0] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [-0] Current Position [-0] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [-0] Current Position [-0] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [-0] Current Position [-0] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [-0] Current Position [-0] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [30] Current Position [30] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [-0] Current Position [-0] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [41] Current Position [41] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [-0] Current Position [-0] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [19] Current Position [19] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [100] Current Position [100] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Roller Blind [100] Current Position [100] Target Position [2] PositionState [%d] (ALL)
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Sending update to HomeKit
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Büro] [Coviva ID: 1] [HomeBridge ID: 35186f5d-3fb4-4be9-af04-e18a69112b74]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Büro] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Büro] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Büro] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Bad OG] [Coviva ID: 2] [HomeBridge ID: 43aaa92e-ed29-40d2-9cdd-22d181f00bda]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Bad OG] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Bad OG] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Bad OG] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Schlafzimmer] [Coviva ID: 3] [HomeBridge ID: a44769d5-91dc-4a91-918e-cdd7719a2ef2]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Schlafzimmer] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Schlafzimmer] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Schlafzimmer] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Ankleide] [Coviva ID: 4] [HomeBridge ID: 2f6ec920-df82-4cba-8c9f-444bc6d9e385]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Ankleide] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Ankleide] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Ankleide] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Fiona] [Coviva ID: 5] [HomeBridge ID: bc95f6b4-e42e-4700-8008-4b2e774bd9bb]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Fiona] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Fiona] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Fiona] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Kind rechts] [Coviva ID: 6] [HomeBridge ID: 215c5ed7-0644-4516-88ab-b132c0354a01]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Kind rechts] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Kind rechts] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Kind rechts] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: WC EG] [Coviva ID: 7] [HomeBridge ID: 60ae8959-b600-41e9-8fea-05ad1cddcac7]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [WC EG] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [WC EG] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [WC EG] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Wohnzimmer Tür] [Coviva ID: 8] [HomeBridge ID: f91e2044-5ba8-4319-81f9-d17cce9dd8c1]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Tür] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Tür] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Tür] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Wohnzimmer Fenster] [Coviva ID: 9] [HomeBridge ID: 2b10100b-c27f-4746-96c8-8ebd12403101]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Fenster] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Fenster] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Fenster] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Essen links] [Coviva ID: 10] [HomeBridge ID: d8ee11bb-ae75-4a84-afe9-c9a8c8c0c775]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen links] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen links] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen links] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Essen rechts] [Coviva ID: 11] [HomeBridge ID: 9f1bd75d-a6ac-4d19-8580-12e06794100d]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen rechts] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen rechts] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen rechts] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Küche] [Coviva ID: 12] [HomeBridge ID: dc87b461-11f8-4c4e-b395-c62d59838fd5]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küche] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küche] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küche] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: HWR] [Coviva ID: 13] [HomeBridge ID: 50c9c998-2c54-4c89-a1a3-36bbd0a3b76e]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [HWR] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [HWR] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [HWR] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Küchenspots] [Coviva ID: 14] [HomeBridge ID: c7d8e713-5869-4e3e-82b0-731022a13902]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küchenspots] Characteristic.On - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küchenspots] Characteristic.Brightness - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Esszimmer Spots] [Coviva ID: 15] [HomeBridge ID: 033ff762-4651-4ab4-aa3c-3874163d984b]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Esszimmer Spots] Characteristic.On - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Esszimmer Spots] Characteristic.Brightness - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Durchgang Spots] [Coviva ID: 16] [HomeBridge ID: adf3a504-9bbe-4b48-a721-6c52c6b0605b]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Durchgang Spots] Characteristic.On - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Durchgang Spots] Characteristic.Brightness - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Wohnzimmer Spots] [Coviva ID: 17] [HomeBridge ID: 189a2cb6-74ba-42db-b382-b5a3cb17a93c]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Spots] Characteristic.On - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Spots] Characteristic.Brightness - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Flur EG] [Coviva ID: 18] [HomeBridge ID: 85f996d0-8e6e-418a-9176-922a73f4bb20]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Flur EG] Characteristic.CurrentPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Flur EG] Characteristic.TargetPosition - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Flur EG] Characteristic.PositionState - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Existing Accessory found [Name: Küchenleuchte] [Coviva ID: 19] [HomeBridge ID: 9b549fe6-c12a-438f-98e6-7a33a5ed907b]
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küchenleuchte] Characteristic.On - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küchenleuchte] Characteristic.Brightness - Enabled
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Büro] Characteristic.CurrentPosition - Setting Current Position to 100
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Büro] Characteristic.TargetPosition - Setting Current Position to 100
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Büro] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Bad OG] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Bad OG] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Bad OG] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Schlafzimmer] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Schlafzimmer] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Schlafzimmer] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Ankleide] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Ankleide] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Ankleide] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Fiona] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Fiona] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Fiona] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Kind rechts] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Kind rechts] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Kind rechts] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [WC EG] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [WC EG] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [WC EG] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Tür] Characteristic.CurrentPosition - Setting Current Position to 30
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Tür] Characteristic.TargetPosition - Setting Current Position to 30
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Tür] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Fenster] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Fenster] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Fenster] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen links] Characteristic.CurrentPosition - Setting Current Position to 41
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen links] Characteristic.TargetPosition - Setting Current Position to 41
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen links] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen rechts] Characteristic.CurrentPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen rechts] Characteristic.TargetPosition - Setting Current Position to -0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Essen rechts] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küche] Characteristic.CurrentPosition - Setting Current Position to 19
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küche] Characteristic.TargetPosition - Setting Current Position to 19
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küche] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [HWR] Characteristic.CurrentPosition - Setting Current Position to 100
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [HWR] Characteristic.TargetPosition - Setting Current Position to 100
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [HWR] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küchenspots] Characteristic.Brightness - Setting brightness to 0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Esszimmer Spots] Characteristic.Brightness - Setting brightness to 11
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Durchgang Spots] Characteristic.Brightness - Setting brightness to 100
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Wohnzimmer Spots] Characteristic.Brightness - Setting brightness to 24
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Flur EG] Characteristic.CurrentPosition - Setting Current Position to 100
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Flur EG] Characteristic.TargetPosition - Setting Current Position to 100
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Flur EG] Characteristic.PositionState - Setting Current Position to 2
[6.12.2020, 01:19:07] [CovivaHagerPlatform] [Küchenleuchte] Characteristic.Brightness - Setting brightness to 0
[6.12.2020, 01:19:07] [CovivaHagerPlatform] Setting polling interval: 120`
tylerrmit commented 3 years ago

Hi @benni4k so the plugin has recognised and tried to add 13 blinds to HomeKit, and you can see them in the HomeKit app, but HomeKit says they're "unsupported". What does that look like?

Is that right?

I guess I'm doing something wrong in how I present them to HomeKit as blinds. I'll double-check my work.

A couple of things to try:

  1. What do the blinds look like there? If there are any errors or warnings about the blind devices, exactly what does it say. (Please quote exact error messages)
  2. Are you able to control the blinds on THAT page, if not on the HomeKit app on your phone?

Obviously we want the HomeKit app on your phone and Siri to work. I'm looking for clues.

tylerrmit commented 3 years ago

In that "Accessories" tab, if it's "working", you'll probably find that it gives you % open (or % closed) and when you click on it, the blind either fully opens or fully closes -- like adjusting the brightness of a bulb. If you long-click on it, you should get a slider where you can adjust the percentage. If you hover your mouse over it, you might get a "settings" cog in the top right corner -- I'd be interested in what it says when you click on that. What does it say about the device there?

So in "Accessories" I'm after:

tylerrmit commented 3 years ago

Hi @benni4k

I found one place where I'd made an obvious error presenting the blinds to HomeKit: I forgot to advertise a "WindowCovering" type service.

I've released a new version v0.1.33 with a fix for this.

If problems persist, please see my last few comments about things to try, and maybe run Homebridge in "debug" mode with "homebridge -D" to see if we can see any additional information about what's going on when the device is advertised to HomeKit.

benni4k commented 3 years ago

With the last update the blinds seems to be presented correctly to HomeKit. They are showing the correct percentage of the shutter positions in iOS HomeKit App as well as in the Homebridge UI in section Accessories.

Now, only the closing and opening function are missing. The Coviva module doesn't get a signal when I click the Homebridge blinds. I tried it in HomeKit App and in the Homebridge UI. The logfile after clicking on the blind "Büro":

Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] - Unsetting debouncedDeviceStateRequestPromise
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] - Resolving resolveDeviceStateRequest from cache
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.CurrentPosition - [GET] 100
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.CurrentPosition - Setting Current Position to 100
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.TargetPosition - [GET] 0
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.TargetPosition - Setting Current Position to 0
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.PositionState - [GET] 2
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.PositionState - Setting Current Position to 2
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.CurrentPosition - [GET] 100
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.CurrentPosition - Setting Current Position to 100
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.TargetPosition - [GET] 0
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.TargetPosition - Setting Current Position to 0
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.PositionState - [GET] 2
Dez 06 10:14:42 raspberrypi homebridge[5990]: [6.12.2020, 10:14:42] [CovivaHagerPlatform] [Büro] Characteristic.PositionState - Setting Current Position to 2

Can I deliver any more information to fix this as well?

tylerrmit commented 3 years ago

OK, that's progress at least if HomeKit can read the position of the blind. Do I have the % open around the right way? I.E. if the blind is 30% open (70% closed) does it show that on HomeKit, or does it have it backwards (70% open, 30% closed)?

I've published yet another version 0.1.34. It won't fix it, but it has more debug logging to help me see what's going on. Please update to that release, restart Homebridge (preferably from the command line with "homebridge -D"), and then tell it to open/close one of your blinds, let me know which one, and send EVERYTHING that come from [CovivaHagerPlatform] from the time Homebridge started up. You can post the logs as an attachment here, if it's too big to be readable as a comment.

Thanks

tylerrmit commented 3 years ago

@benni4k With the latest debug version I just published, I'm trying to not just see the messages that occur when you press the button in HomeKit to open or close, but also earlier messages when we set up the connection with HomeKit for that device, on restart

I see you said that the %open / %closed looked good, so I'll assume it was the right way around unless you say otherwise

benni4k commented 3 years ago

@tylerrmit Yes the percentage is shown correctly. It is not backwards. I started homebridge with debug mode. The log is very big, that I were not able to copy the complete log file from the terminal, because the beginning is cutted. Can you tell me where I can find this as a file in a directory to upload it here.

tylerrmit commented 3 years ago

@benni4k Are you running Homebridge on a Raspberry Pi, or on your personal computer, or somewhere else?

When I type the command "homebridge -D" (or on my mac) it all goes to my terminal window. To capture a COPY of the log in a file, while still letting it display in my window too, I would run "homebridge -D | tee homebridge_debug.log". A copy would then be saved in "homebridge_debug.log" in my current directory.

When I'm running homebridge "normally" on my Raspberry Pi, letting homebridge start up automatically as a service when it boots... The logs section of the Homebridge GUI will try to show the most recent log messages, but if there's too much there, I scroll up and it says

Loading logs using native method... File: /var/lib/homebridge/homebridge.log

So it's telling me where to find the full Homebridge log on the computer. In my case it's in /var/lib/homebridge/homebridge.log

benni4k commented 3 years ago

@tylerrmit I copied all what I can get from the terminal output and attached it to this comment. I pressed the button to close the blind "Wohnzimmer Fenster" at Dez 06 13:33:17. debug-coviva.log

tylerrmit commented 3 years ago

@benni4k Thanks I'll do what I can with that

tylerrmit commented 3 years ago

@benni4k OK new version just published, with a possible fix. v0.1.36. Please try that and see how it goes, if it doesn't work, try to send what you can from the logs.

v0.1.35 had a fix to make sure I told Coviva that if it's told to set the target position for a blind, that means I should set attribute #15 on the node.

v0.1.36 has a fix to make sure that when HomeKit gives us a new %open target value, I flip it into a %closed target value that Coviva expects.

Maybe start with your blinds partially open, then get HomeKit to ask it to either fully open or fully close them... That way if I still have the direction the wrong way around, it should at least move.

benni4k commented 3 years ago

Hi @tylerrmit This fix works perfect! I am able to control all blinds with Siri and iOS. This is absolutely amazing, thanks a lot!! :1st_place_medal: :-)

tylerrmit commented 3 years ago

Fantastic!

I’ll strip back the debug logging and promote it to non-experimental in the next version, today

Does it do a good job of telling HomeKit that it’s “opening” or “closing” while the blind is in motion?

I’d like to know whether that fine detail looks good yet, to make sure everything is perfect

(There is a Coviva web app that looks like the iPhone app, and you can use that to trigger movement on another device to see if they are all proactively updated. If you don’t have a second phone or iPad. Go to Hager.com and login - top right corner. Then to to “coviva boxes”. Then you will see a listing for your box. Then click on the settings icon next to it on the far right. Then login again— and you’re in.)

Thanks @benni4k

tylerrmit commented 3 years ago

Hi @benni4k I have released v0.1.38 which moves these devices from "Experimental" to "Supported", and decreases the log message activity (which we now no longer need)

After installing this release, you should be able to set "enableExperimental" to false and still have the blinds working and visible. You'll probably want to do that unless you're testing -- "enableExperimental" logs every message sent to or received from Coviva as "WS Send [xxx]" or "WS Recv [xxx]" for troubleshooting. This is good because we can enable that without turning on debug logging for all of Homebridge, from the GUI. But your log will grow more quickly.

I've checked what I did with regard to setting "opening" and "closing" state information while the blind is in motion, and I think I did what I needed to do. So hopefully you've already found that to be OK.

Please let me know that everything is working perfectly after you update to the latest version, then I'll officially close this "Issue" on GitHub.

Thanks for your help, and thanks for hitting that "Star" on GitHub. I needed the validation after I posted an announcement to Reddit, and only got four upvotes from other people LOL

benni4k commented 3 years ago

Hi @tylerrmit I installed the update an deactivated the toggle "enableExperimental". Controlling the blinds works with Siri, iOS App and the Homebridge UI as well. I also set a percentage value to open / close shutter while it was moving controlled via Coviva App or other devices.

I have to thank you the updates and the fast implementation of that feature. I really appreciate it.

From my side this issue can be closed.

tylerrmit commented 3 years ago

Thanks @benni4k I'm glad to be able to support another major device type so quickly after the initial release. Thanks for giving me closure, I'll close the issue now.