seydx / homebridge-fritz-platform

AiO Homebridge dynamic platform plugin for AVM hardware like Fritz!Box, Fritz!Repeater etc.
MIT License
223 stars 32 forks source link

Support for FRITZ!DECT 440 Thermostat #247

Closed veniplex closed 1 year ago

veniplex commented 2 years ago

Is your feature request related to a problem? Please describe. When adding FRITZ!DECT 440 to under Smart Home devices as Thermostat, I get the following error: [FritzPlatform] Thermostat (smarthome-thermostat): Can not find thermostat data - "accType" and/or options correct?

Describe the solution you'd like Would it be possible to support this device, as it is a temperature and humidity sensor (and also a button)?

Additional context I think it is a relativley new device, so I hope it will be supported in the future.

Btw. nice work. It is a really great and helpful plugin 👍!

seydx commented 2 years ago

Hey, DECT 440 is already supported by this plugin, change the „accType“ to "button"

eg

{
  "active": true,
  "name": "DECT 440",
  "ain": "09995 0692315",
  "accType": "button",
  "buttons": 4,
  "temperature": true,
  "humidity": true
}
veniplex commented 2 years ago

Okay, thank you for the information! :)

So, I can see the device now and I can see temperature and humidity. In homebridge I get the following error:

[04/11/2021, 13:42:10] [FritzPlatform] Thermostat (smarthome-button): An error occured during getting state!
[04/11/2021, 13:42:10] [FritzPlatform] TypeError: Cannot read property 'getCharacteristic' of undefined
    at Handler.get (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/smarthome/smarthome-button.handler.js:252:21)
    at Handler.poll (/usr/local/lib/node_modules/homebridge-fritz-platform/src/accessories/smarthome/smarthome-button.handler.js:306:20)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

I also can configure 4 buttons. How does that work? If I assign a function to one button, does it run once I click it on the hardware device?

ghost commented 2 years ago

could you add that to the Docs pls?

{
  "active": true,
  "name": "DECT 440",
  "ain": "09995 0692315",
  "accType": "button",
  "buttons": 4,
  "temperature": true,
  "humidity": true
}

As well which accType supports what properties? That would help a lot!