Posted by: @cathoderay@marekk and @iancalderbank - a first draft of my proposed layout. After much time spent down ESP rabbit holes I just about decided on balance the ESP route makes marginally more sense than the RPi Pico W route. In many ways, including cost, they are very similar, but the deciding fact for me all said and done ESP is currently more integrated with HA via ESP Home. In time, I think that may change, as more people use RPi Pico Ws with HA, but we are where we are now. That said, most of the ESP/HA forum threads are dossiers of despair, a litany of failed connections especially by beginners like me, but there are occasional positive results. But the current situation with HA/RPi Pico W is even worse, there is almost nothing out there yet (though that may change in time). Here's my proposed schematic:
As you can see, I have proposed using a wired ethernet connection, with added PoE (Power over Ethernet). It solves the power supply problem, and was the robustness of wires (I am not sure how well those PCB trace antennae will get wifi through my solid stone walls, and it would be a real nuisance to buy the kit and have it not work).
The mini PC, router and Midea wired controller are already in place. The new additions are:
(1) PoE injector: about a tenner off ebay eg here (<=link)
(2) PoE ethernet enabled ESP32: these are more expensive, but they potentially solve a number of problems. Possible candidate here (<=link)
(3) I'm still working on details for the other three sensors (the ones in the left hand box will be later additions, once the basics are set up)
(4) Cables as shown
Any thoughts/comments very welcome, as ever!
Can the ESP32 accept PT100 Resistance Temperature Detectors?
These are relatively cheap and quite accurate and could be obtained readily from TC Direct, who have both indoor and outdoor variations.
Posted by: @derek-mCan the ESP32 accept PT100 Resistance Temperature Detectors?
shortly: yes, but...
PT100 is as you said resistance temp sensor, therefore it would require analog to digital conversion (ADC). ESP8266 has only one such port, if you wish to add more then need to use ESP32: has 16 analog ports, code is backward compatible with ESP8266.
Second but: there is something better (in my opinion) - DS18B20
It is a 1-WIRE digital temperature sensor. Each DS18B20 temperature sensor has a unique 64-bit serial code. This allows you to wire multiple sensors to the same data wire. So, you can get temperature from multiple sensors using a single GPIO (I personally tested twenty conected to one line each on 3m cable).
you can buy in waterproof protection with different lenght of cables, the more you buy they cheaper will get, I see £9 per 5 on ebay, and probably even cheaper on AliExpress
you need one resistor:
If you will to explore more about temp sensors here is nice reading: link
Remark: I advertise ESPHome as it has best integration with HomeAssistant, but there are others working on ESP8266 like ESPEasy or Tasmota
Posted by: @derek-mCould you explain which of the midea_ac_lan routines you used to obtain the messages, particularly the type 4 showing power in and power out.
I didn't actively do anything, I just copied the developer's code into HA as a custom component, and enabled it. The workings of the code that obtains (gets) the messages is still beyond me. In the debug logs, the 01 messages appears as sent/received pairs (as in sent from/received by midea_ac_lan) every minute of so, but the 04 messages just appear as received, there is no corresponding sent message, mostly but not always on the hour. The code that sends the 01 message appears to be in \core\device.py:
def send_message(self, data): if self._protocol == 3: self.send_message_V3(data, msg_type=MSGTYPE_ENCRYPTED_REQUEST) else: self.send_message_V2(data) def send_message_V2(self, data): if self._socket is not None: self._socket.send(data) def send_message_V3(self, data, msg_type=MSGTYPE_ENCRYPTED_REQUEST): data = self._security.encode_8370(data, msg_type) self.send_message_V2(data) def build_send(self, cmd): data = cmd.serialize() _LOGGER.debug(f"[{self._device_id}] Sending: {cmd}") msg = PacketBuilder(self._device_id, data).finalize() self.send_message(msg)
The V2/V3 stuff is about the different Midea protocols, the current V3 protocol messages, unlike previous protocol versions, use encryption (the so called 8370 encoding). What I see here is def build_send() sets up the message and send it to def send_message(), after logging the sending (which seems premature, as it hasn't actually been sent at that point in time, but there's no accounting for coding!). But 04 type messages (that you ask about above) don't get a 'Sending:' log entry, so they either get sent a different way, or don't get sent at all; instead, maybe the wired controller broadcasts then every hour or so, and all midea_ac_lan has to do is receive them?
I have tried to work out how cmd (which becomes the message) is assembled, without success. Stepping back through the code, it gets painfully recursive, and I end up lost. I have also looked for some sort of timer that times when to send the messages, but can't see anything obvious.
Posted by: @derek-mI think that it may be quite feasible to add the code to extract further data from the controller, assuming that it is present [emphasis added].
It seems to me there us something present, but we don't know what it is. I remain convinced the developer of the modified midea_ac_lan code (the code that receives and processes the 04 messages) has some inside knowledge or way of looking that things that allows the developer to know what to find in the message, possibly even how to process it. I have left messages on the relevant github page but so far no reply.
Posted by: @derek-mCan the ESP32 accept PT100 Resistance Temperature Detectors?
See @marekk's helpful reply.
Midea 14kW (for now...) ASHP heating both building and DHW
@marekk - again, thanks again for the information and practical detail, it is very helpful.
I meant to add yesterday that the controller (I was thinking ESP32 rather ESP8266 - any particular reason you have used the latter?) that will be in the airing cupboard, next to the wired controller, and all the wiring runs from there are feasible, either through under floor board space or through the attic (being on the first floor, the airing cupboard abuts both). The outdoor temp sensor wire for example can run up through the attic to the eaves, where it will be sheltered from direct sunlight.
Midea 14kW (for now...) ASHP heating both building and DHW
I am now also wondering whether PoE is such a good idea after all. I do have a mains supply in the airing cupboard (supplies the remote wireless thermostat receiver, and powers the radiator circulating pump). It's currently a switched fused supply, no 13A socket, but I am sure I can get power from it without burning the house down. A 13A to low voltage DC power supply unit could then supply all the power needs, more simply and probably more cheaply, than using PoE. I still favour wired data connections though, old habits are slow to die!
Midea 14kW (for now...) ASHP heating both building and DHW
Posted by: @cathoderay@marekk - again, thanks again for the information and practical detail, it is very helpful.
I meant to add yesterday that the controller (I was thinking ESP32 rather ESP8266 - any particular reason you have used the latter?) that will be in the airing cupboard, next to the wired controller, and all the wiring runs from there are feasible, either through under floor board space or through the attic (being on the first floor, the airing cupboard abuts both). The outdoor temp sensor wire for example can run up through the attic to the eaves, where it will be sheltered from direct sunlight.
ESP 8266's and 32's do fundamentally the same job. the 32's are just more powerful (cpu, ram) and have more capability, in return for being (a bit) larger and (a bit) more expensive. If for example you wanted to do PWM control, you need a 32 as it does PWM in hardware, 8266 only does it in s/w and it doesn't work very well (I tried it).
ref the other comment on temp sensors - DS18B20's definitely the way to go. I have 15 of them wired to a single digital input on an ESP in my airing cupboard. works perfectly. and they cost next to nothing.
I started with ESP8266's as I knew no better, but anything new that I build, I use an ESP32 - UNLESS it happens to come as ready made board for a specific purpose with an 8266 on it from the manufactur.
PoE is a valid way to provide power for the ESP32 as per your diagram.
the other way, is just to run cat 5 for the ethernet without the Power bit. Then - assuming there is a spare 230v AC socket somewhere near where the ESP is going - plug in a 230v USB adapter to power the ESP. Any USB charging adaptor from an old phone will do, you only need fractions of an amp for an ESP. And/or you can change the socket for one of those with builtin USB ports, then the socket stays available for whatever you use it for.
My octopus signup link https://share.octopus.energy/ebony-deer-230
210m2 house, Samsung 16kw Gen6 ASHP Self installed: Single circulation loop , PWM modulating pump.
My public ASHP stats: https://heatpumpmonitor.org/system/view?id=45
11.9kWp of PV
41kWh of Battery storage (3x Powerwall 2)
2x BEVs
Posted by: @cathoderayI am now also wondering whether PoE is such a good idea after all. I do have a mains supply in the airing cupboard (supplies the remote wireless thermostat receiver, and powers the radiator circulating pump). It's currently a switched fused supply, no 13A socket, but I am sure I can get power from it without burning the house down. A 13A to low voltage DC power supply unit could then supply all the power needs, more simply and probably more cheaply, than using PoE. I still favour wired data connections though, old habits are slow to die!
posts crossed.
if you are electrically competent, take a spur off the supply and wire up a 13A socket using one of these
if you're not, get an electrician to do it.
plug the ESP into the USB port on the socket. done.
My octopus signup link https://share.octopus.energy/ebony-deer-230
210m2 house, Samsung 16kw Gen6 ASHP Self installed: Single circulation loop , PWM modulating pump.
My public ASHP stats: https://heatpumpmonitor.org/system/view?id=45
11.9kWp of PV
41kWh of Battery storage (3x Powerwall 2)
2x BEVs
great summary!
what I may add from practise is that ESP32 is very sensitive about 5V/3.3V power quality, especially during booting time when there is huge demand for current in very short time and many power supplies fail to provide, despite they are labelled 1, 2 or even 5 Amps. Even had problems with modern laptop or pc with USB3.0 which for example makes programming difficult, I spent endless hours figuring out what is wrong, replacing power supply or adding some circuits (like capacitor on power line) helped a bit.
You will see the effect on the console as endless booting loop.
ESP8266 is much less demanding and much more forgiving... beasides it's cheaper 🙂 And like the approach right tool for the right job, reading temperature is nothing for ESP8266, then even less for ESP32.
Posted by: @cathoderayPosted by: @derek-mHow do you keep your heat pump running but not your PC when you have a power cut?
"A power cut, or any thing else that renders both the heat pump and HA out of action, will only mean the boost instruction won't happen. , meaning, I think, [T]he only potential malfunction, given a running heat pump and out of action HA for some other reason eg software crash, is the LWT adjustments won't happen, the heat pump will just run in normal weather comp mode."
Apologies if this is a dup post but I don't think it is
Power cuts are not the issue. in that case nothing works, solution is only a) wait for electric company b) protect yourself with house batteries (not for this thread)
The issue to consider is this: if your automation systems based on HA, ESP's or anything like that, are not working any more - does your heating still work ? albeit perhaps without the "optimisations".
Example : you upgrade HA to latest version and half your custom integrations stop working because they all need upgrading too , and one of them doesn't have an easy / well defined upgrade method because its bleeding edge ...you have to ping the developer on forum or github ... etc etc...
exactly this happened to me yesterday - not just hypothetical.
My octopus signup link https://share.octopus.energy/ebony-deer-230
210m2 house, Samsung 16kw Gen6 ASHP Self installed: Single circulation loop , PWM modulating pump.
My public ASHP stats: https://heatpumpmonitor.org/system/view?id=45
11.9kWp of PV
41kWh of Battery storage (3x Powerwall 2)
2x BEVs
Posted by: @iancalderbankexactly this happened to me yesterday - not just hypothetical.
Yes, so at the point my heating is fully controlled by HA, then I will have to put in a second (non prod) environment, for sure. Right now I only upgrade HA on the .4 or later releases each month, anyway, not that I would want anyone else to do that of course, I need people to test it first 🤣
Posted by: @william1066Posted by: @iancalderbankexactly this happened to me yesterday - not just hypothetical.
Yes, so at the point my heating is fully controlled by HA, then I will have to put in a second (non prod) environment, for sure. Right now I only upgrade HA on the .4 or later releases each month, anyway, not that I would want anyone else to do that of course, I need people to test it first 🤣
If you are using a system for control purposes, I would suggest not carrying out any form of upgrading unless it is absolutely necessary. Industrial control systems, once commissioned and optimised, are never upgraded unless it is to rectify a discovered flaw.
What's that saying? "If it's not broke, don't fix it" 😋
A quick question. Is the ambient air temperature reading available in the Midea Cloud? What other variables are available in the cloud that are not being picked up by HA?
- 22 Forums
- 2,078 Topics
- 45.5 K Posts
- 109 Online
- 3,355 Members
Join Us!
Trusted Installers
Struggling to find a reliable heat pump installer? A poor installation can lead to inefficiencies and high running costs. We now connect homeowners with top-rated installers who deliver quality work and excellent service.
✅ Verified, trusted & experienced installers
✅ Nationwide coverage expanding
✅ Special offers available
Latest Posts
-
RE: Renewable Heating Hub Homeowners' Q&A Podcast
In our latest episode, we hand the mic to four homeowne...
By Mars , 5 hours ago
-
RE: Forum updates, announcements & issues
@andrewj I’m currently away and only back this weekend....
By Mars , 5 hours ago
-
This is very interesting - I have just had my ASHP spli...
By heat-pump-newbie , 8 hours ago
-
RE: Help Stop the MCS Heat Pump Monopoly
Response sent. Thank you for highlighting the document...
By Sheriff Fatman , 13 hours ago
-
RE: I worry I've messed my Samsung settings up somehow
Yes , this time of year . Unfortuneately I dont have ...
By Alfapat , 14 hours ago
-
RE: Feasible solutions to expand existing Sunsynk battery capacity
Ours is a loft installation, which is where both invert...
By Sheriff Fatman , 15 hours ago
-
All your heat pump problems solved by -- a plate heat exchanger in a plinth!
The cut away appears to shows that its a plate heat exc...
By JamesPa , 17 hours ago
-
RE: 5 Star Service from Havenwise
@sheriff-fatman Exactly this is why a lot of our users ...
By HCas , 2 days ago
-
RE: Solar Thermal DHW and ASHP
I'm beginning to think solar thermal is something that ...
By Alex_N , 2 days ago
-
RE: Commencing on an ASHP Installation Process
I received the BUS Grant permission email yesterday eve...
By Sheriff Fatman , 2 days ago
-
RE: Solar Power Output – Let’s Compare Generation Figures
510kWh of solar PV from my 4kW Hyundai panels and SMA S...
By JulianC , 3 days ago
-
RE: Is my Samsung heat pump working too well?
Thats in itself is interesting. I have a Vaillant heat...
By JamesPa , 3 days ago
-
RE: Jokes and fun posts about heat pumps and renewables
@transparent Not a swell season then ☹️
By Toodles , 4 days ago
-
RE: Air Changes per Hour - ACH and the MCS requirement
update - my old installer insisted on a heat loss of 11...
By MatWin , 5 days ago
-
I agree it's not very helpful. Generally, the max heat ...
By Old_Scientist , 5 days ago
-
RE: Why Your MCS-Certified Installer Might Not Be As Competent As You Think
Hive and most other smart thermostats don't play well w...
By JamesPa , 6 days ago
-
RE: Enabling WiFi: Samsung ASHP on Smart Things App
Thanks for the input. I've been running various experim...
By Grahamh-uk , 6 days ago
-
RE: Radiators downstairs are cooler at the bottom after ASHP install
@melonbuffet Hi, this sounds great is you are getting 5...
By ASHP-BOBBA , 6 days ago
-
RE: Ripped Off: How UK Homeowners Are Paying Gas Prices for Wind Energy
I believe there's another reason that network upgrades ...
By Transparent , 6 days ago