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

Support IO Connexoon devices #6

Closed artik closed 4 years ago

artik commented 4 years ago

Hi Matthieu!

Regarding this post https://github.com/yenoiwesa/homebridge-connexoon/issues/4 it seems you're interested to support connexoon IO devices. I'm fully equipped, and actually your plugin still doesn't support them (it returns me only RTS devices).

I can help you to test all IO devices, and help you to make this plugin compatible with it.

Let me know ;) Jeff

renajohn commented 4 years ago

🀞 It's been more than 2 weeks I can't use my home automation system due to Somfy incompetence. I would love to have your plugin working with IO devices. I can test too.

yenoiwesa commented 4 years ago

Hi @artik and @renajohn πŸ‘‹

Yes currently this plugin only supports RTS devices because that's what my home is equipped with, and thus can test easily.

What protocol do you guys need support for and what type of devices? Is the protocol called IO? I can have a look at how these are implemented in homebridge-tahoma and build something similar if that unblocks you. But I will rely on you to be able to test the code.

Let me know about the above.

artik commented 4 years ago

Hi Yenoiwesa! Yes, OI devices. As the tahoma's plugin doesn't seems to be maintenained (and I still have few bugs), I'm totally in for all the tests.

What kind of communication way do you prefer ? Mail? Skype? Whatsapp?

renajohn commented 4 years ago

Yes, all my blinds are IO. This would be outstanding if your bridge supported those devices. We could use this ticket to communicate back and forth.

artik commented 4 years ago

@yenoiwesa @renajohn The good point is that I almost have all types of IO blinds (as I need the 3 connexxon apps!). So test will be easy

wormpy001 commented 4 years ago

Hello, is there any progress on supporting io devices? I have io blinds and i'm very interested to put it on homebridge and test it

artik commented 4 years ago

https://github.com/dubocr/homebridge-tahoma Fully support it already :)

yenoiwesa commented 4 years ago

Hey @artik, @renajohn and @wormpy001 πŸ‘‹

Really sorry I haven't been able to update you on this, the fact is that recent days have been quite hectic and I have not been able to work on this at all 😞

What I will do for now is to update the repo's README file to better indicate that this plugin currently only handles RTS devices, and forward people to homebridge-tahoma for IO device support.

I will leave this ticket open as "help welcome". I'd be happy to receive and review a pull request that brings IO device support and help with the rework if necessary.

Thanks guys for your understanding!

wormpy001 commented 4 years ago

https://github.com/dubocr/homebridge-tahoma Fully support it already :)

Thanks @yenoiwesa, everything works fine with the tahoma plugin

renajohn commented 4 years ago

I've started the work to support my IO devices with this plug-in (Awning + exterior venetian blinds). Like everyone else, I have a limited amount of free time, so it will take me some time to get something up and running. I took the liberty to add unit tests where I modify the project. If my fork is working, for me, I'll submit a PR (hopefully before the end of this year lol).

yenoiwesa commented 4 years ago

@renajohn that's amazing! I'll welcome any pull request and help with getting it merged and published. Unit tests also more than welcome!

renajohn commented 4 years ago

I have a first working version in my local repo. It's still rough and unoptimized. I have one refactoring I want to add before pushing the code to Github and create a PR on your repo.

No ETA at the moment :)

artik commented 4 years ago

That’s a great news, tester if you need as I own many somfy devices :)

renajohn commented 4 years ago

@artik I'll let you know when my extension is available. I'll probably need 2 more weeks, given the rate at which I progress...

renajohn commented 4 years ago

I have a first version that works for me (limited testing for the moment). It's still rough around the edges and I failed to make my awning works as expected (the open/close state is wrong as homekit get confused with the fact that awning are reversed).

If you want to give it a try, I have fork of this repo with a branch to support IO. To add it to homebridge, simply add this to your package.json:

"homebridge-connexoon": "git://github.com:renajohn/homebridge-connexoon.git#feature/io"
yenoiwesa commented 4 years ago

@renajohn I just had a quick look and your changes look great! Whenever I have time, I might create a pull request between your fork and this repo if you don't mind, and start a review on it. The Jest unit tests are top notch! Thanks for all the work you've done!

renajohn commented 4 years ago

Thank you :)

I still have one functional bug with my Awning that I'm working on. I'm also going to look into integrating the Unit tests in Travis CI.

I took the liberty to dockerize my fork with homebridge to have a simple way to debug the plugin.

yenoiwesa commented 4 years ago

I saw the Docker compose file yes, that makes sense.

Regarding Travis CI, do you feel that GitHub Actions won't be enough? I already have eslint linting running in Actions at the moment, would be quite easy to just add the npm test command to run next.

renajohn commented 4 years ago

That could work, yes. I wanted to experiment with Travis CI. I will do that in another branch.

renajohn commented 4 years ago

I've merged my branch on master and fixed some other bugs, integrated with TravisCI to run all tests when a PR is created, and updated the readme. It is working to my satisfaction at the moment, including my awning.

My branch brings a unique feature (I think). It listens to SOMFY events and acts on it. Imagine you want to set up an automation to switch off your bedroom lights when the blinds open during daylight. With other plug-ins, it will work... until you decide to use your SOMFY remote to open your blinds. With my fork, the plug-in also listens to SOMFY events. It will see your blinds opening and reflect that into HomeKit which will trigger your automation.

yenoiwesa commented 4 years ago

Hi @renajohn πŸ‘‹

I opened pull request #8 and will (slowly) work at fixing the comments I put on it in the hope of eventually merging it to master :-)

Thanks again for all the work! Don't hesitate to jump in of you feel like it.

yenoiwesa commented 4 years ago

An update regarding this issue.

Unfortunately after having a look at the code changes necessary to gracefully support both RTS and IO communication protocols for the same device types, I do not feel that this is the right direction for this plugin.

In version 2.0.0 of the homebridge-connexoon platform, I have added an option useListedDevicesOnly to filter out Connexoon devices that you do not want this platform to map to Homekit. This allows you to use a different plugin to map IO devices specifically, and still use this platform for your RTS devices.

I have also clarified in the README.md file that this plugin handles devices that communicate with the RTS protocol.

In consequence, I will close pull request #8 and will also close this issue.

@renajohn did a wonderful job at mapping some IO devices based off this platform, so there is still the option to publish a homebridge-connexoon-io plugin from his fork if people are willing to make the effort.

Thanks for your understanding, all!