Closed m0rph3usX closed 1 month ago
I know it would technically be possible to scrape the data from the web interface via HTTP requests. However, there are multiple reasons why I didn't implement it this way.
The main reason is that the HTTP API you're using is not a public API AFAIK and could change in arbitrary and incompatible ways with any update IDM deploys. My understanding is that this API is designed purely for the web interface, so IMO it's not unlikely that a small change in the web interface could also cause a change in the API.
The Modbus API on the other hand is explicitly meant for communication with external systems and will remain compatible in future versions. AFAIK Modbus is also used by some major 3rd party integrations like the integration of Fronius solar inverters, so it is unlikely IDM would introduce a breaking change.
Another reason is that I didn't want to put in the work of reverse engineering the HTTP API, since the Modbus API is well documented by IDM.
In short, using the HTTP API is possible yes, but out of scope for this integration. If you do not want to enable Modbus for whatever reason, you'll have to write your own separate integration. If you want to do that, you may want to take a look at the Home Assistant Developer Docs and the HACS Docs. In particular you should probably look into the DataUpdateCoordinator
, since the heat pump provides quite a lot of sensors which can be fetch together. You may also wanna look at httpx
for an HTTP library with async support.
Is your feature request related to a problem? Please describe. Currently you have to enable TCP Modbus, which can only be activated with technical-login
Describe the solution you'd like It is possible to fetch all data that are needed without TCP Modbus, by using python and a simple ethernet connection.
Describe alternatives you've considered I debugged the web-interface of IDM: The only thing the python script needs, is the ip-address and the password for login. The password can be set at display panel on the idm heatpump (without technical-login). The cool thing is, that via web-login, automatically all "heating circuits" / "Heizkreise" will be detected.
Here is a demo, which isn't working on my home-assistent yet, but the python script is working and gets all data which are needed. The trick is to extract the " csrf_token" on website login:
A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.