freeathome icon indicating copy to clipboard operation
freeathome copied to clipboard

Make this an official component

Open fotiDim opened this issue 5 years ago • 9 comments

I believe the component is now feature complete and stable enough to ship with home assistant. Are there any thoughts around this?

fotiDim avatar Sep 07 '19 17:09 fotiDim

Their style guide is fairly strict in stating that the API communicating part should be included as a dependency. Meaning that we would have to make a new project with the entire free@home communication part if we want to follow that.

lassem avatar Sep 16 '19 11:09 lassem

Think it does not make sense at this moment. Looking at the code and to confirm with style guides it does not seem mature yet. And also given the fact that ABB made a announcement about an open api makes it reasonable to explore a bit more: https://new.abb.com/news/detail/30956/abb-launches-open-api-platform-to-boost-smart-home-automation

Currently it makes maybe a bit more sense to combine the openHAB project with HA to make free@home work, their integration seems at first sight as a more mature component. I will investigate that this weekend. In the meantime I hope to get more information on the API, maybe we can have access to it is community. The announcement to me gives some anchors to get to that point of using APIs instead of building one ourselves. If the integration of OpenHAB and HA works for me I will definitely share it. If not, maybe I will extend this free@home component to make it work with my home setup (some lights and switches are not recognized..).

miezie avatar Sep 27 '19 09:09 miezie

Having just posted this.... I got the ABB confirmation that I am in the developer program ! :-)

miezie avatar Sep 27 '19 09:09 miezie

There is now also a local API - no cloud required. See #80

As far as I understand the HA guidelines, we need to take (at least) the following steps to get this to become an official component.

  • Create a separate pip library that handles all of the connection aspects and main API handling
  • Have the HA component use this library, and only deal with the Home Assistant parts to it

Any thing I am missing?

mountainsandcode avatar Nov 10 '20 09:11 mountainsandcode

@mountainsandcode That should be the way. IMO, we already split up everything as a preparation for this. All the code that deals with connection, communication etc. is in the freeathome/fah subfolder, while the custom component HA part is in the root folder freeathome. There are still things to be done, mainly:

  • Code quality: Home Assistant has some rigid requirements regarding coding conventions etc. They provide automatic linters for the code, so adapting our code to their style should be possible, but still a lot of work to do.
  • Tests: Up until now, there are only tests for the files in freeathome/fah, not for the component itself. Also not a big problem, but some work we have to do.

I don't think we have to move stuff off this repository, though. In my opinion, we could use this repository as a base for a pip library and keep a custom_component folder where we manage the HA part. As soon as the HA component is accepted upstream, we can get rid of this folder.

Tho85 avatar Nov 10 '20 11:11 Tho85

With becoming a official component it also makes sense to use official ways instead of "hacky" XMPP sniffing. So to add on top of the list: make it use the local API. Then we use an officially supported approach and we can trust the API contracts not being breached as what happened in the past with the XMPP integration.

Also we can then state that older versions of Sysap are not supported (I had one and replaced it due to serious performance drains when using more then one hue light) and we can exclude lower firmware versions in the end. It makes it easier to support the integration and validate.

miezie avatar Nov 10 '20 12:11 miezie

As Official Part from HA is great idea. How? or it is Official?

fahhome123 avatar Jan 21 '21 11:01 fahhome123

any news on the progress?

Dinges28 avatar Apr 30 '22 08:04 Dinges28

I would be really happy to help here :) I started a bit to set datapoints over the Rest-API and read changes from the websocket and it is working pretty fine.

To make this an official HA-integration the first step would need to be to create a dedicated library (and the HA component then would communicate with that library). I already started on this a bit but I'm an absolute beginner regarding Python (I'm coming from PHP), so I already stuck at the initial steps for such a library :(

I can offer a lot of testing help and (as soon as a basic environment for such a library is done) also programming. I'm able to provide the following stuff:

  • SysAP 2 (Current Firmware 3.2.2)
  • A lots of controllable lights (on/off and dimmable)
  • Several controllable sockets
  • Presence/Movement Sensors
  • WeatherStation
  • SmartTouch 10 (just one week old :) )
  • Controllable Covers
  • RTCs

I already have a good understanding of the datamodel provided by the Rest-API (SysAP-ID -> Device -> Channel (entity in HA) -> Datapoints (inputs and outputs) ) (I just don't understand the params provided by the channels) and also the data the websocket returns.

From an administrative perspective for sure the current setup within @jheling can be used for sure, but please ensure that several people have write-/administrative-permissions. I saw in the past the hassle with the paperless-ng project when suddenly the owner disappeared (and this can always happen, e.g. an accident)

Finally, once again, I would be delighted to help

derjoerg avatar Sep 20 '23 14:09 derjoerg