olekenneth / pyXcomfort

Python library for controlling Moeller Eaton Xcomfort lights.
GNU General Public License v3.0
7 stars 2 forks source link

Add MQTT integration #3

Closed olekenneth closed 4 years ago

olekenneth commented 6 years ago

Please help me with adding a MQTT integration to pyXcomfort

kedMertens commented 6 years ago

Hi, @olekenneth ! I would like to contribute by working on the issue. I have experience with MQTT. Do you have in mind some libraries? Paho by eclipse foundation is great option. I could investigate the issue and we could discuss other options. What do you think?

olekenneth commented 6 years ago

Awesome! I guess paho is used a lot. So that probably a good choice.

kedMertens commented 6 years ago

Awesome! I guess paho is used a lot. So that probably a good choice.

I'm totally agree with you. Should I open PR to start working on that?

olekenneth commented 6 years ago

I guess you can start by forking it and add some code, then add a PR, when you have something useful with tests

kedMertens commented 6 years ago

I guess you can start by forking it and add some code, then add a PR, when you have something useful with tests

Got it! Could you please mark that issue with Work In Progress (WIP) tag?

kedMertens commented 6 years ago

@olekenneth, could you please clarify where MQTT protocol has to be applied? Is it correct that now data from light bulb goes through serial protocol with help of RS-232?

olekenneth commented 6 years ago

Yes. That's correct. I assume you don't have Xcomfort or the RS-232-adapter, so you need to use the tests as way of implementing this. I have tests that will trigger the callbacks

olekenneth commented 6 years ago

To answer where the MQTT should be applied it's in the integrations folder, next to home assistant

kedMertens commented 6 years ago

Thank you, got it! Unfortunately, I don't have one. But I found datasheets and documentation, so it should give me better understanding. I keep working.

kedMertens commented 6 years ago

@olekenneth, I need some help. Could you please describe in details the Xcomfort set? With pyXcomfort library it is possible to access data directly from Home Controller device or there is smart light device? And by integrating MQTT protocol, where the application should be deployed?

olekenneth commented 6 years ago

The RS-232 interface is connected to the computer. This have a radio to communicate directly with lights (over 868Mhz).

We send data to the interface which contains instructions to a specific light to turn on/dim etc. You can see in the tests how this looks.

The task to implement MQTT should only need to use the callbacks and forward the information obtained to the MQTT stream.

kedMertens commented 6 years ago

The RS-232 interface is connected to the computer. This have a radio to communicate directly with lights (over 868Mhz).

We send data to the interface which contains instructions to a specific light to turn on/dim etc. You can see in the tests how this looks.

The task to implement MQTT should only need to use the callbacks and forward the information obtained to the MQTT stream.

Thank you for clarification. Sorry, I was out these days. Will work on the issue this weekends.

olekenneth commented 4 years ago

Implemented in the hassio/supervised-addon