peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.19k stars 145 forks source link

Failed to create sensor from bridge model: Error: Unknown type 'zllrelativerotary' to create Bridge Model Object #226

Closed dannyvanlierop closed 1 year ago

dannyvanlierop commented 1 year ago

Failed to create sensor from bridge model: Error: Unknown type 'zllrelativerotary' to create Bridge Model Object from.; payload:

{ "state": { "rotaryevent": 2, "expectedrotation": 15, "expectedeventduration": 400, "lastupdated": "2022-12-02T18:54:25" }, "swupdate": { "state": "noupdates", "lastinstall": "2022-10-30T18:59:33" }, "config": { "on": true, "battery": 100, "reachable": true, "pending": [ ] }, "name": "Hue tap dial switch 1", "type": "ZLLRelativeRotary", "modelid": "RDM002", "manufacturername": "Signify Netherlands B.V.", "productname": "Hue tap dial switch", "diversityid": "e5b68d4b-0000-436d-88c5-7e02ffabda37", "swversion": "2.59.25", "uniqueid": "00:17:00:01:0d:00:bc:de-01-fc00-0014", "capabilities": { "certified": true, "primary": true, "inputs": [ { "repeatintervals": [ 400 ], "events": [ { "rotaryevent": 1, "eventtype": "start" }, { "rotaryevent": 2, "eventtype": "repeat" } ] } ] } }

Now I suppress error messages by comment line .\node-hue-api\dist\cjs\api\http\endpoints\sensors.js:104

Thanks for any help.

peter-murray commented 1 year ago

Hi πŸ‘‹, I have added support for the sensor, Hue Tap Dial Switch to the underlying sensor model and published an updated version of node-hue-api@5.0.0-beta.15 that should remedy this error for you.

I do not have this switch so cannot test it out so you appreciate nay feedback as to whether or noth this solves the error for you πŸ™‡

dannyvanlierop commented 1 year ago

Great! Thank you very much! πŸ‘ I will check this tomorrow and respond with feedback. :)

dannyvanlierop commented 1 year ago

πŸ’― Approved! Thanks for your help.

Log of my (Hue tap dial switch) sensor: [69][Hue tap dial switch 1] lastupdated: "2022-12-15T11:11:53" rotaryevent: 1 expectedrotation: 0 expectedeventduration: 400 [69][Hue tap dial switch 1] lastupdated: "2022-12-15T11:11:53" rotaryevent: 1 expectedrotation: -15 expectedeventduration: 400 [69][Hue tap dial switch 1] lastupdated: "2022-12-15T11:11:56" rotaryevent: 1 expectedrotation: 15 expectedeventduration: 400 [70][Hue tap dial switch 2] lastupdated: "2022-12-15T11:11:58" buttonevent: 4002 [70][Hue tap dial switch 2] lastupdated: "2022-12-15T11:11:59" buttonevent: 2000 [70][Hue tap dial switch 2] lastupdated: "2022-12-15T11:11:59" buttonevent: 2002 [70][Hue tap dial switch 2] lastupdated: "2022-12-15T11:12:01" buttonevent: 1002 [70][Hue tap dial switch 2] lastupdated: "2022-12-15T11:12:02" buttonevent: 3002 [70][Hue tap dial switch 2] lastupdated: "2022-12-15T11:12:04" buttonevent: 4002 [69][Hue tap dial switch 1] lastupdated: "2022-12-15T11:12:06" rotaryevent: 1 expectedrotation: -15 expectedeventduration: 400 [71][Hue dimmer switch 1] lastupdated: "2022-12-15T11:12:08" buttonevent: 3002 [71][Hue dimmer switch 1] lastupdated: "2022-12-15T11:12:09" buttonevent: 2002