Apsysikal / bachome

A BACnet plugin for Homebridge.
Apache License 2.0
6 stars 2 forks source link

Homebridge doesn't start after install bachome #11

Closed koerby closed 3 years ago

koerby commented 3 years ago

Hi,

i install bachome over the homebridge ui then i add a switch an homebridge crash and doesn't start again.

    {
        "name": "BAChome Dynamic Platform",
        "switch": [
            {
                "name": "TV",
                "manufacturer": "OSRAM",
                "model": "Plug 01",
                "serial": "84182600000D25CE",
                "stateObject": "BV:16"
            }
        ],
        "platform": "bachome"
    }
koerby commented 3 years ago

TypeError: this.config.thermostat is not iterable Mär 26 13:02:45 homebridge homebridge[27101]: at ExampleHomebridgePlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-bachome/src/platform.ts:92:38) Mär 26 13:02:45 homebridge homebridge[27101]: at HomebridgeAPI. (/usr/local/lib/node_modules/homebridge-bachome/src/platform.ts:43:12) Mär 26 13:02:45 homebridge homebridge[27101]: at HomebridgeAPI.emit (events.js:327:22) Mär 26 13:02:45 homebridge homebridge[27101]: at HomebridgeAPI.signalFinished (/usr/local/lib/node_modules/homebridge/src/api.ts:275:10) Mär 26 13:02:45 homebridge homebridge[27101]: at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:173:14)

Apsysikal commented 3 years ago

Hi,

Thank you for the bug report. I've checked this and it is a problem in the code. I'll have to bring an update for this. Most likely I'll be able to push the update out next week.

I'll inform you when it's done.

koerby commented 3 years ago

Hi,

when i config switch, thermostat and cooler then it will start, but i only need switch. Now i have some problem with the config, can you help me? The plugin in make an bacnet object and my homebridge will be a bacnet device or can i be add an bacnet object from an other bacnet device?

How musst it be define?

Apsysikal commented 3 years ago

Hey,

I've published an updated package (v 1.3.0). The config error with the thermostat and cooler should be fixed now. You should be able to delete them and only have the switch and not make the plugin crash.

The plugin functions as a BACnet client. The object entered in the config is the one on the remote device (to be controlled). The plugin tries to read and write from/to this object. The update also adds a config field for the IP address of the remote device (this was missing).

Let me know if this helped.

(I'll close this issue as the original issue was fixed. Feel free to open another one if problems arise.)