ebaauw / homebridge-otgw

Homebridge plugin for OpenTherm Gateway
Apache License 2.0
9 stars 0 forks source link

Request: Make it possible to disable/enable specific accessories #14

Closed dickverbunt closed 8 months ago

dickverbunt commented 1 year ago

I'm using the OTGW for a couple of years now but never knew there was an Homebridge plugin for it. Using it without OTM but with the NodeMCU serial server. Works like a charm, awesome job.

Whould it be easy to disable specific accesories from the config? I don't like it when I see to many unnecessary stuf popup in my home app.

ebaauw commented 1 year ago

Fairly easy. Patch this line: https://github.com/ebaauw/homebridge-otgw/blob/206edaff03d0a8ed40aa700a02e7fb446bf8e738/lib/OtgwPlatform.js#L182 to use a variable instead of an array literal, and populate the variable from some new settings in config.json.

ebaauw commented 1 year ago

Using it without OTM but with the NodeMCU serial server.

OpenTherm Monitor is not needed, but the NodeMCU in the OTGW only supports one concurrent client connection. When OTM (or another client) connects, Homebridge OTGW loses its connection. It would reconnect automatically, kicking out the other client, who would reconnect… ad nauseatum. Luckily the OTM relays the messages, so Homebridge OTGW tries to connect to OTM before reconnecting to the NodeMCU.