oogje / homebridge-i6-bigAssFans

A Homebridge plugin which allows you to control a Big Ass Fan.
MIT License
21 stars 4 forks source link

Loop of Child bridge process ended #16

Closed thicla01 closed 2 years ago

thicla01 commented 2 years ago

Describe The Bug:

The plugin was working flawlessy for several month, but now the Child bridge process ends continually

To Reproduce:

I have remove the plugin, clean the cache, restart the server, reinstall the plugin, reconfigure my Haiku Fan. The process start normaly. when I restart Homebridge, the child bridge process ends again continually

Expected behavior:

The process stay up after a Homebridge restart

Logs:

[24/09/2022, 20:21:22] [BigAssFans-i6] Initializing BigAssFans-i6 platform...
[24/09/2022, 20:21:22] [BigAssFans-i6] Initializing child bridge 0E:7A:F6:A6:CA:CB
[24/09/2022, 20:21:24] [homebridge-i6-bigassfans] Launched child bridge with PID 4695
[24/09/2022, 20:21:24] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6'
[24/09/2022, 20:21:24] [homebridge-i6-bigassfans] Loaded homebridge-i6-bigassfans v0.5.1 child bridge successfully
[24/09/2022, 20:21:24] [homebridge-i6-bigassfans] Init - initializing devices
[24/09/2022, 20:21:24] [homebridge-i6-bigassfans] Adding new accessory: Haiku_Salon

This a part of the loop : 
[24/09/2022, 20:30:17] [homebridge-i6-bigassfans] Restarting Process...
[24/09/2022, 20:30:19] [homebridge-i6-bigassfans] Launched child bridge with PID 11307
[24/09/2022, 20:30:20] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6'
[24/09/2022, 20:30:20] [homebridge-i6-bigassfans] Loaded homebridge-i6-bigassfans v0.5.1 child bridge successfully
[24/09/2022, 20:30:20] Loaded 1 cached accessories from cachedAccessories.0E7AF6A6CACB.
[24/09/2022, 20:30:20] [homebridge-i6-bigassfans] Loading accessory from cache: Haiku_Salon
[24/09/2022, 20:30:20] [homebridge-i6-bigassfans] Init - initializing devices
[24/09/2022, 20:30:20] [homebridge-i6-bigassfans] Restoring existing accessory from cache: Haiku_Salon
Error: listen EADDRINUSE: address already in use :::45070
    at Server.setupListenHandle [as _listen2] (node:net:1372:16)
    at listenInCluster (node:net:1420:12)
    at Server.listen (node:net:1508:7)
    at EventedHTTPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:155:20)
    at HAPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:332:21)
    at Bridge.<anonymous> (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1279:18)
    at step (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
    at Object.next (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:125:57)
    at fulfilled (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:115:62)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[24/09/2022, 20:30:20] [homebridge-i6-bigassfans] Child bridge process ended
[24/09/2022, 20:30:20] [homebridge-i6-bigassfans] Process Ended. Code: 1, Signal: null

[24/09/2022, 20:30:27] [homebridge-i6-bigassfans] Restarting Process...
[24/09/2022, 20:30:30] [homebridge-i6-bigassfans] Launched child bridge with PID 11328
[24/09/2022, 20:30:30] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6'
[24/09/2022, 20:30:30] [homebridge-i6-bigassfans] Loaded homebridge-i6-bigassfans v0.5.1 child bridge successfully
[24/09/2022, 20:30:30] Loaded 1 cached accessories from cachedAccessories.0E7AF6A6CACB.
[24/09/2022, 20:30:30] [homebridge-i6-bigassfans] Loading accessory from cache: Haiku_Salon
[24/09/2022, 20:30:30] [homebridge-i6-bigassfans] Init - initializing devices
[24/09/2022, 20:30:30] [homebridge-i6-bigassfans] Restoring existing accessory from cache: Haiku_Salon
Error: listen EADDRINUSE: address already in use :::45070
    at Server.setupListenHandle [as _listen2] (node:net:1372:16)
    at listenInCluster (node:net:1420:12)
    at Server.listen (node:net:1508:7)
    at EventedHTTPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:155:20)
    at HAPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:332:21)
    at Bridge.<anonymous> (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1279:18)
    at step (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
    at Object.next (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:125:57)
    at fulfilled (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:115:62)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[24/09/2022, 20:30:31] [homebridge-i6-bigassfans] Child bridge process ended
[24/09/2022, 20:30:31] [homebridge-i6-bigassfans] Process Ended. Code: 1, Signal: null

Plugin Config:

Note : I have remove the "pin", "ip address" and "mac Address"
{
    "bridge": {
        "name": "Homebridge AADC",
        "username": "0E:95:9B:BC:AA:DC",
        "port": 51808,
        "pin": "",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "purple",
            "tempUnits": "c",
            "lang": "auto",
            "sessionTimeout": 57600,
            "platform": "config"
        },
{
            "fans": [
                {
                    "name": "Haiku_Salon",
                    "ip": "",
                    "mac": "",
                    "fanModel": "Haiku H/I Series",
                    "showWhooshSwitch": true,
                    "showFanAutoSwitch": false,
                    "showLightAutoSwitch": false,
                    "showDimToWarmSwitch": false,
                    "showEcoModeSwitch": true
                }
            ],
            "_bridge": {
                "username": "0E:7A:F6:A6:CA:CB",
                "port": 45070
            },
            "platform": "BigAssFans-i6"
        }
    ]
}

Screenshots:

Environment:: Homebridge run on a Raspberry Pi 4B, Raspbian GNU/Linux 11 (bullseye)

oogje commented 2 years ago

Hello Are there any messages between timestamps [24/09/2022, 20:21:24] and [24/09/2022, 20:30:17]?

thicla01 commented 2 years ago

Yes, it's a repetition of what you see between [homebridge-i6-bigassfans] Restarting Process... (...) [homebridge-i6-bigassfans] Process Ended. Code: 1, Signal: null

For you information, I've decided to restart my homebridge setup from scratch I've flashed my SD card with the software "Raspberry Pi Imager v1.7.3", with the "Official Homebridge Raspberry Pi Image" dated 2022-07-08. On startup, there was one update available for the Homebridge UI. After the update the version was "homebridge-config-ui-x v4.50.1". After that, I installed the "Big Ass Fans i6" plugin version "homebridge-i6-bigassfans v0.5.1" (Note: Installation without Child Bridge). After that, I add to the configuration one of my Haiku Fan.

{ "bridge": { "name": "Homebridge B9C9", "username": "Removed", "port": 51704, "pin": "Removed", "advertiser": "avahi" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "fans": [ { "name": "Haiku-Salon", "ip": "Removed", "mac": "Removed", "fanModel": "Haiku H/I Series", "showWhooshSwitch": true, "showFanAutoSwitch": true, "showLightAutoSwitch": true, "showDimToWarmSwitch": false, "showEcoModeSwitch": true } ], "platform": "BigAssFans-i6" } ], "disabledPlugins": [] }

The result puzzled me. The system started normally, buy when I tried to add the Homebridge setup to HomeKit with the QR Code, It failed several times. I disabled the "Big Ass Fans I6" plugin and after that I was able to add Homebridge to HomeKit without any delay. I enabled again the plugin, restart Homebridge and I tried to add my Haiku Fan to HomeKit but the Fan doesn't appeared in the list of devices to be added...

thicla01 commented 2 years ago

Second test:

I configure the plugin to use a Child Bridge. I restarted the Homebridge. Everything was fine. I restarted Homebridge a second time. The loop started again.

[25/09/2022, 12:42:58] [Homebridge UI] Changes to config.json saved. [25/09/2022, 12:43:00] [Homebridge UI] Homebridge restart request received [25/09/2022, 12:43:00] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [25/09/2022, 12:43:00] [Homebridge UI] Sending SIGTERM to Homebridge [25/09/2022, 12:43:07] [Homebridge UI] Sending SIGKILL to Homebridge [25/09/2022, 12:43:07] [HB Supervisor] Homebridge Process Ended. Code: null, Signal: SIGKILL [25/09/2022, 12:43:12] [HB Supervisor] Restarting Homebridge... [25/09/2022, 12:43:12] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules -D --strict-plugin-resolution [25/09/2022, 12:43:12] [HB Supervisor] Started Homebridge v1.5.0 with PID: 4680 [25/09/2022, 12:43:13] Loaded config.json with 0 accessories and 2 platforms. [25/09/2022, 12:43:13] Loaded 2 cached accessories from cachedAccessories. [25/09/2022, 12:43:13] --- [25/09/2022, 12:43:13] Loaded plugin: homebridge-i6-bigassfans@0.5.1 [25/09/2022, 12:43:13] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [25/09/2022, 12:43:13] --- [25/09/2022, 12:43:13] Loading 2 platforms... [25/09/2022, 12:43:13] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [25/09/2022, 12:43:13] [BigAssFans-i6] Initializing child bridge 0E:DC:DD:AD:B7:EC [25/09/2022, 12:43:13] Failed to find plugin to handle accessory Haiku-Salon [25/09/2022, 12:43:13] Removing orphaned accessory Haiku-Salon [25/09/2022, 12:43:13] Failed to find plugin to handle accessory Haiku-Salon [25/09/2022, 12:43:13] Removing orphaned accessory Haiku-Salon [25/09/2022, 12:43:13] Publishing bridge accessory (name: Homebridge B9C9, publishInfo: { username: 'Removed, port: 51704, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://00251TTL51B9Q Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ Removed │     
└────────────┘     

[25/09/2022, 12:43:13] Homebridge v1.5.0 (HAP v0.10.2) (Homebridge B9C9) is running on port 51704. [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] Launched child bridge with PID 4691 [25/09/2022, 12:43:14] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] Loaded homebridge-i6-bigassfans v0.5.1 child bridge successfully [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] Finished initializing platform [25/09/2022, 12:43:14] Publishing bridge accessory (name: homebridge-i6-bigassfans, publishInfo: { username: 'Removed', port: 52360, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] Executed didFinishLaunching callback [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] Init - initializing devices [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] Adding new accessory: Haiku-Salon [25/09/2022, 12:43:14] Homebridge v1.5.0 (HAP v0.10.2) (homebridge-i6-bigassfans) is running on port 52360. [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] dblog progress(0/0) Haiku-Salon - product type: Haiku H/I Series (0x48, 0x61, 0x69, 0x6b, 0x75, 0x20, 0x48, 0x2f, 0x49, 0x20, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73) [25/09/2022, 12:43:14] [homebridge-i6-bigassfans] dblog progress(0/0) Haiku-Salon - firmware: 3.1.0 [25/09/2022, 12:43:27] [Homebridge UI] Homebridge restart request received [25/09/2022, 12:43:27] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [25/09/2022, 12:43:27] [Homebridge UI] Sending SIGTERM to Homebridge [25/09/2022, 12:43:27] Got SIGTERM, shutting down Homebridge... [25/09/2022, 12:43:32] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [25/09/2022, 12:43:37] [HB Supervisor] Restarting Homebridge... [25/09/2022, 12:43:37] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules -D --strict-plugin-resolution [25/09/2022, 12:43:37] [HB Supervisor] Started Homebridge v1.5.0 with PID: 4716 [25/09/2022, 12:43:39] Loaded config.json with 0 accessories and 2 platforms. [25/09/2022, 12:43:39] Loaded 0 cached accessories from cachedAccessories. [25/09/2022, 12:43:39] --- [25/09/2022, 12:43:39] Loaded plugin: homebridge-i6-bigassfans@0.5.1 [25/09/2022, 12:43:39] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [25/09/2022, 12:43:39] --- [25/09/2022, 12:43:39] Loading 2 platforms... [25/09/2022, 12:43:39] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [25/09/2022, 12:43:39] [BigAssFans-i6] Initializing child bridge 0E:DC:DD:AD:B7:EC [25/09/2022, 12:43:39] Publishing bridge accessory (name: Homebridge B9C9, publishInfo: { username: 'Removed', port: 51704, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://00251TTL51B9Q Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ Removed │     
└────────────┘     

[25/09/2022, 12:43:39] Homebridge v1.5.0 (HAP v0.10.2) (Homebridge B9C9) is running on port 51704. [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Launched child bridge with PID 4727 [25/09/2022, 12:43:41] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Loaded homebridge-i6-bigassfans v0.5.1 child bridge successfully [25/09/2022, 12:43:41] Loaded 1 cached accessories from cachedAccessories.0EDCDDADB7EC. [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Finished initializing platform [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Loading accessory from cache: Haiku-Salon [25/09/2022, 12:43:41] Publishing bridge accessory (name: homebridge-i6-bigassfans, publishInfo: { username: 'Removed', port: 52360, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Executed didFinishLaunching callback [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Init - initializing devices [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Restoring existing accessory from cache: Haiku-Salon Error: listen EADDRINUSE: address already in use :::52360 at Server.setupListenHandle [as _listen2] (node:net:1372:16) at listenInCluster (node:net:1420:12) at Server.listen (node:net:1508:7) at EventedHTTPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:155:20) at HAPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:332:21) at Bridge. (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1279:18) at step (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) at Object.next (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:125:57) at fulfilled (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:115:62) at processTicksAndRejections (node:internal/process/task_queues:96:5) [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Child bridge process ended [25/09/2022, 12:43:41] [homebridge-i6-bigassfans] Process Ended. Code: 1, Signal: null [25/09/2022, 12:43:48] [homebridge-i6-bigassfans] Restarting Process... [25/09/2022, 12:43:50] [homebridge-i6-bigassfans] Launched child bridge with PID 4751 [25/09/2022, 12:43:50] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [25/09/2022, 12:43:50] [homebridge-i6-bigassfans] Loaded homebridge-i6-bigassfans v0.5.1 child bridge successfully [25/09/2022, 12:43:50] Loaded 1 cached accessories from cachedAccessories.0EDCDDADB7EC. [25/09/2022, 12:43:50] [homebridge-i6-bigassfans] Finished initializing platform [25/09/2022, 12:43:50] [homebridge-i6-bigassfans] Loading accessory from cache: Haiku-Salon [25/09/2022, 12:43:50] Publishing bridge accessory (name: homebridge-i6-bigassfans, publishInfo: { username: '0E:DC:DD:AD:B7:EC', port: 52360, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). [25/09/2022, 12:43:50] [homebridge-i6-bigassfans] Executed didFinishLaunching callback [25/09/2022, 12:43:50] [homebridge-i6-bigassfans] Init - initializing devices [25/09/2022, 12:43:50] [homebridge-i6-bigassfans] Restoring existing accessory from cache: Haiku-Salon Error: listen EADDRINUSE: address already in use :::52360 at Server.setupListenHandle [as _listen2] (node:net:1372:16) at listenInCluster (node:net:1420:12) at Server.listen (node:net:1508:7) at EventedHTTPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:155:20) at HAPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:332:21) at Bridge. (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1279:18) at step (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) at Object.next (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:125:57) at fulfilled (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:115:62) at processTicksAndRejections (node:internal/process/task_queues:96:5) [25/09/2022, 12:43:51] [homebridge-i6-bigassfans] Child bridge process ended [25/09/2022, 12:43:51] [homebridge-i6-bigassfans] Process Ended. Code: 1, Signal: null [25/09/2022, 12:43:58] [homebridge-i6-bigassfans] Restarting Process... [25/09/2022, 12:43:59] [homebridge-i6-bigassfans] Launched child bridge with PID 4762 [25/09/2022, 12:43:59] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [25/09/2022, 12:43:59] [homebridge-i6-bigassfans] Loaded homebridge-i6-bigassfans v0.5.1 child bridge successfully [25/09/2022, 12:43:59] Loaded 1 cached accessories from cachedAccessories.0EDCDDADB7EC. [25/09/2022, 12:43:59] [homebridge-i6-bigassfans] Finished initializing platform [25/09/2022, 12:43:59] [homebridge-i6-bigassfans] Loading accessory from cache: Haiku-Salon [25/09/2022, 12:43:59] Publishing bridge accessory (name: homebridge-i6-bigassfans, publishInfo: { username: '0E:DC:DD:AD:B7:EC', port: 52360, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). [25/09/2022, 12:43:59] [homebridge-i6-bigassfans] Executed didFinishLaunching callback [25/09/2022, 12:43:59] [homebridge-i6-bigassfans] Init - initializing devices [25/09/2022, 12:43:59] [homebridge-i6-bigassfans] Restoring existing accessory from cache: Haiku-Salon Error: listen EADDRINUSE: address already in use :::52360 at Server.setupListenHandle [as _listen2] (node:net:1372:16) at listenInCluster (node:net:1420:12) at Server.listen (node:net:1508:7) at EventedHTTPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:155:20) at HAPServer.listen (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:332:21) at Bridge. (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1279:18) at step (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) at Object.next (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:125:57) at fulfilled (/var/lib/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:115:62) at processTicksAndRejections (node:internal/process/task_queues:96:5) [25/09/2022, 12:44:00] [homebridge-i6-bigassfans] Child bridge process ended [25/09/2022, 12:44:00] [homebridge-i6-bigassfans] Process Ended. Code: 1, Signal: null [25/09/2022, 12:44:03] [Homebridge UI] Changes to config.json saved. [25/09/2022, 12:44:03] [homebridge-i6-bigassfans] Stopping child bridge (will not restart)...

oogje commented 2 years ago

Is homebridge-i6-bigassfans the only plugin you use with homebridge?

I searched for "[HB Supervisor] Homebridge Process Ended. Code: 143" and am going through the results looking for a clue.

The "address already in use" error means there's probably a child bridge still alive that's bound to that address. But I think that's a symptom, not a cause. Once you see "Homebridge Process Ended. Code: 143, Signal: null" nothing after that really matters. It appears exit code 143 is the result of a SIGTERM, implying something is deliberately trying to gracefully kill the process. So the question is what and why.

oogje commented 2 years ago

Check out https://www.reddit.com/r/homebridge/comments/mml26u/homebridge_seems_to_restart_constantly/ and see if dev_oznu's solution helps.

thicla01 commented 2 years ago

Yes, right now it's the only plugin in my configuration since I've reinstall everything from scratch (the goal was to eleminate unwanted variables to resolve the problem). The proposed solution was for a Homebridge configuration on a Mac and my Homebridge run on a Raspberry Pi.

Here's the result for the first command proposed by dev_oznu: pi@homebridge:~ $ launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist -bash: launchctl: command not found

oogje commented 2 years ago

Can you try running homebridge without the UI? On the pi, hb-service stop, then run homebridge -I -D.

thicla01 commented 2 years ago

Sorry, I'm some kind of a newbi for that :( First command worked For the second command, is it the homebridge script found at /var/lib/homebridge/node_modules/homebridge/bin? The result is : pi@homebridge:/var/lib/homebridge/node_modules/homebridge/bin $ ./homebridge -I -D /usr/bin/env: ‘node’: No such file or directory

oogje commented 2 years ago

Never mind that idea, it probably wouldn't have helped anyway. Go ahead and restart homebridge with hb-service start. I trust that will get you back to where you were.

How about setting all the switch options for your fan to false in the config and clear the cache and restart to see what happens.

thicla01 commented 2 years ago

Same result.

I just remember that I installed the same plugin for my girlfriend and it works fine right now. Here the difference node -v (v16.4.2 => I have v16.16.0) npm -v (8.7.0 => I have V8.11.0)

Do you know how to downgrade node.js?

oogje commented 2 years ago

Offhand I don't know how to downgrade node. But a search tells me nvm install <version-number> In the meantime I'm going to upgrade my version to 16.16.0 and see if that breaks the plugin.

oogje commented 2 years ago

I just accidentally found out you can downgrade with hb-service update-node <version>.

thicla01 commented 2 years ago

Thanks,

I downgrade node.js but no effect. I will restart from scratch but with the image Raspbian-Homebridge-v1.0.33.zip instead of Raspbian-Homebridge-v1.0.38.zip. I will let you know.

oogje commented 2 years ago

okey doke.

I'm thinking at some point we try to run without the child bridge and resolve whatever issues come up there (QR failure [try to add with QR code before adding config for fan], fan doesn't appear [remove bridge using Home app]).

thicla01 commented 2 years ago

I installed from scratch with Raspbian-Homebridge-v1.0.33.zip. At the beginning, I configure my Haiku Fan as "Haiku H/I Series" as before and I had the same weird result.

After that, I remembered that my girlfriend has a "Haiku L" fan. Then I configured my fan as if it was an "Haiku L". With that, I was able to add Homebridge to HomeKit and the child bridge also. No loop with that. But no communication with the fan.

thicla01 commented 2 years ago

OK I will try that

thicla01 commented 2 years ago

I restarted from scratch again with Raspbian-Homebridge-v1.0.33.zip and Raspbian-Homebridge-v1.0.38.zip. Installation of the plugin Big Ass Fans i6 version homebridge-i6-bigassfans v0.5.1 with no fan configured and no Child Bridge

Successfuly added Homebridge to HomeKit with QR code Haiku Fan configuration added to the plugin with "Haiku L series" instead of "Haiku H/I series" Failure to add the Fan in Homekit I've changed the Fan configuration to "Haiku H/I series" and it still failed.

{ "bridge": { "name": "Homebridge 300E", "username": "0E:AB:29:EC:30:0E", "port": 51144, "pin": "781-94-886", "advertiser": "avahi" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "fans": [ { "name": "Haiku Salon", "ip": "Removed", "mac": "Removed", "fanModel": "Haiku H/I Series", "showWhooshSwitch": false, "showFanAutoSwitch": false, "showLightAutoSwitch": false, "showDimToWarmSwitch": false, "showEcoModeSwitch": false } ], "platform": "BigAssFans-i6" } ] }

oogje commented 2 years ago

Can you show me the log file from when you start homebridge and it fails to add the fan?

thicla01 commented 2 years ago

Hello oogje,

Another day, another test. I've downgrade the plugin to the version homebridge-i6-bigassfans v0.4.3. And the fan appeared like by magic in homekit :) And I'm able to control the fan with the Home app in iOS.

thicla01 commented 2 years ago

I'm at work right now. I will redo the test with the version 0.5.1 and see if there is logs for the failure to add the fan in HomeKit.

thicla01 commented 2 years ago

Second test. Adding the second fan with the Plugin v0.4.3: Success

thicla01 commented 2 years ago

Third test. Upgrading the Plugin to 0.5.1. The communication with the fans stop. Downgrading the Plugin to 0.4.3. The communication with the fans works again.

oogje commented 2 years ago

Send logs from 0.5.1 failure please - from the time you start homebridge until it's apparent there's no communication.

thicla01 commented 2 years ago

Step 1) Using version 0.5.1, adding Homebridge in HomeKit without any fan in the configuration. Adding the fan in the configuration but unable to add the fan in HomeKit

[26/09/2022, 19:29:14] [HB Supervisor] Restarting Homebridge... [26/09/2022, 19:29:14] [HB Supervisor] Starting Homebridge with extra flags: -I -D [26/09/2022, 19:29:14] [HB Supervisor] Started Homebridge v1.5.0 with PID: 1406 [26/09/2022, 19:29:15] Loaded config.json with 0 accessories and 2 platforms. [26/09/2022, 19:29:15] --- [26/09/2022, 19:29:16] Loaded plugin: homebridge-config-ui-x@4.50.1 [26/09/2022, 19:29:16] Registering platform 'homebridge-config-ui-x.config' [26/09/2022, 19:29:16] --- [26/09/2022, 19:29:16] Loaded plugin: homebridge-i6-bigassfans@0.5.1 [26/09/2022, 19:29:16] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [26/09/2022, 19:29:16] --- [26/09/2022, 19:29:16] Loading 2 platforms... [26/09/2022, 19:29:16] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [26/09/2022, 19:29:16] [BigAssFans-i6] Finished initializing platform [26/09/2022, 19:29:16] [BigAssFans-i6] Executed didFinishLaunching callback [26/09/2022, 19:29:16] [BigAssFans-i6] Init - initializing devices [26/09/2022, 19:29:16] [BigAssFans-i6] ------------------------------------------- [26/09/2022, 19:29:16] [BigAssFans-i6] Init - no fan configuration found [26/09/2022, 19:29:16] [BigAssFans-i6] Missing fans in your platform config [26/09/2022, 19:29:16] [BigAssFans-i6] ------------------------------------------- [26/09/2022, 19:29:16] Publishing bridge accessory (name: Homebridge 300E, publishInfo: { username: '0E:AB:29:EC:30:0E', port: 51144, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://0024RHJNQTBJJ Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 781-94-886 │     
└────────────┘     

[26/09/2022, 19:29:16] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge 300E) is running on port 51144. [26/09/2022, 19:29:18] [Homebridge UI] Removed /var/lib/homebridge/persist/AccessoryInfo.0EAB29EC300E.json [26/09/2022, 19:29:18] [Homebridge UI] Removed /var/lib/homebridge/persist/IdentifierCache.0EAB29EC300E.json [26/09/2022, 19:29:23] [Homebridge UI] Homebridge Reset: New Username: 0E:19:56:99:AE:83 [26/09/2022, 19:29:23] [Homebridge UI] Homebridge Reset: New Pin: 824-60-360 [26/09/2022, 19:29:23] [Homebridge UI] Changes to config.json saved. [26/09/2022, 19:29:23] [Homebridge UI] Homebridge Reset: "persist" directory removed. [26/09/2022, 19:29:23] [Homebridge UI] Homebridge Reset: "accessories" directory removed. [26/09/2022, 19:29:23] [Homebridge UI] Homebridge restart request received [26/09/2022, 19:29:23] [Homebridge UI] Sending SIGTERM to process... [26/09/2022, 19:29:23] [HB Supervisor] Stopping services... [26/09/2022, 19:29:23] Got SIGTERM, shutting down Homebridge... [26/09/2022, 19:29:23] Failed to save cached accessories to disk: ENOENT: no such file or directory, open '/var/lib/homebridge/accessories/cachedAccessories' [26/09/2022, 19:29:23] Your accessories will not persist between restarts until this issue is resolved. [26/09/2022, 19:29:28] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [26/09/2022, 19:29:35] [HB Supervisor] OS: Linux 5.15.32-v7l+ arm [26/09/2022, 19:29:35] [HB Supervisor] Node.js v16.14.2 /usr/local/bin/node [26/09/2022, 19:29:35] [HB Supervisor] Homebridge Path: /usr/local/lib/node_modules/homebridge/bin/homebridge [26/09/2022, 19:29:35] [HB Supervisor] UI Path: /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js [26/09/2022, 19:29:40] [Homebridge UI] Homebridge Config UI X v4.50.1 is listening on :: port 8581 [26/09/2022, 19:29:40] [HB Supervisor] Starting Homebridge with extra flags: -I -D [26/09/2022, 19:29:40] [HB Supervisor] Started Homebridge v1.5.0 with PID: 1485 [26/09/2022, 19:29:41] Loaded config.json with 0 accessories and 2 platforms. [26/09/2022, 19:29:41] --- [26/09/2022, 19:29:42] Loaded plugin: homebridge-config-ui-x@4.50.1 [26/09/2022, 19:29:42] Registering platform 'homebridge-config-ui-x.config' [26/09/2022, 19:29:42] --- [26/09/2022, 19:29:43] Loaded plugin: homebridge-i6-bigassfans@0.5.1 [26/09/2022, 19:29:43] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [26/09/2022, 19:29:43] --- [26/09/2022, 19:29:43] Loading 2 platforms... [26/09/2022, 19:29:43] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [26/09/2022, 19:29:43] [BigAssFans-i6] Finished initializing platform [26/09/2022, 19:29:43] [BigAssFans-i6] Executed didFinishLaunching callback [26/09/2022, 19:29:43] [BigAssFans-i6] Init - initializing devices [26/09/2022, 19:29:43] [BigAssFans-i6] ------------------------------------------- [26/09/2022, 19:29:43] [BigAssFans-i6] Init - no fan configuration found [26/09/2022, 19:29:43] [BigAssFans-i6] Missing fans in your platform config [26/09/2022, 19:29:43] [BigAssFans-i6] ------------------------------------------- [26/09/2022, 19:29:43] Publishing bridge accessory (name: Homebridge 300E, publishInfo: { username: '0E:19:56:99:AE:83', port: 51144, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://0024U0YX4GXPG Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 824-60-360 │     
└────────────┘     

[26/09/2022, 19:29:43] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge 300E) is running on port 51144. [26/09/2022, 19:29:44] [Homebridge UI] Starting terminal session [26/09/2022, 19:31:08] [Homebridge UI] Terminal session ended. [26/09/2022, 19:32:05] [Homebridge UI] Changes to config.json saved. [26/09/2022, 19:32:12] [Homebridge UI] Homebridge restart request received [26/09/2022, 19:32:12] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [26/09/2022, 19:32:12] [Homebridge UI] Sending SIGTERM to Homebridge [26/09/2022, 19:32:12] Got SIGTERM, shutting down Homebridge... [26/09/2022, 19:32:17] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [26/09/2022, 19:32:22] [HB Supervisor] Restarting Homebridge... [26/09/2022, 19:32:22] [HB Supervisor] Starting Homebridge with extra flags: -I -D [26/09/2022, 19:32:22] [HB Supervisor] Started Homebridge v1.5.0 with PID: 1681 [26/09/2022, 19:32:23] Loaded config.json with 0 accessories and 2 platforms. [26/09/2022, 19:32:23] Loaded 0 cached accessories from cachedAccessories. [26/09/2022, 19:32:23] --- [26/09/2022, 19:32:24] [Homebridge UI] Starting terminal session [26/09/2022, 19:32:24] Loaded plugin: homebridge-config-ui-x@4.50.1 [26/09/2022, 19:32:24] Registering platform 'homebridge-config-ui-x.config' [26/09/2022, 19:32:24] --- [26/09/2022, 19:32:24] Loaded plugin: homebridge-i6-bigassfans@0.5.1 [26/09/2022, 19:32:24] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [26/09/2022, 19:32:24] --- [26/09/2022, 19:32:24] Loading 2 platforms... [26/09/2022, 19:32:24] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [26/09/2022, 19:32:24] [BigAssFans-i6] Finished initializing platform [26/09/2022, 19:32:24] [BigAssFans-i6] Executed didFinishLaunching callback [26/09/2022, 19:32:24] [BigAssFans-i6] Init - initializing devices [26/09/2022, 19:32:24] [BigAssFans-i6] Adding new accessory: Haiku Salon [26/09/2022, 19:32:24] Publishing bridge accessory (name: Homebridge 300E, publishInfo: { username: '0E:19:56:99:AE:83', port: 51144, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://0024U0YX4GXPG Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 824-60-360 │     
└────────────┘     

[26/09/2022, 19:32:24] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge 300E) is running on port 51144. [26/09/2022, 19:32:24] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - product type: Haiku H/I Series (0x48, 0x61, 0x69, 0x6b, 0x75, 0x20, 0x48, 0x2f, 0x49, 0x20, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73) [26/09/2022, 19:32:24] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - firmware: 3.1.0

thicla01 commented 2 years ago

Step 2) Removing fan configuration, downgrading to version 0.4.3

[26/09/2022, 19:44:19] [Homebridge UI] Homebridge restart request received [26/09/2022, 19:44:19] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [26/09/2022, 19:44:19] [Homebridge UI] Sending SIGTERM to Homebridge [26/09/2022, 19:44:23] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [26/09/2022, 19:44:28] [HB Supervisor] Restarting Homebridge... [26/09/2022, 19:44:28] [HB Supervisor] Starting Homebridge with extra flags: -I -D [26/09/2022, 19:44:28] [HB Supervisor] Started Homebridge v1.5.0 with PID: 2247 [26/09/2022, 19:44:29] Loaded config.json with 0 accessories and 2 platforms. [26/09/2022, 19:44:29] Loaded 1 cached accessories from cachedAccessories. [26/09/2022, 19:44:29] --- [26/09/2022, 19:44:29] [Homebridge UI] Starting terminal session [26/09/2022, 19:44:30] Loaded plugin: homebridge-config-ui-x@4.50.1 [26/09/2022, 19:44:30] Registering platform 'homebridge-config-ui-x.config' [26/09/2022, 19:44:30] --- [26/09/2022, 19:44:30] Loaded plugin: homebridge-i6-bigassfans@0.4.3 [26/09/2022, 19:44:30] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [26/09/2022, 19:44:30] --- [26/09/2022, 19:44:30] Loading 2 platforms... [26/09/2022, 19:44:30] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [26/09/2022, 19:44:30] [BigAssFans-i6] Finished initializing platform [26/09/2022, 19:44:30] [BigAssFans-i6] Loading accessory from cache: Haiku Salon [26/09/2022, 19:44:30] [BigAssFans-i6] Executed didFinishLaunching callback [26/09/2022, 19:44:30] [BigAssFans-i6] Init - initializing devices [26/09/2022, 19:44:30] [BigAssFans-i6] ------------------------------------------- [26/09/2022, 19:44:30] [BigAssFans-i6] Init - no fan configuration found [26/09/2022, 19:44:30] [BigAssFans-i6] Missing fans in your platform config [26/09/2022, 19:44:30] [BigAssFans-i6] ------------------------------------------- [26/09/2022, 19:44:30] Publishing bridge accessory (name: Homebridge 300E, publishInfo: { username: '0E:19:56:99:AE:83', port: 51144, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://0024U0YX4GXPG Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 824-60-360 │     
└────────────┘     

[26/09/2022, 19:44:30] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge 300E) is running on port 51144.

thicla01 commented 2 years ago

Step 3) Adding fan configuration and restart (The fan appears in HomeKit and can be control by Home app)

[26/09/2022, 19:47:11] [Homebridge UI] Terminal session ended. [26/09/2022, 19:47:56] [Homebridge UI] Changes to config.json saved. [26/09/2022, 19:47:59] [Homebridge UI] Starting terminal session [26/09/2022, 19:48:09] [Homebridge UI] Terminal session ended. [26/09/2022, 19:48:09] [Homebridge UI] Homebridge restart request received [26/09/2022, 19:48:09] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [26/09/2022, 19:48:09] [Homebridge UI] Sending SIGTERM to Homebridge [26/09/2022, 19:48:09] Got SIGTERM, shutting down Homebridge... [26/09/2022, 19:48:15] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [26/09/2022, 19:48:20] [HB Supervisor] Restarting Homebridge... [26/09/2022, 19:48:20] [HB Supervisor] Starting Homebridge with extra flags: -I -D [26/09/2022, 19:48:20] [HB Supervisor] Started Homebridge v1.5.0 with PID: 2390 [26/09/2022, 19:48:21] Loaded config.json with 0 accessories and 2 platforms. [26/09/2022, 19:48:21] Loaded 1 cached accessories from cachedAccessories. [26/09/2022, 19:48:21] --- [26/09/2022, 19:48:21] [Homebridge UI] Starting terminal session [26/09/2022, 19:48:22] Loaded plugin: homebridge-config-ui-x@4.50.1 [26/09/2022, 19:48:22] Registering platform 'homebridge-config-ui-x.config' [26/09/2022, 19:48:22] --- [26/09/2022, 19:48:22] Loaded plugin: homebridge-i6-bigassfans@0.4.3 [26/09/2022, 19:48:22] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [26/09/2022, 19:48:22] --- [26/09/2022, 19:48:22] Loading 2 platforms... [26/09/2022, 19:48:22] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [26/09/2022, 19:48:22] [BigAssFans-i6] Finished initializing platform [26/09/2022, 19:48:22] [BigAssFans-i6] Loading accessory from cache: Haiku Salon [26/09/2022, 19:48:22] [BigAssFans-i6] Executed didFinishLaunching callback [26/09/2022, 19:48:22] [BigAssFans-i6] Init - initializing devices [26/09/2022, 19:48:22] [BigAssFans-i6] Restoring existing accessory from cache: Haiku Salon [26/09/2022, 19:48:22] Publishing bridge accessory (name: Homebridge 300E, publishInfo: { username: '0E:19:56:99:AE:83', port: 51144, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://0024U0YX4GXPG Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 824-60-360 │     
└────────────┘     

[26/09/2022, 19:48:22] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge 300E) is running on port 51144. [26/09/2022, 19:48:22] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - model: Haiku H/I Series (0x48, 0x61, 0x69, 0x6b, 0x75, 0x20, 0x48, 0x2f, 0x49, 0x20, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73) [26/09/2022, 19:48:22] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - firmware: 3.1.0 [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0x90, 0x04] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0x98, 0x04] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0xa8, 0x05] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0xe8, 0x06] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - light detected [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - current relative humidity out of range: 1000, assuming no humidity sensor for model "Haiku H/I Series" [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0xa0, 0x05] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0x82, 0x0b] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0x8a, 0x0b] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0x92, 0x0b] === undefined [26/09/2022, 19:48:22] [BigAssFans-i6] Haiku Salon - propertiesTable[0x9a, 0x0b] === undefined [26/09/2022, 19:48:43] [BigAssFans-i6] Haiku Salon - propertiesTable[0x90, 0x04] === undefined [26/09/2022, 19:48:43] [BigAssFans-i6] Haiku Salon - propertiesTable[0x98, 0x04] === undefined [26/09/2022, 19:48:43] [BigAssFans-i6] Haiku Salon - propertiesTable[0xa8, 0x05] === undefined [26/09/2022, 19:48:43] [BigAssFans-i6] Haiku Salon - propertiesTable[0xe8, 0x06] === undefined [26/09/2022, 19:48:43] [BigAssFans-i6] Haiku Salon - propertiesTable[0x90, 0x04] === undefined [26/09/2022, 19:48:43] [BigAssFans-i6] Haiku Salon - propertiesTable[0x98, 0x04] === undefined [26/09/2022, 19:48:44] [BigAssFans-i6] Haiku Salon - propertiesTable[0x90, 0x04] === undefined [26/09/2022, 19:48:44] [BigAssFans-i6] Haiku Salon - propertiesTable[0x98, 0x04] === undefined [26/09/2022, 19:48:44] [BigAssFans-i6] Haiku Salon - propertiesTable[0xa8, 0x05] === undefined [26/09/2022, 19:48:44] [BigAssFans-i6] Haiku Salon - propertiesTable[0xe8, 0x06] === undefined

thicla01 commented 2 years ago

Step 4) Upgrading to 0.5.1 and restart (The fan is still in HomeKit but no control via Home app)

[26/09/2022, 19:50:40] [Homebridge UI] Terminal session ended. [26/09/2022, 19:50:44] [Homebridge UI] Running Command: sudo -E -n npm install -g homebridge-i6-bigassfans@0.5.1 [26/09/2022, 19:50:49] [Homebridge UI] Homebridge restart request received [26/09/2022, 19:50:49] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [26/09/2022, 19:50:49] [Homebridge UI] Sending SIGTERM to Homebridge [26/09/2022, 19:50:49] Got SIGTERM, shutting down Homebridge... [26/09/2022, 19:50:54] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [26/09/2022, 19:50:59] [HB Supervisor] Restarting Homebridge... [26/09/2022, 19:50:59] [HB Supervisor] Starting Homebridge with extra flags: -I -D [26/09/2022, 19:50:59] [HB Supervisor] Started Homebridge v1.5.0 with PID: 2518 [26/09/2022, 19:51:00] Loaded config.json with 0 accessories and 2 platforms. [26/09/2022, 19:51:00] Loaded 1 cached accessories from cachedAccessories. [26/09/2022, 19:51:00] --- [26/09/2022, 19:51:01] [Homebridge UI] Starting terminal session [26/09/2022, 19:51:01] Loaded plugin: homebridge-config-ui-x@4.50.1 [26/09/2022, 19:51:01] Registering platform 'homebridge-config-ui-x.config' [26/09/2022, 19:51:01] --- [26/09/2022, 19:51:01] Loaded plugin: homebridge-i6-bigassfans@0.5.1 [26/09/2022, 19:51:01] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [26/09/2022, 19:51:01] --- [26/09/2022, 19:51:01] Loading 2 platforms... [26/09/2022, 19:51:01] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [26/09/2022, 19:51:01] [BigAssFans-i6] Finished initializing platform [26/09/2022, 19:51:01] [BigAssFans-i6] Loading accessory from cache: Haiku Salon [26/09/2022, 19:51:01] [BigAssFans-i6] Executed didFinishLaunching callback [26/09/2022, 19:51:01] [BigAssFans-i6] Init - initializing devices [26/09/2022, 19:51:01] [BigAssFans-i6] Restoring existing accessory from cache: Haiku Salon [26/09/2022, 19:51:01] [BigAssFans-i6] use of "whoosh" configuration attribute is deprecated, please use "showWhooshSwitch" instead [26/09/2022, 19:51:01] [BigAssFans-i6] Haiku Salon- use of "fanAuto" configuration attribute is deprecated, please use "showFanAutoSwitch" instead [26/09/2022, 19:51:01] [BigAssFans-i6] Haiku Salon- use of "lightAuto" configuration attribute is deprecated, please use "showLightAutoSwitch" instead [26/09/2022, 19:51:01] [BigAssFans-i6] Haiku Salon- use of "ecoMode" configuration attribute is deprecated, please use "showEcoModeSwitch" instead [26/09/2022, 19:51:01] Publishing bridge accessory (name: Homebridge 300E, publishInfo: { username: '0E:19:56:99:AE:83', port: 51144, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://0024U0YX4GXPG Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 824-60-360 │     
└────────────┘     

[26/09/2022, 19:51:01] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge 300E) is running on port 51144. [26/09/2022, 19:51:01] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - product type: Haiku H/I Series (0x48, 0x61, 0x69, 0x6b, 0x75, 0x20, 0x48, 0x2f, 0x49, 0x20, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73) [26/09/2022, 19:51:01] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - firmware: 3.1.0

oogje commented 2 years ago

Thanks!

It's interesting that things work with v0.4.3 of the plugin. but I don't know why it doesn't work with v0.5.1.

All the steps show "Publishing bridge accessory..." in the logs. Does that mean the plugin is using a child bridge in these steps?

Can I see the config file as it stands now assuming it hasn't changed since Step 4.

Does the fan show up in the accessories section of the Homebridge UI? If so can you control it from there?

thicla01 commented 2 years ago

Hello oogje,

I don't use any Child Bridge for step 1 to 4.

Here is the config file used in Step 1 (at the end), 3 and 4:

{ "bridge": { "name": "Homebridge 300E", "username": "0E:19:56:99:AE:83", "port": 51144, "pin": "824-60-360", "advertiser": "avahi" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "fans": [ { "name": "Haiku Salon", "ip": "Removed", "mac": "Removed", "fanModel": "Haiku H/I Series", "whoosh": true, "fanAuto": true, "lightAuto": true, "dimToWarm": false, "ecoMode": true } ], "platform": "BigAssFans-i6" } ] }

At step 4, the fan is still in the accessory list but no control. Same thing for the Home app in iOS.

oogje commented 2 years ago

Would you install homebridge-i6-bigassfans@0.5.2-beta3 and add these attributes to your config for the Haiku Salon:

...
"dimToWarm": false,
"ecoMode": true,
"debugLevels": [
  ["network", 4],
  ["redflags", 1],
  ["characteristics", 3]
]
...

then restart and try to turn the fan on and off and show the logs?

thicla01 commented 2 years ago

Hello oogje,

The new config

{ "bridge": { "name": "Homebridge 300E", "username": "0E:19:56:99:AE:83", "port": 51144, "pin": "824-60-360", "advertiser": "avahi" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "fans": [ { "name": "Haiku Salon", "ip": "Removed", "mac": "Removed", "fanModel": "Haiku H/I Series", "whoosh": true, "fanAuto": true, "lightAuto": true, "dimToWarm": false, "ecoMode": true, "debugLevels": [ [ "network", 4 ], [ "redflags", 1 ], [ "characteristics", 3 ] ] } ], "platform": "BigAssFans-i6" } ] }

Here is the result :

[27/09/2022, 15:32:00] [Homebridge UI] Terminal session ended. [27/09/2022, 15:32:00] [Homebridge UI] Homebridge restart request received [27/09/2022, 15:32:00] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [27/09/2022, 15:32:00] [Homebridge UI] Sending SIGTERM to Homebridge [27/09/2022, 15:32:07] [Homebridge UI] Sending SIGKILL to Homebridge [27/09/2022, 15:32:07] [HB Supervisor] Homebridge Process Ended. Code: null, Signal: SIGKILL [27/09/2022, 15:32:12] [HB Supervisor] Restarting Homebridge... [27/09/2022, 15:32:12] [HB Supervisor] Starting Homebridge with extra flags: -I -D [27/09/2022, 15:32:12] [HB Supervisor] Started Homebridge v1.5.0 with PID: 21512 [27/09/2022, 15:32:13] Loaded config.json with 0 accessories and 2 platforms. [27/09/2022, 15:32:13] Loaded 1 cached accessories from cachedAccessories. [27/09/2022, 15:32:13] --- [27/09/2022, 15:32:14] [Homebridge UI] Starting terminal session [27/09/2022, 15:32:14] Loaded plugin: homebridge-config-ui-x@4.50.1 [27/09/2022, 15:32:14] Registering platform 'homebridge-config-ui-x.config' [27/09/2022, 15:32:14] --- [27/09/2022, 15:32:14] Loaded plugin: homebridge-i6-bigassfans@0.5.2-beta3 [27/09/2022, 15:32:14] Registering platform 'homebridge-i6-bigassfans.BigAssFans-i6' [27/09/2022, 15:32:14] --- [27/09/2022, 15:32:14] Loading 2 platforms... [27/09/2022, 15:32:14] [BigAssFans-i6] Initializing BigAssFans-i6 platform... [27/09/2022, 15:32:14] [BigAssFans-i6] Finished initializing platform [27/09/2022, 15:32:14] [BigAssFans-i6] Loading accessory from cache: Haiku Salon [27/09/2022, 15:32:14] [BigAssFans-i6] Executed didFinishLaunching callback [27/09/2022, 15:32:14] [BigAssFans-i6] Init - initializing devices [27/09/2022, 15:32:14] [BigAssFans-i6] Restoring existing accessory from cache: Haiku Salon [27/09/2022, 15:32:14] [BigAssFans-i6] use of "whoosh" configuration attribute is deprecated, please use "showWhooshSwitch" instead [27/09/2022, 15:32:14] [BigAssFans-i6] Haiku Salon- use of "fanAuto" configuration attribute is deprecated, please use "showFanAutoSwitch" instead [27/09/2022, 15:32:14] [BigAssFans-i6] Haiku Salon- use of "lightAuto" configuration attribute is deprecated, please use "showLightAutoSwitch" instead [27/09/2022, 15:32:14] [BigAssFans-i6] Haiku Salon- use of "ecoMode" configuration attribute is deprecated, please use "showEcoModeSwitch" instead [27/09/2022, 15:32:14] Publishing bridge accessory (name: Homebridge 300E, publishInfo: { username: '0E:19:56:99:AE:83', port: 51144, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). Setup Payload: X-HM://0024U0YX4GXPG Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 824-60-360 │     
└────────────┘     

[27/09/2022, 15:32:14] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge 300E) is running on port 51144. [27/09/2022, 15:32:15] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - product type: Haiku H/I Series (0x48, 0x61, 0x69, 0x6b, 0x75, 0x20, 0x48, 0x2f, 0x49, 0x20, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73) [27/09/2022, 15:32:15] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - firmware: 3.1.0 [27/09/2022, 15:32:15] [BigAssFans-i6] dblog characteristics(3/3) Haiku Salon - update fan auto: false [27/09/2022, 15:32:15] [BigAssFans-i6] dblog characteristics(3/3) Haiku Salon - update FanOn: false [27/09/2022, 15:32:15] [BigAssFans-i6] dblog characteristics(3/3) Haiku Salon - update RotationDirection: 1 [27/09/2022, 15:32:15] [BigAssFans-i6] dblog characteristics(3/3) Haiku Salon - update Whoosh:true [27/09/2022, 15:32:15] [BigAssFans-i6] dblog characteristics(3/3) Haiku Salon - update Eco Mode:true

Note: No fan control

oogje commented 2 years ago

Thanks. Now please change the ["network", 4] to ["network", 8] and restart. I'd like to see the log file after that change but it will have some info like your MAC and IP encoded as hex numbers, so you might want to mail it to me rather than include it here. Is so, you can send to turbo_titled_0w@icloud.com.

oogje commented 2 years ago

My bad, make that ["network", 11], please.

thicla01 commented 2 years ago

Logs sent to turbo_titled_0w@icloud.com

oogje commented 2 years ago

Got it, thanks.

oogje commented 2 years ago

Can you (try to) turn the light off and on with Home app, and then the BAF app and send the log please. Make a note of the time when you use the Home app, and when you use the BAF app, thanks.

thicla01 commented 2 years ago

Here is the resulte with the plugin version 0.5.2 Beta 3

With the Home app, there is no communication with the fan and therefore no logs and no response from the fan. With the BAF app, the fan react to turning on and off the light but no log is generated. In the homebridge's accessories section, there is no device.

thicla01 commented 2 years ago

Here is the result with the plugin version 0.4.3

Sent to turbo_titled_0w@icloud.com

oogje commented 2 years ago

Thanks. Version 0.4.3 and 0.5.x parse the messages from the fan in different ways. At this point I understand 0.4.3 works but I can't really compare it to 0.5.x and see what's different because at a low level everything is different.

I think when you flip back and forth between 0.4.3 and 0.5.x it changes things like caches in HomeKit and it would be better if that didn't happen.

If you're okay using 0.4.3 that's fine. At this point I don't have much of a clue what's going on with your setup.

If you want to get to 0.5.x, I think we can eventually figure out why it's not working but it's going to be a lot of "change this config", "restart", "try to turn on the light", "send the logs", "repeat" to get to a solution.

If you want to keep working this, please clean the caches, persistence, etc, run the beta and send me the logs. If not we can take a break and I'll work with the data I have from you so far. Either way, I appreciate your help so far.

thicla01 commented 2 years ago

OK. I understant. Il will try again tomorrow with 0.5.2 Beta 3.

thicla01 commented 2 years ago

There is a firmware update tonight for the fan and wall control (version 3.1.1). I have some communication between homebridge (plugin version 0.5.2 Beta 3) and the fan. I just noticed that.

[27/09/2022, 22:22:24] [BigAssFans-i6] dblog progress(0/0) Haiku Salon - firmware: 3.1.1

oogje commented 2 years ago

Lol, I have no idea what's going on.

thicla01 commented 2 years ago

Hello oogje,

I was trying a lot of things today to figure out the problem. I've always tested with my Haiku in the living room. I decided to test with the Haiku in my bedroom. It works with that Haiku and the plugin version 0.5.1! It seems that the problem is with my Haiku in the living room only... I will try a hard reset on that Haiku and will let you know...

thicla01 commented 2 years ago

If I put both fans in the configuration, everything stop to work...

thicla01 commented 2 years ago

I sent you the log by email for both fans.

oogje commented 2 years ago

Hello,

I haven't received the email with the log files.

thicla01 commented 2 years ago

I sent them to this email address : turbo_titled_0w@icloud.com Is this correct?

oogje commented 2 years ago

Yes, that address is correct.

oogje commented 2 years ago

I just received the email with text "Logs with the fan in the bedroom working with plugin version 0.5.2-beta3".

thicla01 commented 2 years ago

OK I just send them again from another email account. Let me know.