Open c0fec0de opened 4 years ago
Hi,
thanks a lot for ebusd integration into home assistant. As i said, I need to monitor a complex setup with 4 mixers, a warm water circuit and one heater. The initial bring up was quite fast, but i stumbled over a set of issues:
As these are a lot of conceptual changes, so i tried on my own. At the end I had to completely rewrite ebusd. I just created a new project called 'ebus'. https://github.com/c0fec0de/ebus The documentation is located at https://ebus.readthedocs.io/en/latest/ We can completely convert to ebus or I merge the 'ebus' to 'ebusd'. What do you think?
There is now a Connection object to handle a persistent connection. A CircuitMap handles multiple instances of the same unit (i.e. mc vs mc.3) A Units object holds all possible formats (temp, tempok, pressure), their conversion and the corresponding home-assistant attributes. A Fields object holds the informations from your const.py with the devices, their messages and fields. I add also some tests, to ensure function and quality. Target is to have 100% coverage. I am not done yet.
I also adapted the home assistant integration accordingly. https://github.com/c0fec0de/home-assistant/tree/ebus/homeassistant/components/ebusd It makes use of the new 'ebus' implementation. The configuration options on the configuration.yaml changed. I kept legacy. The existing options should work as know. Additional there is a circuitmap option, which feeds the CircuitMap object. By default all known attributes of all known devices are listed, if the monitored_conditions option is not specified.
I am gonna extend the code also to handle the sensor states: No value yet, Value does not exist in system and value available.
Overall i am nearly done with fixing the issues above. I would try to get the home-assistant integration merged as soon as possible, but i need to extend documentation and testing first.
After that, there is the other idea, to load all field defintions from the ebusd-configuration repo/URL