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

Request to support another thermostat please #305

Closed
Uaeguy opened this issue Dec 10, 2022 · 16 comments
Closed

Request to support another thermostat please #305

Uaeguy opened this issue Dec 10, 2022 · 16 comments

Comments

@Uaeguy
Copy link

Uaeguy commented Dec 10, 2022

Hello, Thanks again for supporting these devices, I came with new Thermostat.

While trying to add the thermostat it shows as switch only.

The thermostat is from a company called etop controls here is a link of the product

The below is what I can read from the device:

{
  "result": {
    "active_time": 1656169660,
    "category": "wk",
    "category_name": "Thermostat",
    "create_time": 1655209889,
    "gateway_id": "",
    "icon": "smart/icon/ay1539244260287RY0l6/6d31665920be7e0ef95640f758785778.png",
    "id": "bf5eec7244d54b61b7jorb",
    "ip": "",
    "lat": "",
    "local_key": "",
    "lon": "",
    "model": "ETOP-CH7100",
    "name": "room",
    "online": true,
    "owner_id": "",
    "product_id": "evklbfoqwp4dygts",
    "product_name": "HP_Thermostat",
    "sub": false,
    "time_zone": "",
    "update_time": ,
    "uuid": ""
  },
  "success": true,
  "t": 1670674429927,
}

As for the DPS these what I have found out to be (I'm using tinytuya in a jupyter notebook and testing it):

 'dps':
 {
 '1': False, # switch (True, False)
 '2': 'cold', #mode (cold,hot,aux,auto)
 '3': 'idle', #operation information (cooling, heating, idle)
 '16': 20, #set temp in C (only on thermostat) do not use
 '17': 68, #set temp in F (only on thermostat) do not use 
 '23': 'c', #unit convert (c,f)
 '24': 26, #current temp in C
 '27': 0, #temp correction for (-3,-2,-1,0,1,2,3)
 '28': 'auto', # fan operation (on or auto)
 '29': 78, #current temp f
 '34': 49, #humidity %
 '40': False, #child lock (True, False)
 '45': 0, 
 '101': True,
 '102': False, #shedule on (True, False)
 '103': 0, #temporarily hold set time (in minutes)
 '104': 21, #set temp in app C (to be used in Home assistant) also max set tempretuter in auto mode DPS 2 (min:5, max:40,   scale:0,   step:1)
 '105': 20, #minimum set tempretuter C for auto mode DPS 2
 '106': 68, #set temp in app F (to be used in Home assistant) also max set tempretuter in auto mode DPS 2 (min:32, max:104, scale:0, step:1)
 '107': 64, #minimum set F tempretuter for auto mode DPS 2
 '111': 22, #keep tempretuter in C (for temporary hold)
 '112': 69, #keep tempretuter in F (for temporary hold)
 }
@make-all make-all added the new device Unsupported device label Dec 11, 2022
@make-all
Copy link
Owner

I think to fully support this, it will also need some scripting in the UI, to selectively display one of 3 temperature controls depending on whether the thermostat is in auto mode, and whether temporary hold is set.

make-all added a commit that referenced this issue Dec 11, 2022
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release and removed new device Unsupported device unreleased Will be in next release labels Dec 11, 2022
@Uaeguy
Copy link
Author

Uaeguy commented Dec 11, 2022

Thank you for the support, I have updated the integration, when I'm adding the thermostat it shows that garage opener

@make-all make-all added bug Something isn't working and removed awaiting confirmation Wating for confirmation the issue is solved labels Dec 11, 2022
@make-all
Copy link
Owner

Can you send the log message with the dps list. There may be some missing compared with the list above.

make-all added a commit that referenced this issue Dec 12, 2022
Original config copied the value rather than the id from issue #305
@make-all
Copy link
Owner

Nevermind, I found a transcription error in the config.

@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Dec 12, 2022
@Uaeguy
Copy link
Author

Uaeguy commented Dec 12, 2022

I have updated the integration from main branch, still it shows as garage opener here is the log

2022-12-12 21:42:33.023 DEBUG (SyncWorker_6) [custom_components.tuya_local.device] Simple garage door refreshed device state: {"dps": {"1": false, "2": "cold", "3": "idle", "16": 29, "17": 84, "23": "c", "24": 25, "28": "auto", "29": 77, "34": 50, "40": false, "45": 0, "101": true, "102": false, "103": 208, "104": 29, "105": 20, "106": 84, "107": 68, "111": 20, "112": 68}}
2022-12-12 21:42:33.024 DEBUG (SyncWorker_6) [custom_components.tuya_local.device] new cache state (including pending properties): {"updated_at": 1670866953.0238254, "1": false, "2": "cold", "3": "idle", "16": 29, "17": 84, "23": "c", "24": 25, "28": "auto", "29": 77, "34": 50, "40": false, "45": 0, "101": true, "102": false, "103": 208, "104": 29, "105": 20, "106": 84, "107": 68, "111": 20, "112": 68}
2022-12-12 21:42:33.027 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Simple garage door: Mapped dps 1 value from False to close
2022-12-12 21:42:33.027 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Simple garage door: Mapped dps 1 value from False to close

@make-all
Copy link
Owner

It seems dp 27 is missing, so the temperature correction needs to be removed from the config.

@Uaeguy
Copy link
Author

Uaeguy commented Dec 13, 2022

I have done as you said, I have commented the dp 27 and it is functioning as thermostat, I will confirm the rest once I return back to home. Thanks again :)

@Uaeguy
Copy link
Author

Uaeguy commented Dec 14, 2022

I have tested it, I can't set the temperature it needs to be DPS 104 for C and DPS 106 for F

Also I get warning in the logs

2022-12-14 21:04:44.006 WARNING (MainThread) [custom_components.tuya_local.generic.climate] Unrecognised HVAC Mode of cold ignored

as follows for ETOP thermostat

2022-12-14 21:04:44.001 DEBUG (SyncWorker_2) [custom_components.tuya_local.device] ETOP CH7100 thermostat refreshed device state: {"dps": {"1": false, "2": "cold", "3": "idle", "16": 22, "17": 71, "23": "c", "24": 24, "28": "auto", "29": 75, "34": 54, "40": false, "45": 0, "101": true, "102": false, "103": 208, "104": 22, "105": 20, "106": 71, "107": 68, "111": 20, "112": 68}}
2022-12-14 21:04:44.001 DEBUG (SyncWorker_2) [custom_components.tuya_local.device] new cache state (including pending properties): {"updated_at": 1671037484.0015512, "1": false, "2": "cold", "3": "idle", "16": 22, "17": 71, "23": "c", "24": 24, "28": "auto", "29": 75, "34": 54, "40": false, "45": 0, "101": true, "102": false, "103": 208, "104": 22, "105": 20, "106": 71, "107": 68, "111": 20, "112": 68}
2022-12-14 21:04:44.002 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] hvac_mode values: ['off', 'cool', 'heat', 'heat', 'heat_cool']
2022-12-14 21:04:44.002 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of temperature
2022-12-14 21:04:44.002 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.002 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of temperature
2022-12-14 21:04:44.002 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.002 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for step of temperature
2022-12-14 21:04:44.002 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for step of temperature
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] fan_mode values: ['Auto', 'On']
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] preset_mode values: ['Cool', 'Heat', 'Auxiliary Heat', 'Auto']
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 1 value from False to off
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 1 value from False to off
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 1 value from False to off
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 28 value from auto to Auto
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 3 value from idle to off
2022-12-14 21:04:44.003 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 3 value from idle to off
2022-12-14 21:04:44.004 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 2 value from cold to Cool
2022-12-14 21:04:44.004 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] hvac_mode values: ['off', 'heat_cool', 'off']
2022-12-14 21:04:44.004 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of temperature
2022-12-14 21:04:44.004 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.004 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of temperature
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for step of temperature
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for step of temperature
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 103 value from 208 to off
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 103 value from 208 to off
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 103 value from 208 to off
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.005 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.006 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] hvac_mode values: ['off', 'heat_cool']
2022-12-14 21:04:44.006 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of target_temp_low
2022-12-14 21:04:44.006 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.006 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of target_temp_high
2022-12-14 21:04:44.006 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.006 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for step of target_temp_high
2022-12-14 21:04:44.006 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for step of target_temp_high
2022-12-14 21:04:44.006 WARNING (MainThread) [custom_components.tuya_local.generic.climate] Unrecognised HVAC Mode of cold ignored
2022-12-14 21:04:44.045 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.046 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.046 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to C
2022-12-14 21:04:44.046 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Celsius', 'Fahrenheit']
2022-12-14 21:04:44.047 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to Celsius
2022-12-14 21:04:44.047 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to Celsius
2022-12-14 21:04:44.047 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['Celsius', 'Fahrenheit']
2022-12-14 21:04:44.047 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] ETOP CH7100 thermostat: Mapped dps 23 value from c to Celsius

Thanks

@make-all
Copy link
Owner

The log message was coming from the Auto thermostat when the mode was not auto. It should have mapped cold to off for that thermostat. The main thermostat has the temperature mapped to dp 104(c)/106(f), so should be working.

@Uaeguy
Copy link
Author

Uaeguy commented Dec 17, 2022

I have checked again with the new update still there is log

2022-12-17 11:43:22.842 WARNING (MainThread) [custom_components.tuya_local.generic.climate] Unrecognised HVAC Mode of hot ignored

Also I have discovered that if the thermostat is on cold mode it uses dps 104 for setting temp in C and 106 for setting temp in F, however in Hot mode it uses dps 105 to set temp in C and 107 to set temp in F

I'm not able to change the temp using dps 16 or dps 17

by the way, can you support a normal socket device?

make-all added a commit that referenced this issue Dec 18, 2022
In heat mode, different dps are used to control temperature than in cool mode.
Rather than create a fourth climate entity for this case, merging the Auto and
main climate entities allows all cases to be covered (albiet with redundant
second temperature setting in cool and heat modes).

May also fix the error message "Unrecognised HVAC Mode of hot ignored", which
I think may have been coming from the Auto thermostat not applying the default
mapping.

Issue #305
@make-all
Copy link
Owner

I have merged the Auto and main thermostats back into a single thermostat now to handle the different heat and cool dps.
This will show both settings always, but it is the cleanest way of supporting it I think, as adding a fourth control makes it more confusing, and the error message shows that most likely the auto thermostat is not working correctly anyway.

@make-all make-all removed bug Something isn't working unreleased Will be in next release labels Dec 22, 2022
@Uaeguy
Copy link
Author

Uaeguy commented Dec 22, 2022

for setting the temperature it will not register fast, sometimes it will revert to the previous set temp

@make-all
Copy link
Owner

Maybe you can try on 2023.1.1, where the device state feedback is much quicker.

But this may be a limitation of the dual temperature thermostat card in HA.

@Uaeguy
Copy link
Author

Uaeguy commented Jan 16, 2023

I have tried, the fan and presets registers very fast, however the temperature still lags

@make-all
Copy link
Owner

OK. I think I will close this, as the fan and presets show that the communication with the device is working fine. It is probably a limitation of that dual temperature UI component that it is slow to send commands due to waiting to see if you adjust the other temperature, or something.

@make-all make-all removed the awaiting confirmation Wating for confirmation the issue is solved label Jan 17, 2023
@make-all
Copy link
Owner

As for "sometimes it will revert to the previous set temp", while I was making the last changes, I did come across some code that was holding onto the sent values for up to 20 seconds, and there was a possibility that they would be resent by a future send command. That should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants