Hey all,
i plan to develop an integration for HomeAssistant. I am not a full time dev and was planning to contribute to this amazing project. I already made a great progress (would say i am 80% done) and now identified a potential show stopper and not longer sure if it’s worth to go ahead. That’s why i would like to reach out to you
My overall target was to get this integration becoming “core”.
The UseCase:
I have an battery device at home which is providing their data by an modbus and xml API. I created a python client (pypi-package) to collect the data from the tcp modbus server and from the xml api. (state of charge, current grid consumption, serial of the device, …)
Afterwards i used the great documentation and created a sensor integration to provide all of this data as sensors to homeassistant. The user just have to enter the device-hostname / ip of the battery and all entities will be created automatically. This is so far working on my dev-image
The “issue” i have identified:
The most of the data of the battery device (except some only provided by the XML api) could also be solely integrated to homeassistant by using the modbus integration. Of course far not that comfortable because you need to know the register mapping, datatypes and so one. Some data also first have to be modified (like values splitted in Low and High byte in different registers…)
Some other data would also not be provided by the modbus registers at all.
My question
As i plan to “become core” with this integration. Will it be allowed to commit such an integration or will it be declined because the majority of this data could be integrated by native modbus sensors?
Hope i was able to describe it well.
As longer i think about that i come to the conclusion that this exactly is the purpose of integrations? If they would no integration allowed as long they used APIs like modbus,restful,xml… there wouldn’t be any integrations at all
Have you considered a hacs integration first. This would likely get you some testing and work out any kinks and if enough people start using the integration it might move to core. It may not have to be core to help a lot of people.
Rather than becoming an integration, you can add a new functionality to existing modbus integration to support sharing the configuration/templating (not ha style templating). So other users do not need to figure out all registers, they should just put ip and port and import your configuration (like blueprints) and it can work, right?
And do not worry too much about becoming core integration, most ha users are fine with custom components using hacs or manual installation.
I am aware about the HACS possibility. It’s not that i do not wan’t to publish it there for any reasons - my intention to “become core” is more because i see it as a challenge to ensure that my integration is following the best practices .
Thanks for your replies! I will further work on the integration and hopefully will publish it soon.
HACS does not mean that you should not follow best practices, it is a step, you can directly go to core or you can startup with HACS, just don’t see HACS as blocker, users are fine with it. At least, none of users for my integrations did not quit as it was not part of core.
By the way, you can use modbus component inside your component, inter-component dependencies are fine.