-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add converter for modern moes bht-006 thermostat #8005
Add converter for modern moes bht-006 thermostat #8005
Conversation
Is it reasonable to remake it in modern style? |
That will require quite some changes, it's fine if you add just the expose definition to the existing BHT-002-GCLZB |
there is different definitions. That's the issue. – different controls for deadzone and max temp (45-70 vs 0-45) – in current defined 3 points. 2 of them wrong for this thermostat 3-d is not using at all. I can try to make one definition but there will be spaghetti with a lot of if/elses |
@Koenkk |
src/lib/exposes.ts
Outdated
@@ -1134,6 +1134,14 @@ export const presets = { | |||
) | |||
.withValueMin(0) | |||
.withValueMax(35), | |||
max_temp: () => | |||
new Numeric('max_temp', access.STATE_SET) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max_temperature_limit
to be in sync with the min_temperature_limit
below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check lines 1127 and 1129
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update moes_thermostat_max_temperature_limit
instead? Use the correct datapoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is 18 but needed 19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Different points for most devices and this one
device?.manufacturerName === '_TZE204_aoclfnxz'
? e.max_temp().withValueMin(45).withValueMax(70)
: e.max_temperature_limit().withValueMax(45),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you can do an if/else
in moes_thermostat_max_temperature_limit
:
if (device?.manufacturerName === '_TZE204_aoclfnxz') {
// send to 19
} else {
// send to 18
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two layers of checking manufacturer name looks like layered spaghetty ))
But I'll look to it, ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok but then reasonable to do the same with deadzone
So will you merge it? Or do you need some other changes? |
This comment is still left; #8005 (comment) |
This should be reverted: #8063 (comment) |
Could you make a PR to revert it? Reverting through GH is not possible anymore because of conflicts. |
Ok I will But what should I do with my device then? |
Wonder if is it possible to check the fw version of Tuya devices in converters? |
I don't know but sure there definitely should be some differences. Moes/Tuya apps can recognise them somehow... |
Could you both post the data/database.db entries of your device? |
{
"id": 25,
"type": "Router",
"ieeeAddr": "0xa4c138f863cdfe54",
"nwkAddr": 16945,
"manufId": 4417,
"manufName": "_TZE204_aoclfnxz",
"powerSource": "Mains (single phase)",
"modelId": "TS0601",
"epList": [
1,
242
],
"endpoints": {
"1": {
"profId": 260,
"epId": 1,
"devId": 81,
"inClusterList": [
4,
5,
61184,
0
],
"outClusterList": [
25,
10
],
"clusters": {
"genBasic": {
"attributes": {
"65503": "�\u001f�.i�\u001f�.i�\u001f�.i�\u001f�.i�\u001f�.i�\u001f�.i�\u001f�.i�\u001f�.i",
"65506": 56,
"65508": 0,
"modelId": "TS0601",
"manufacturerName": "_TZE204_aoclfnxz",
"powerSource": 1,
"zclVersion": 3,
"appVersion": 74,
"stackVersion": 0,
"hwVersion": 1,
"dateCode": ""
}
}
},
"binds": [],
"configuredReportings": [],
"meta": {}
},
"242": {
"profId": 41440,
"epId": 242,
"devId": 97,
"inClusterList": [],
"outClusterList": [
33
],
"clusters": {},
"binds": [],
"configuredReportings": [],
"meta": {}
}
},
"appVersion": 74,
"stackVersion": 0,
"hwVersion": 1,
"dateCode": "",
"zclVersion": 3,
"interviewCompleted": true,
"meta": {},
"lastSeen": 1728133559440
} |
{
"id": 22,
"type": "Router",
"ieeeAddr": "0xa4c138baa855a68a",
"nwkAddr": 42956,
"manufId": 4417,
"manufName": "_TZE204_aoclfnxz",
"powerSource": "Mains (single phase)",
"modelId": "TS0601",
"epList": [
1,
242
],
"endpoints": {
"1": {
"profId": 260,
"epId": 1,
"devId": 81,
"inClusterList": [
4,
5,
61184,
0
],
"outClusterList": [
25,
10
],
"clusters": {
"genBasic": {
"attributes": {
"65503": "$ܓ.g",
"65506": 56,
"65508": 0,
"modelId": "TS0601",
"manufacturerName": "_TZE204_aoclfnxz",
"powerSource": 1,
"zclVersion": 3,
"appVersion": 74,
"stackVersion": 0,
"hwVersion": 1,
"dateCode": ""
}
}
},
"binds": [],
"configuredReportings": [],
"meta": {}
},
"242": {
"profId": 41440,
"epId": 242,
"devId": 97,
"inClusterList": [],
"outClusterList": [
33
],
"clusters": {},
"binds": [],
"configuredReportings": [],
"meta": {}
}
},
"appVersion": 74,
"stackVersion": 0,
"hwVersion": 1,
"dateCode": "",
"zclVersion": 3,
"interviewCompleted": true,
"meta": {},
"lastSeen": 1728133642460
} |
It looks like we need to look for differences in the data points, I think there is some value there indicating the revision of device. |
Fixed mapping issues described here
Introduced new one converter for this device (mostly copypaste from previous)
Koenkk/zigbee2mqtt#24001