raomin / ESPAltherma

Monitor your Daikin Altherma / ROTEX heat pump with ESP32
MIT License
338 stars 113 forks source link

Include support for HTTPS POST of data to HTTPS Server (e.g. emoncms.org for heatpumpmonitor.org) #2 #428

Open Phil-Emmott opened 5 months ago

Phil-Emmott commented 5 months ago

As a heat pump installer I am keen to make sure that I can provide the best service to my clients. I also have some coding experience (not loads, so please go easy on me). Daikin's StandByMe professional portal gives very limited data to the installer, whilst this project gives excellent coverage, and if implemented, would allow installers to really optimise their installations and up their game. In order to draw the charts in the same format as heatpumpmonitor.org using the app in openenergymonitor.org, the data needs to be sent as a HTTP POST to an instance of emoncms (normally emoncms.org). I took this one step further and implemented HTTPS, which may be unnecessary, but offers future proofing. After discussion on openenergymonitor forum, it was pointed out that if an installer wanted to do this, then they also would need a local MQTT broker and a means of forwarding the data as HTTP. This would normally mean a homeassistant device / raspberry PI as well (i.e. a second box of some type), and at this point it's inefficient for a heat pump installer to bring and setup all this kit, and could result in repeat visits to a client to resolve IT issues. This pull request is to bring in the HTTPS POST directly into the main program, so that the option exists to send Daikin (and other brands) data directly via https post to emoncms and other web servers to allow for the charting to work from this data. This version is cleaner than my previous pull request as the https.h contains all the https related functions, rather than having them in the mqtt.h file. I've taken on board the comments from @arc12 (Adam Cooper), thanks for taking the time to review. I've also added an option in converters.h to have the 'simple' boolean data reported as 1/0 rather than ON/OFF in case the destination requires (this is the case with emoncms.org). Thanks for your consideration, and also to my co-author Ice and Rock.

johngouk commented 2 months ago

This is a really useful addition to the ESPAltherma software. As Phil says, it removes the need for HA/local EmonCMS, and also simplifies processing with the 0/1 Off/On change. Any chance we could have this accepted??