PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 43 forks source link

Homebridge and plugin eDomoticz working - but no accessories anymore #273

Closed TroisSix closed 1 year ago

TroisSix commented 1 year ago

Hello,

I don't know why, but suddenly my homebridge-edomoticz lost all my accessories. i tried to uninstall, reboot, re-install, but again I have a working homebridge but none accessories in the plugin edomoticz. I haven't any errors in the log (I also created a new user with a simple password) I deleted the accessories and persis folders in /var/lib/homebridge + new user + reboot...

Do you please have any suggestion to investigate?

Thanks a lot to everyone who will help me to handle this.

I installed homebridge with npm and I also tried apt install homebridge. Then I installed edomoticz with the plugin page from the plugins interface in the UI.

I have:

Logs:

[20/10/2023 21:56:53] [HB Supervisor] Restarting Homebridge...
[20/10/2023 21:56:53] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[20/10/2023 21:56:53] [HB Supervisor] Started Homebridge v1.6.1 with PID: 44738
[20/10/2023 21:56:54] Loaded config.json with 0 accessories and 2 platforms.
[20/10/2023 21:56:54] Loaded 0 cached accessories from cachedAccessories.
[20/10/2023 21:56:54] ---
[20/10/2023 21:56:54] Loaded plugin: homebridge-edomoticz@2.1.47
[20/10/2023 21:56:54] Registering platform 'homebridge-edomoticz.eDomoticz'
[20/10/2023 21:56:54] ---
[20/10/2023 21:56:54] Loading 2 platforms...
[20/10/2023 21:56:54] [eDomoticz] Initializing eDomoticz platform...
[20/10/2023 21:56:54] [eDomoticz] synchronizeAccessories in progress...
Setup Payload:
X-HM://0024MT7L9HI98
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 703-41-037 │     
    └────────────┘     

[20/10/2023 21:56:54] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge D35F) is running on port 51018.
[20/10/2023 22:06:54] [eDomoticz] synchronizeAccessories in progress...

Thanks for your suggestions ;-)

BR.

PatchworkBoy commented 1 year ago

See final comments of this issue: https://github.com/PatchworkBoy/homebridge-edomoticz/issues/270

ie: s’probably the new security model in Domoticz 2023.x - have you granted access to your devices to the Domoticz user…

TroisSix commented 1 year ago

Hi,

Thank you for trying to help me :)

I already checked all these parameters as it was working for so many years, but it stopped working after updates on my system:

Here is my configuration for homebridge:

{
    "bridge": {
        "name": "Homebridge D35F",
        "username": "0E:06:51:80:D3:5F",
        "port": 51018,
        "pin": "xxx-xx-xxx",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": XX,
            "platform": "config"
        },
        {
            "name": "eDomoticz",
            "server": "UserHomebridge:MyPassword@127.0.0.1",
            "port": "4443",
            "roomid": XX,
            "mqtt": false,
            "ssl": true,
            "dimFix": 0,
            "legacyBlinds": 0,
            "platform": "eDomoticz"
        }
    ]
}

The ports are opened:

$ ss -lntp
State     Recv-Q     Send-Q          Local Address:Port          Peer Address:Port    Process
LISTEN    0          128                         *:4443                     *:*
LISTEN    0          511                         *:51018                    *:*

When uninstalling and re-installing homebridge, I noticed this:

$ sudo npm install -g homebridge-edomoticz
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

I also uninstalled it and re-install it with sudo apt install homebridge

I see none trace of the homebridge's connection in the logs of Domoticz and none errors of authentication in homebridge's logs. Really stucked for the first time in 10 years I have domoticz + homebridge :(

BR.

TroisSix commented 1 year ago

I just reply to myself as I recovered back my accessories :)

For those who are interested, I just did an upgrade to Domoticz v2023.2 (I fear it as I haven't yet migrated from openzwave to zwave-js-ui...) and a npm install uuid@latest. Everything went good.

TroisSix commented 1 year ago

In fact, I spoke too fast cause my devices in "Home" on my phone are not responding... :-( I removed the accessory, added it again, but no change, the devices in the app are not responding...