[Guide]Millheat hardware modification, making it open source

Yes, my is generation 1 (SKAG).

Updated the esphome code and cleaned up a bit.
Changed the code so it won’t use as much lambda.
Working with esphome version: 2021.8.2

No news on getting the display and buttons to work with this model.

Anyone done some work on the Gen.3 versions heaters? They already have a esp32 on it, so it should be fairly easy to flash it with esphome.

Interesting!

Yes it should be quite easy, only need to connect a serial flasher and dump the firmware if you want to revert to stock firmware, before flashing esphome for example.
Then figure out how it communitcates with the display and buttons (if there is any).

I’ve dumped the flash now. Digging through the ota_1 app code as we speak.
So I might be trying to flash it with esphome soon.

The display looks like it’s over uart/spi since there is a second MCU on the display circuit board, and it’s connected with 4 wires, VCC, GND, and 2x data probably…

I’ll make a github repo to keep it all in eventually, just gotta figure out a tad more :+1:

2 Likes

Hi everyone!
So i have one of these standalone mill heaters (2. gen i believe) that uses the HF-LPT120 in a similar manner to your heaters @john-arvid and @JDolven. However mine has most of the circuitry on one board, and only the LCD and temp sensor connection is on a different board.


At first sight of the UART data on pins 5 and 6 of the HF, Ive found that this setup uses the same UART protocol as @JDolven reversed, so the library should be reusable. Here is some example data that was flowing to the HF:

0x5a 0x00 0x12 0x00 0x00 0xc9 0x01 0xc8 0x00 0x00 0x00 0x01 0x00 0x06 0x00 0x00 0xab 0x5b
0x5a 0x00 0x12 0x00 0x00 0xc9 0x01 0xc8 0x00 0x00 0x00 0x01 0x00 0x06 0x00 0x00 0xab 0x5b
0x5a 0x00 0x12 0x00 0x00 0xc9 0x01 0xc8 0x00 0x00 0x00 0x01 0x00 0x06 0x00 0x00 0xab 0x5b

My plan is to piggy-back and ESP01 off of pins 1(GND), 2(3v3), 5(RX) and 6(TX) on the HF-LPT120 so that both the mill app and an esphome solution can be used. And that way i dont need to de-soulder anything.

I really dislike the Mill ecosystem, and ive swapped out the HF-LPT120 on all my my Mill smart-sockets with esp01s as the HF chips kept dying.

I hope to have a working solution ready by the end of the week. It would be nice to organise the mill.h work done by @JDolven to a nice external component per the esphome spec but that will have to wait for now.

1 Like

I finally got it to work.
The commands in my convection heater were a bit different, so i created a new repo for my device. It also supports other functions such as enabling the fan.

Thanks for your efforts on this! I have Gen2 Mill heaters, and I have connected a Wemos D1 mini according to your pictures. I have uploaded your code, changing it to my details (wifi, heater name, etc), but it does not seem the wemos is receiving anything on the serial port. It is not possible to change temp via HA, and changing temp on heater, nothing is updated in HA. When changing temp in HA, the log states:
[14:51:08][D][climate:381]: Mode: HEAT
[14:51:08][D][climate:401]: Current Temperature: nan°C
[14:51:08][D][climate:407]: Target Temperature: 21.00°C

This makes me believe there serial connection is not working as it should. Do you have any tips?
It would me much appreciated!

I agree that there is some trouble with the serial connection.

Only tip I have is check that RX and TX i correctly wired.
You can add ESP_LOGI to the mill.h code to enable diagnostics.
After
void loop() override { recvWithStartEndMarkers();

Add this

for (int element : receivedChars) { // for each element in the array ESP_LOGI("Recivedbytes", "%x", receivedChars[element ]); }

This should output something else then zero if you are receiving data.
image

@JDolven

Hello i have 2 questions i have used your code and i have some trouble.

1: I have nearly everything working and installed the D1 mini into my Gen2 glass panel heater.
But when i try to change the temperature it does nothing.
My phone says that i set the device to for instance 20C but after 3 sec it just drops down again to 9 where it was.
The temperature on the display of the heater does also NOT change.
If i use the buttons on the heater it goes up and does report this temperature back to HA!

2: when compiling the binary to install it it manually it gives me a warning.

In file included from src/main.cpp:36:
src/mill.h: In member function 'virtual void MyCustomClimate::control(const esphome::climate::ClimateCall&)':
src/mill.h:58:16: warning: enumeration value 'CLIMATE_MODE_HEAT_COOL' not handled in switch [-Wswitch]
   58 |         switch (call.get_mode().value()) {
      |                ^
src/mill.h:58:16: warning: enumeration value 'CLIMATE_MODE_COOL' not handled in switch [-Wswitch]
src/mill.h:58:16: warning: enumeration value 'CLIMATE_MODE_FAN_ONLY' not handled in switch [-Wswitch]
src/mill.h:58:16: warning: enumeration value 'CLIMATE_MODE_DRY' not handled in switch [-Wswitch]
src/mill.h:58:16: warning: enumeration value 'CLIMATE_MODE_AUTO' not handled in switch [-Wswitch]

any idea what this can be?

I have the same issue with the second heater, the first one worked on first try. I cannot change temperature in HA, it returns after short time, but I can turn the heater on and off in HA. Also I can change temperature on the heater at HA is updating. Strange. I’m starting to wonder if I need to make sure that no soldering is spilled between the connectors in the PCB, but havent godt my magnifier glass here :slightly_smiling_face:

Flashed with the latest version from Jdolvens github (changed 4 days ago) and I can now control the heater. Got an error while compiling but that was fixed by removing // Resetter

1 Like

Nice work!
A word of warning:
The 3.3v supply in the oven is NOT isolated from the mains voltage! So it is dangerous to touch!
From your photos it looks like the temperature sensor is mounted on the outside bottom of the oven, exposing the connections.
That is dangerous as you/a child/a pet could get an electrical shock! Please keep the sensor inside the oven.