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

Expand support for Aqara E1 Thermostat #2109

Closed
wants to merge 4 commits into from
Closed

Expand support for Aqara E1 Thermostat #2109

wants to merge 4 commits into from

Conversation

jymdman
Copy link

@jymdman jymdman commented Jan 16, 2023

This PR expands the support for Aqara E1 Thermostat.

Known issues:

  • Can't turn on/off device with standard thermostat control. (With cluster command you can.)
  • OTA update works, but reports wrong firmware version in UI as Aqara don't use standard way of reporting this. You need to issue a cluster command to start update.

@coveralls
Copy link

coveralls commented Jan 16, 2023

Pull Request Test Coverage Report for Build 3934025323

  • 23 of 79 (29.11%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 83.035%

Changes Missing Coverage Covered Lines Changed/Added Lines %
zhaquirks/xiaomi/aqara/thermostat_agl001.py 23 79 29.11%
Totals Coverage Status
Change from base Build 3930807394: -0.5%
Covered Lines: 6813
Relevant Lines: 8205

💛 - Coveralls

@codecov-commenter
Copy link

Codecov Report

Base: 83.55% // Head: 83.03% // Decreases project coverage by -0.51% ⚠️

Coverage data is based on head (e1b5ff5) compared to base (1891e3f).
Patch coverage: 29.11% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2109      +/-   ##
==========================================
- Coverage   83.55%   83.03%   -0.52%     
==========================================
  Files         252      252              
  Lines        8128     8205      +77     
==========================================
+ Hits         6791     6813      +22     
- Misses       1337     1392      +55     
Impacted Files Coverage Δ
zhaquirks/xiaomi/aqara/thermostat_agl001.py 40.40% <29.11%> (-41.42%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TheJulianJES
Copy link
Collaborator

What is the cluster command to turn on/off the thermostat?
We could either add an entity for that directly in HA Core (ZHA) or possibly just make a fake cluster in zha-quirks (so ZHA creates the entity).

@jymdman
Copy link
Author

jymdman commented Jan 18, 2023

On/off is system_mode (0x0271). 0 for off, 1 for on.

service: zha.set_zigbee_cluster_attribute
data:
ieee: 54:ef:44:10:00:57:b5:c6
endpoint_id: 1
cluster_type: in
cluster_id: 64704
attribute: 625
value: 0

@dmulcahey
Copy link
Collaborator

@puddly you have this device right? I thought it worked OOTB for standard functions?

@puddly
Copy link
Contributor

puddly commented Jan 23, 2023

Yeah, it shows up as a thermostat for me without a quirk. Perhaps there are multiple firmware revisions?

It reports its current temperature. Adjusting the setpoint in the frontend causes the plunger to move appropriately and for the display's temperature setting to change.

Mine is lumi.airrtc.agl001.

  • hw_version=1
  • date_code=Jun 7 2022
  • sw_build_id=0.0.0_0025
  • app_version=25

There is no OTA cluster.

@renaudallard
Copy link

It looks like this is working fine here. I haven't tested OTA though.

@Sirse
Copy link
Contributor

Sirse commented Feb 15, 2023

Working fine, but can't test OTA (already latest firmware).

@TheJulianJES
Copy link
Collaborator

TheJulianJES commented Feb 23, 2023

@puddly

There is no OTA cluster.

Looking at the quirk, it seems like the Aqara E1 thermostat has a "hidden" OTA cluster.

@TheJulianJES
Copy link
Collaborator

TheJulianJES commented Feb 25, 2023

I know this isn't great, but would you be willing to split the aqaraHeader, _float_to_hex, write_attributes, and "fake address" stuff into another PR? Those might need tests and are all a bit more complicated.

Splitting that off into another PR would keep this one relatively simple, so we can merge it (it would mostly just be the added custom Xiaomi attributes). If the attributes are properly present then, we can start creating sensors in ZHA (HA Core) for them.

@koehleru
Copy link

@TheJulianJES
i am also interested in progress of this integration. So i created a PR #2237 with the simple part.

@jymdman
Copy link
Author

jymdman commented Feb 28, 2023

Since I moved my system to z2m I really can't test any changes anymore.
But please use my code if useful for the implementation.

@TheJulianJES
Copy link
Collaborator

Alright, thanks.
I also bought a thermostat to test this.

@TheJulianJES
Copy link
Collaborator

@jymdman Ah, one last thing. Could you send a screenshot of how Z2M shows the thermostat in HA?
(I'm wondering about presets, window_detection, away_preset_temperature, and so on)

@jymdman
Copy link
Author

jymdman commented Feb 28, 2023

@TheJulianJES Sure! Attaching a screenshot...

e1

@github-actions
Copy link

github-actions bot commented Oct 8, 2023

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale Issue is inactivate and might get closed soon label Oct 8, 2023
@TheJulianJES TheJulianJES removed the stale Issue is inactivate and might get closed soon label Oct 8, 2023
@okainov
Copy link

okainov commented Oct 10, 2023

Any updates on this one? @TheJulianJES @jymdman ?

@jymdman jymdman closed this by deleting the head repository Nov 7, 2023
mb1248 pushed a commit to mb1248/zha-device-handlers that referenced this pull request Dec 5, 2023
mb1248 pushed a commit to mb1248/zha-device-handlers that referenced this pull request Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Adds new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants