Phil_E
(Phil Emmott)
2 April 2024 15:15
59
Thanks @John . Agreed on the coffee front, It’s quite a bit of code I’ve just sent his way!
I just found the explanation in a file called “Daikin I Protocol.md” under doc.
converters.h is using convid to decide what to do in the switch code.
Interestingly in the EDLA monobloc .h file there is no ‘200’.
lots of 30X’s though.
In converters.h, cases 300, 301, 302, 303, 304, 305, 306 and 307 all call the convertTable300() function.
As for an approach, I’d like to maintain the integrity of the original program, with as little disruption as possible, but I also didn’t want to have to duplicate lots of the code to create the ability to have 2 different data sets being created simultaneously (the ON/OFF set and the 0/1 set). This would only be needed to send MQTT messages and HTTPS messages to 2 different places, in 2 different formats, if MQTT couldn’t be set up to cope with 0’s and 1’s.
So in converters.h I added:
and modified the 200 and 300 functions to contain:
and
Pull request now re-posted on github:
raomin:main
← Phil-Emmott:main
opened 03:10PM - 02 Apr 24 UTC
As a heat pump installer I am keen to make sure that I can provide the best serv… ice 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.
1 Like