yenoiwesa / homebridge-connexoon

A homebridge plugin to integrate Somfy blinds with the Connexoon RTS hub
Apache License 2.0
27 stars 2 forks source link

Return in 2.2.4 of #20 "The requested platform "Connexoon" was not registered by any plugin"? #86

Closed davidh2075 closed 1 year ago

davidh2075 commented 1 year ago

I just upgraded to 2.2.4 and it seems that #20 has returned, i.e. The requested platform "Connexoon" was not registered by any plugin. Your config.json is requesting the platform "Connexoon" which has not been published by any installed plugins.

I am running an old HOOBS, 3.2.6.

Configuration is: { "platform": "Connexoon", "name": "My Connexoon Hub", "username": "XXXX", "password": "YYYYY" }

Any help would be appreciated.

regards

davidh2075 commented 1 year ago

I fixed the problem on HOOBS 3.2.6 with these changes to include PLUGIN_NAME in api.registerPlatform():

hoobs@hoobs:~/.hoobs/node_modules/homebridge-connexoon/src $ diff index_SAVE.js index.js 
1c1
< const { PLATFORM_NAME, ConnexoonPlatform } = require('./connexoon-platform');
---
> const { PLUGIN_NAME, PLATFORM_NAME, ConnexoonPlatform } = require('./connexoon-platform');
4c4
<     api.registerPlatform(PLATFORM_NAME, ConnexoonPlatform);
---
>     api.registerPlatform(PLUGIN_NAME, PLATFORM_NAME, ConnexoonPlatform);
hoobs@hoobs:~/.hoobs/node_modules/homebridge-connexoon/src $ diff connexoon-platform_SAVE.js connexoon-platform.js 
202c202
< module.exports = { PLATFORM_NAME, ConnexoonPlatform };
---
> module.exports = { PLUGIN_NAME, PLATFORM_NAME, ConnexoonPlatform };
hoobs@hoobs:~/.hoobs/node_modules/homebridge-connexoon/src $ 
davidh2075 commented 1 year ago

I upgraded to 3.3.12 and then 4.3.0 and the changes above are no longer necessary. Those HOOBS versions support the correct function signature for registerPlatform().

yenoiwesa commented 1 year ago

@davidh2075 sorry I have not given this plug-in much attention recently. I am glad however that you found the root cause of the issue, managed to fix it, and also that it was all fixed without a code change eventually by upgrading HOOBS! Nice investigation work :-)

Cheers mate!