yenoiwesa / homebridge-connexoon

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

Local API #74

Closed FortuneV13 closed 1 year ago

FortuneV13 commented 1 year ago

Is it possible for local API to be added a source?

yenoiwesa commented 1 year ago

Hi @FortuneV13,

Could you please elaborate on your requirement? I don't quite get it.

FortuneV13 commented 1 year ago

Here you go: https://github.com/dubocr/homebridge-tahoma#configure-local-api

yenoiwesa commented 1 year ago

Does the Connexoon RTS box even support local API / developer mode?

yenoiwesa commented 1 year ago

Either way for the plugin to support a local API it would be akin to a total rewrite, and since I don't use the box to control my blinds anymore, it's very unlikely I would implement it. But it does sound very interesting (if the Connexoon RTS box, which is the only one I own, supports it).

FortuneV13 commented 1 year ago

No problem at all. Thanks for your work.

jdebardi commented 1 year ago

I'm commenting on this closed ticket because as far as I can tell, the local API they now offer is identical to the Overkiz API already in use by this plugin - see here https://somfy-developer.github.io/Somfy-TaHoma-Developer-Mode/

The only difference is the auth token initial setup - but given this plugin is already asking for username/password, it only need ask for the box PIN and do an mDNS lookup and it will work locally - which would be amazing!

I personally don't have the coding skills to do this (or at least, if I was to have a go it would take me 3 weeks and likely be very janky!). I wonder if @yenoiwesa might be willing to have a go (I am more than happy to help support testing) or if there is somewhere we can advertise a request for help for someone to fork and pull-request the working update back into this project?

yenoiwesa commented 1 year ago

@jdebardi do you have any more details for me on the local API setup? How do I enable the developer mode API and does it work with a Connexoon RTS box (Australia), which is the only one I have and thus can test with?

yenoiwesa commented 1 year ago

Because if it's not possible on the Connexoon RTS box then I can't just code it in the dark without any way of testing it.

yenoiwesa commented 1 year ago

Yep can confirm that as a Somfy Australia account holder I do not even have the option to activate developer mode for my Somfy account, it's not offered for my region, so I really can't do anything.

jdebardi commented 1 year ago

Ok, I'll see if I can have a go at having it accept a manually generated token and work locally using a fixed IP (rather than mDNS). Having reviewed the code I reckon I might be able to do that.

If that works I could also write a guide so "Joe Bloggs" could generate the required token using postman or cURL.

Maybe if get that working and I shared my Somfy creds (with temporary password!) with you privately, you could have a go at auto generating the token on first use of the plugin in my upcoming "LocalMode"? You might also be able to implement the mDNS using your Connexoon to test with?

Will report back with a forked repo ASAP.

Thanks again for your help and support providing this plugin (especially as you don't even use it anymore!).

vandinter commented 1 year ago

sorry for further hijacking this closed issue but am as well very interested in the local api. I even activated the local api a while ago with opening the box and running it in debug USB mode to add certificates, etc. but never managed to get the plugin adopted :-(

Great to see that there is now an option in the somfy account to activate without hardware-hacking (at least for Europe).

@jdebardi Any success?

jdebardi commented 1 year ago

@vandinter not yet - been busy with work so not had time to play. I will get to it though 👍