gawindx / homebridge-risco-local-platform

This is plugin that integrate Homebridge with Risco Alarm Security System from local network.
MIT License
6 stars 4 forks source link

error on launch #2

Closed andyblac closed 3 years ago

andyblac commented 3 years ago

I see this when I startup HB

[21/09/2021, 22:18:02] [RiscoLocalAlarm] RiscoPanel Initialised
[21/09/2021, 22:18:02] [RiscoLocalAlarm] System initialization completed.
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Accessories Init Phase Started
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Discovered 10 Detector(s)
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Discovered 0 Output(s)
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Discovered 2 Partition(s)
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Apply Custom Configuration
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Detector
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Door
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Window
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Contact Sensor
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Vibrate Sensor
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Smoke Sensor
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Water Sensor
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Gas Sensor
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to CO Sensor
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to Temperature Sensor
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to on(eventName, handler) {
        if (!this._eventHandlers) this._eventHandlers = {};
            if (!this._eventHandlers[eventName]) {
                this._eventHandlers[eventName] = [];
            }
        this._eventHandlers[eventName].push(handler);
    }
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to off(eventName, handler) {
        let handlers = this._eventHandlers[eventName];
        if (!handlers) return;
            for (let i = 0; i < handlers.length; i++) {
            if (handlers[i] === handler) {
                handlers.splice(i--, 1);
            }
        }
    }
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Modify Detectors to emit(eventName, ...args) {
        if ((this._eventHandlers === undefined) || (!this._eventHandlers[eventName])) {
            return; // no handlers for that event name
        }

        // call the handlers
        this._eventHandlers[eventName].forEach(handler => handler.apply(this, args));
    }
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Phase Started
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Add Accessory => Add Detectors
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 1 and labeled "Smoke Detector"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 9 and labeled "Kitchen Door"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 10 and labeled "Front Door"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 11 and labeled "Bedroom"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 12 and labeled "Office"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 13 and labeled "Rear Lounge"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 14 and labeled "Front Lounge"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 15 and labeled "Garage Beam"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 16 and labeled "Garage Door"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Detectors Id : 17 and labeled "Garage Detector"
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Add Accessory => Add Outputs
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Add Partitions
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Partitions Id : 1 and labeled "House           "
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Accessory => Configuration for Partitions Id : 2 and labeled "Garage          "
[21/09/2021, 22:18:03] [RiscoLocalAlarm] PreConf Phase Ended
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Create Accessory Phase Started
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Kitchen Door
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Kitchen Door
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Office
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Office
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Rear Lounge
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Rear Lounge
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Front Lounge
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Front Lounge
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Garage Beam
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Garage Beam
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Garage Door
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Garage Door
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory House           
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory House           
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Garage          
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Garage          
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Restoring or Set Removing accessory Smoke Detector
[21/09/2021, 22:18:03] [RiscoLocalAlarm] Configuring accessory Smoke Detector
[21/09/2021, 22:18:04] [RiscoLocalAlarm] Restoring or Set Removing accessory Front Door
[21/09/2021, 22:18:04] [RiscoLocalAlarm] Configuring accessory Front Door
[21/09/2021, 22:18:04] [RiscoLocalAlarm] Restoring or Set Removing accessory Bedroom
[21/09/2021, 22:18:04] [RiscoLocalAlarm] Configuring accessory Bedroom
[21/09/2021, 22:18:04] [RiscoLocalAlarm] Restoring or Set Removing accessory Garage Detector
[21/09/2021, 22:18:04] [RiscoLocalAlarm] Configuring accessory Garage Detector
[21/09/2021, 22:18:08] [RiscoLocalAlarm] Accessories Init Phase Ended
gawindx commented 3 years ago

No problem, on the one hand it has no impact on the operation and on the other hand, I had already spotted this error in the logs you sent me. The problem is already fixed but not yet published.

If this had prevented the operation, I would have already published the patch but as this is not the case and I am waiting for evolutions of @TJFOrc at the level of the protocol code, the update will be published later.

gawindx commented 3 years ago

Version updated. The problem is fixed.

For the next version, I have taken your request into account and I will see to add an option to deactivate the "Exclude" function.

andyblac commented 3 years ago

Version updated. The problem is fixed.

For the next version, I have taken your request into account and I will see to add an option to deactivate the "Exclude" function.

maybe also (If posable) allow user to detach the exclude switch from the main sensor tile, so that the switch could be moved into a "Alarm" room in HomeKit so it does not clutter the main rooms, but still allows the sensor to be excluded.

Hope that's clear to understand ?

gawindx commented 3 years ago

it's very clear.

On the one hand it is not a bad idea, on the other hand it is achievable.

On the other hand, it will take a little code work, it will not be immediately but I will keep the idea for a little later.