Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thermostat mode 'manual' missing as option #932

Closed
Peerke1 opened this issue Jan 27, 2023 · 25 comments
Closed

thermostat mode 'manual' missing as option #932

Peerke1 opened this issue Jan 27, 2023 · 25 comments
Labels
enhancement New feature or request
Milestone

Comments

@Peerke1
Copy link

Peerke1 commented Jan 27, 2023

Bug description
thermostat (hc1 in my case) is missing the 'manual' mode

Steps to reproduce
put thermostat in manual mode (on Moduline 400 - press hand icon)
Adjust the heat index (number.thermostat_hc1_selected_room_temperature) in HA
temperature is adjusted and heater starts
adjust temperature on thermostat
heating isn't affected, burner state remains the same
put thermostat in manual mode
adjust temperature once more as previous adjustment is not used
heating is now adjusted to new temperature
(heating either starts or stops depending on the room- and selected temp)

Expected behavior
thermostat should remain in manual mode and accept new temp setting from both HA and manual operation

image

Device information
{
"System Status": {
"version": "3.5.0b7",
"platform": "ESP32",
"uptime": "000+05:26:35.359",
"freemem": 118,
"free_app": 74,
"reset reason": "Software reset CPU / Software reset CPU"
},
"Network Status": {
"connection": "Ethernet",
"hostname": "ems-esp",
"MAC": "0C:B8:15:4A:EA:0F",
"IPv4 address": "*****",
"IPv4 gateway": "****",
"IPv4 nameserver": "208.67.222.222",
"phy type": 1,
"eth power": 16,
"eth phy addr": 1,
"eth clock mode": 0,
"static ip config": false,
"enable IPv6": false,
"low bandwidth": false,
"disable sleep": false,
"AP provision mode": "disconnected",
"AP security": "wpa2",
"AP ssid": "ems-esp"
},
"NTP Status": {
"network time": "disconnected",
"enabled": false,
"server": "time.google.com",
"tz label": "Europe/Amsterdam"
},
"OTA Status": {
"enabled": true,
"port": 8266
},
"MQTT Status": {
"MQTT status": "connected",
"MQTT publishes": 6446,
"MQTT queued": 0,
"MQTT publish fails": 0,
"MQTT connects": 1,
"enabled": true,
"client_id": "ems-esp",
"keep alive": 60,
"clean session": false,
"base": "ems-esp",
"discovery prefix": "homeassistant",
"nested format": 1,
"ha enabled": true,
"mqtt qos": 0,
"mqtt retain": false,
"publish time boiler": 10,
"publish time thermostat": 10,
"publish time solar": 10,
"publish time mixer": 10,
"publish time other": 10,
"publish time sensor": 10,
"publish single": false,
"publish2command": false,
"send response": false
},
"Syslog Status": {
"enabled": false
},
"Sensor Status": {
"temperature sensors": 0,
"temperature sensor reads": 0,
"temperature sensor fails": 0,
"analog sensors": 0,
"analog sensor reads": 0,
"analog sensor fails": 0
},
"API Status": {
"API calls": 0,
"API fails": 0
},
"Bus Status": {
"bus status": "connected, tx issues - try a different Tx Mode",
"bus protocol": "Buderus",
"bus telegrams received (rx)": 15405,
"bus reads (tx)": 3031,
"bus writes (tx)": 0,
"bus incomplete telegrams": 0,
"bus reads failed": 559,
"bus writes failed": 0,
"bus rx line quality": 100,
"bus tx line quality": 85
},
"Settings": {
"board profile": "E32",
"locale": "en",
"tx mode": 1,
"ems bus id": 11,
"shower timer": false,
"shower alert": false,
"rx gpio": 5,
"tx gpio": 17,
"dallas gpio": 4,
"pbutton gpio": 33,
"led gpio": 2,
"hide led": false,
"notoken api": false,
"readonly mode": false,
"fahrenheit": false,
"dallas parasite": false,
"bool format": 1,
"bool dashboard": 1,
"enum format": 1,
"analog enabled": true,
"telnet enabled": true
},
"Devices": [
{
"type": "Boiler",
"name": "GBx72/Trendline/Cerapur/Greenstar Si/27i",
"device id": "0x08",
"product id": 123,
"version": "06.07",
"entities": 67,
"handlers received": "0x10 0x15 0x1C 0x18 0x19 0x34 0x2A",
"handlers fetched": "0x16 0x33 0x26",
"handlers pending": "0xBF 0x11 0xC2 0x14 0x1A 0x35 0xD1 0xE3 0xE4 0xE5 0xE6 0xE9 0xEA"
},
{
"type": "Thermostat",
"name": "Moduline 400",
"device id": "0x10",
"product id": 78,
"version": "03.07",
"entities": 32,
"handlers received": "0xA3 0x06 0xA2",
"handlers fetched": "0x41 0xA7 0x40 0x3F 0x3A",
"handlers pending": "0x12 0x13 0x38 0x39",
"handlers ignored": "0x1A 0x35"
},
{
"type": "Controller",
"name": "BC10",
"device id": "0x09",
"product id": 190,
"version": "01.04",
"entities": 0
}
]
}

Additional context
Add any other context about the problem here.

@Peerke1 Peerke1 added the bug Something isn't working label Jan 27, 2023
@proddy
Copy link
Contributor

proddy commented Jan 27, 2023

that's true, we don't have a "Manual" option for any of the thermostats other than the RC100, RC300, RC310. Not sure why. @MichaelDvP ?

@proddy proddy added enhancement New feature or request and removed bug Something isn't working labels Jan 27, 2023
@MichaelDvP
Copy link
Contributor

I think because most of the thermostats dont have a manual mode.
Most of the work on Moduline 400 was done by @kwertie01 in #449 and #467. Maybe he knows which modes this thermostat have and can test for the settings.

@Peerke1
Copy link
Author

Peerke1 commented Jan 28, 2023

I will also take a look at mentioned issues to see if I can figure something out.

@MichaelDvP
Copy link
Contributor

You can use terminal, watch 10 for the thermostat telegrams and set modes and temperatures that are not working.
Please write which modes this thermostat have, what you have switched and what temperatures you have set to identify the telegrams.
Switching mode should be somewhere in0xA7, temperature setting somewhere in 0x40

@Peerke1
Copy link
Author

Peerke1 commented Jan 28, 2023

Did some tests, will look in more detail later today. Just wanted to share the logfile.
I added '# explanation' when I did an action and after the action added the result (also with a #)

Did see this error message when pressing the hand icon:
001+04:32:47.745 N 155: [emsesp] Thermostat(0x10) -W-> Boiler(0x08), UBAFlags(0x35), data: 11 00
001+04:32:47.745 D 156: [emsesp] No telegram type handler found for ID 0x35 (src 0x10)

thermostatLog.log

MichaelDvP added a commit to MichaelDvP/EMS-ESP32 that referenced this issue Jan 28, 2023
@MichaelDvP
Copy link
Contributor

With log debug it's very nasty to search only the watch output.
Seems there is a manual temperature set in A7, offset 29 when pressing the manual button, same time offset 28 get's cleared.
I've added manualtemp and tempautotemp to the dashboard, setting manualtemp should switch to manual mode, setting tempautotemp switches back. seltemp chnages the temperature of the current mode.

Try https://github.com/MichaelDvP/EMS-ESP32/releases/tag/latest

Seems the mode filed is not affected, so we can't add it to mode setting.

@Peerke1
Copy link
Author

Peerke1 commented Jan 28, 2023

Thanks for the quick addition
I had the log level set to warning and also tried the other levels. Seemed that only the UI took the setting.
What is the command to set the log level on the terminal?

I will give the latest version a try and let you know,.

@Peerke1
Copy link
Author

Peerke1 commented Jan 28, 2023

Works as expected.

Takes around 10 - 20 seconds before both values (manualtemp and selected room temp) are equal. Just something to pay attention to when testing.

Do you want/need more logs when pressing buttons doing actions on the Moduline 400?

@MichaelDvP
Copy link
Contributor

I'm thinking how to use the mode command for night/day/auto/manual.
How do you go back from manual mode to normal? is there also a button?
Pressing the manual button only writes tempautotemp 0, seems the manual temp is than set automatically. maybe setting maunaltemp to zero switches back?
Could you check?

  • watch 10 and press manual button on thermostat, press (other?) button to go back.
  • in normal mode set in emsesp tempautotemp to 0 and check if it switches to manual, what setpoint?
  • in manual mode set manualtemp in emsesp to zero and check mode and setpoint.

The seltemp is taken from the reporting telegram from thermostat, show what is really reported. This telegram is send every 10 sec, and thermostat also needs some time to set the new value and report it. This monitor telegram 0x41 is not readable, in the log it is always , so we have to wait until the thermostat send it. I think we should change the readback to the setting telegram.

@Peerke1
Copy link
Author

Peerke1 commented Jan 28, 2023

How do you go back from manual mode to normal? is there also a button?
There are 2 buttons for that, a 'auto' and a 'manual' button
When pressing the thermostat goes into 'auto - clock mode' or 'manual'
clock mode uses the T1-T4
image

The tempautotemp is shown as temperature (oC), its always 0 (as far as I can see)

watch 10 and press manual button on thermostat, press (other?) button to go back.
see log, # comment is added (looks like the debug is off now)

in normal mode set in emsesp tempautotemp to 0 and check if it switches to manual, what setpoint?
its always 0, did it any way. result also logged
image

in manual mode set manualtemp in emsesp to zero and check mode and setpoint.
was at 16, command send, value remains at 16 and on thermostat the its also 16

thanks for explaining the telegram routine

thermostatLog_35d16.log

@Peerke1
Copy link
Author

Peerke1 commented Jan 28, 2023

image

@MichaelDvP
Copy link
Contributor

Yes, tempautotemp is in normal operation always zero, only if you are in automode and change the temperature it is set to this value and is cleared at next scheduled change.

But i want to know how we can change the mode from ems-esp.
Check from manual mode to automode:

  • make sure the thermostat is in manual mode
  • select mode from dashboard and press send. Is the thermostat set to automode?
  • if not, try set manualtemp to zero. Is the thermostat nw set to automode?

Same in the other direction:

  • make sure the thermostat is not in manual mode
  • Set tempautotemp to zero, press save, regardless if is zero before. Is the thermostat set to manualmode? What is set as manualtemp?
  • if not, try set manualtemp to nonzero value. Is the thermostat now set to manualmode?

@proddy
Copy link
Contributor

proddy commented Jan 29, 2023

I'll do the same test too on my RC20 which also has the manual mode

@MichaelDvP
Copy link
Contributor

ll do the same test too on my RC20 which also has the manual mode

Thanks for the hint, RC20 with setting 0xA8 have modes off/manual/auto and mostly the same structure as RC30 with 0xA7. I think the modes (night/day/auto) for RC30 are wrong, this should also be off/manual/auto. When pressing the manual button the mode switches to 1. There is no need for this crude logic checking the temperature fields, only the mode enum needs to be adapted. Seltemp for RC20 shoud work with manual an auto.
We have also RC20_N with setting 0xAD, but i don't think it has a manual mode.

MichaelDvP added a commit to MichaelDvP/EMS-ESP32 that referenced this issue Jan 30, 2023
@MichaelDvP
Copy link
Contributor

Seems the RC20/RC20_N modes are a little bit mixed for reading and setting. I've tried to clean up, but i'm not sure which modes these thermostats really have. In https://github.com/MichaelDvP/EMS-ESP32/releases i have now set RC20/RC30 to modes off/manual/auto and RC20N/RC25/RC30N/RC35 to night/day/auto reading and setting should be in sync now for these thermostats.
@Peerke1 @proddy please check with the new build.

@Peerke1
Copy link
Author

Peerke1 commented Jan 30, 2023

Thanks for the adjustments. Looks better now. Thermostat has 3 buttons, auto, manual, off (and a fourth to show info in the display)

I did some tests (if not mentioned the operation was done from ems-esp);
thermostat was in manual mode when I started the tests;

send hc1 mode == auto
ems-esp changed back to manual, thermostat wasn't changed to auto
set it to off
off is accepted on the thermostat
now setting it back to manual in ems-esp
thermostat followed and is back in manual mode

pressing the auto button on the thermostat
ems-esp adopted to auto mode
setting it back to manual from ems-esp
manual accepted by thermostat

final test to set it to auto from ems-esp
thermostat accepted the auto state

thermostatLog_35d16r2.log

Attached the full log, don't know yet why it didn't go in to auto mode on the first attempt

@MichaelDvP
Copy link
Contributor

Thx, have you checked the seltemp command in manual and auto mode?

@Peerke1
Copy link
Author

Peerke1 commented Jan 30, 2023

@MichaelDvP , i forgot to do a deep test with that. I did notice the adaptation of the temperature to what would be expected.

deep test is now also done, see logfile
thermostatLog_35d16-seltemp.log

test sequence
hc1 mode: manual
set seltemp from 16 -> 12 (result ok)
seltemp changed to T3 value (20)
adjust seltemp to 18 (result ok)
manual set it to 17 on thermostat (result ok)
set hc1 mode to manual - seltemp should revert to 12 (result ok)
set seltemp to 16 (result ok)

from what I see all works as it should (same behavior as when its set directly on the thermostat itself)

@kwertie01
Copy link
Contributor

I was not able to react this weekend so I'm a little late with my reaction. Sorry for that.
I do agree with @Peerke1 that indeed the Moduline 400 has the modes off/manual/auto. The day/night/auto modes were working for me (using Home Automation) but not optimal so having the off/manual/auto modes would be much better.
Changing the mode is done in telegram A7 offset 23

Tested using:
call system send "0B 10 A7 17 00"     (OFF)
call system send "0B 10 A7 17 01"     (Manual)
call system send "0B 10 A7 17 02"     (Auto)

When it is in Off mode. the used temperature will come from telegram A7 offset 24.
When it is in Manual mode. the used temperature will come from telegram A7 offset 29.
When it is in Auto mode. the used temperature will depends on the schedule and the temperatures T1-T4. set in Telegram 40.
This temperature from the schedule can be overridden by telegram A7 offset 28. (or the dial on the thermostat)
Pressing the Auto button will bring the thermostat back to the temp from the schedule and set telegram A7 offset 28 to 00. Also when the next switch point is there in the schedule this telegram A7 offset 28 is set to 00.

I'm running version 3.4.4 from a few months ago and got an error uploading your dev version. So I probably missed some important prerequisites? I will have a look at that and see if I can test your version also.

@proddy
Copy link
Contributor

proddy commented Jan 30, 2023

I tested your build @MichaelDvP in my RC20 and it works fine, all configurations (manually on the thermostat and via EMS-ESP). On a few occasions using the thermostat the command didn't come through (incomplete telegram warning) but most times it worked first time.

@MichaelDvP
Copy link
Contributor

@kwertie01 Thanks, i'll add for seltemp the offset24 in mode:off.
The uploading error is known, a to small partition to hold the new build (see #629 and others issues). You have to flash once with USB. We have made a flasher for this: https://github.com/emsesp/EMS-ESP-Flasher/releases/tag/v1.0.0

@MichaelDvP
Copy link
Contributor

I've updated to dev-17 with changelog: Off-mode and temperature set by seltemp. Also cleaned up a bit and moved the set_temp functions to inline (saves ~0,5k flash). Made a PR.

@kwertie01
Copy link
Contributor

Thank you @MichaelDvP for the information about the partition change.
I flashed your latest dev-17 build today on my ESP32 and did some tests. After modifying my Home Assistant configuration to use off/manual/auto instead of night/day/auto everything is working fine again. Changing de modes and temperature in each mode is working fine for me.
I do see one difference in behavior between the real thermostat: If you are in auto mode and override the temperature (set in offset 28), if you press the auto button again it will revert back to the Tx temperature of the schedule (by setting offset 28 to 00)
Selecting auto again from HA or from the EMS-ESP will send 02 to offset 23 and not send 00 to the offset 28.
Option for now to reset back to the scheduled auto temperature is to change the mode first to manual or off and then back to auto.

@MichaelDvP
Copy link
Contributor

You can just set seltemp to 0, this sends to offset 28 if in auto mode.

proddy added a commit that referenced this issue Feb 4, 2023
Entitiy blacklist (remove from mem, #891) and RC20/30 modes/seltemps #932
@MichaelDvP
Copy link
Contributor

I think this is solved and merged in the official release, closing. Please reopen if there is anything missing.

@proddy proddy added this to the v3.5.0 milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants