Strooom / SmartTherm

Controlling a Junkers heating (Eurostar ZWE24) with an IoT thermostat
18 stars 3 forks source link

esphome - smarttherm_power_level // and parallel use #8

Open phmllr opened 8 months ago

phmllr commented 8 months ago

esphome: as seen in your esphome HomeAssistant integration there is an slider for configure the power level. This power level has to bee configured manually, right? So if there are 10°C in my room and i want it to be 20° i should make it to 100% until i reached the 20°C in x-minutes. But if the power level is only put to 50% it would need 2 times as long as on 100%. Did i understand that correctly?

Parallel use: in some other projects i've seen some schematics with an diode put on the "Junkers 2" or on the J1-2&3 in your yousecase. The diode is for an parallel use of the original Junkers thermostat as backup in case of an broken esp or smotething else. is it possible to put the diodes in your schematics too? I would do by my self but i want t know if its possible with your hardware.

nagyrobi commented 7 months ago

Have a look at the PID Thermostat, which continuously adjusts the "slider" to keep temperature in your house.

jensweimann commented 7 months ago

Personally on my setup the slider is controlled by home assistant automation, based on the delta between current temperature and target temperature. You can decide that way yourself what the appropriate power level is.

I came to the conclusion that its more economical to run the burner on minimal power for longer if possible.

nagyrobi commented 7 months ago

@jensweimann what's the percentage of your burner during this minimal period? (I use bbqees's hardware to query boiler parameters).

the delta between current temperature and target temperature

Is the automation you use the same as the one in this repo? I tested it, and find the power level calculated from the delta too small to heat up the house.

jensweimann commented 7 months ago

@jensweimann what's the percentage of your burner during this minimal period? (I use bbqees's hardware to query boiler parameters).

I don't know about this hardware. I just set the slider to 1% which results in the minimal voltage that my burner accepts for powering on (8V).

Is the automation you use the same as the one in this repo? I tested it, and find the power level calculated from the delta too small to heat up the house.

Yes. Well I guess the usage varies quite a bit for everyone so there is no right and wrong. We can only provide examples. Maybe you can also provide your solution with the PID Thermostat?

nagyrobi commented 7 months ago

Does your heater have a small glass window you can peek in to see the gas burning? Do yo see the flame sizes? How big are they at your minimum setting (maybe you can take a photo)? To compare with mine.

My heater is a Junkers Ceraclass Excellence ZSC 28-3 MFA E 23, and it seems that this unit has a wider control range than your suggested 8V-15V interval. I created a config now for the node so I can drag the slider and monitor more precisely the PWM value which generates the voltage which turns on the heating.

Originally, this heater was controlled by a simple on/off relay thermostat, connected to LR and Ls terminals of the board. I see everywhere, where they control it with either bus or 1/2/4 method that these terminals are shorted with a jumper - I have to investigate what happens when the voltage generated by smarttherm goes to 0 (as if it wouldn't be connected). Because if I disconnect it now, the heater turns on, as it thinks that the on/off thermostat at LR and Ls demands for heating.

jensweimann commented 7 months ago

Does your heater have a small glass window you can peek in to see the gas burning? Do yo see the flame sizes? How big are they at your minimum setting (maybe you can take a photo)? To compare with mine.

No window.. It's a ZWN 18-6

My heater is a Junkers Ceraclass Excellence ZSC 28-3 MFA E 23, and it seems that this unit has a wider control range than your suggested 8V-15V interval.

I would rather use the new digital control with HT3 with your unit: EMS-ESP Mine doesn't support the HT3 bus.

nagyrobi commented 7 months ago

I don't know about this hardware.

The EMS bus Wi-Fi Gateway is an ESP32-based device, which runs the EMS32-ESP firmware and connects to the Junkers bus terminals (B B). The firmware connects to MQTT and integrates with various other systems. Some heater configurations although the have the bus onboard, don't support changing certain values - you don't know that until you get the hardware and try it out. That's why I end up modulating by 1/2/4 connection and monitor data through the B/B bus connection. It spits out literally tens of parameters from the heater, like burner power percentage, etc.

nagyrobi commented 7 months ago

I would rather use the new digital control with HT3

Two thinks I don't like about EMS32-ESP:

For me, it's only good to monitor values from inside the system, no to control it.

nagyrobi commented 7 months ago

Maybe you can also provide your solution with the PID Thermostat?

The PID thermostat description is ESPHome docs site is pretty good. The only difficulty which can arise is to calibrate the system with autotune, which is hard to accomplish because a heating system is typically very slow (especially floor heating) and outdoor temperature variations can have higher influence on the results based on the heat retention capacity of the building (eg is it made of concrete, wood, how big windows are, is there thermal insulation on the walls etc).

Instead, I've just set up a simple generic ON/OFF (0/Max power) thermostat in HA without PID, and watched temperature oscillations throughout a a few days, maybe a week (chose a fixed setpoint) like this: temp variations

With this measurement, PID parameters can be calculated manually, I used the description presented here. Made an spreadsheet to ease the calculations: PID_calculator_spreadsheet.ods, you can start experimenting with the Kp, Ki, Kd values from there. For a heating system, usually the ziegler-nichols algorithm fits the best.

After implementing PID, you should see much fewer oscillations.

Since I've just implemented modulation for this heater with this smarttherm board, I'm still fine-tuning it and due to the aforementioned slowness, it's gonna take weeks to see final results.