-
Notifications
You must be signed in to change notification settings - Fork 503
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
DDF for Sonoff TRVZB Thermostat #7357
Conversation
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.
Hi there,
I'm afraid, the DDF requires some significant changes to be considered. The suggested file would be barely functional.
{ | ||
"name": "attr/uniqueid" | ||
}, | ||
{ |
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.
The battery reading and checkin is missing:
{
"name": "config/battery",
"awake": true,
"parse": {
"at": "0x0021",
"cl": "0x0001",
"ep": 1,
"eval": "Item.val = Attr.val / 2;",
"fn": "zcl:attr"
},
"read": {
"fn": "none"
}
},
{
"name": "config/checkin",
},
devices/sonoff/trvzb-thermostat.json
Outdated
"name": "state/lastupdated" | ||
}, | ||
{ | ||
"name": "state/temperature" |
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.
The defaults for this item are tailored for temperature measurement sensors and hence, will not work here. Please replace it by the following:
"name": "state/temperature",
"refresh.interval": 3660,
"parse": {
"at": "0x0000",
"cl": "0x0201",
"ep": 1,
"eval": "Item.val = Attr.val;",
"fn": "zcl:attr"
},
"read": {
"at": "0x0000",
"cl": "0x0201",
"ep": 1,
"fn": "zcl:attr"
}
] | ||
} | ||
], | ||
"bindings": [ |
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.
The battery binding is missing:
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0001",
"report": [
{
"at": "0x0021",
"dt": "0x20",
"min": 3600,
"max": 43200,
"change": "0x00000002"
}
]
},
"min": 30, | ||
"max": 360, | ||
"change": "0x0000000A" | ||
} |
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.
Please add additional thermostat bindings
{
"at": "0x0012",
"dt": "0x29",
"min": 1,
"max": 3600,
"change": "0x00000001"
},
{
"at": "0x001C",
"dt": "0x30",
"min": 1,
"max": 3600
}
devices/sonoff/trvzb-thermostat.json
Outdated
"min": 30, | ||
"max": 360, | ||
"change": "0x0000000A" |
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.
Please change the values to:
"min": 60,
"max": 300,
"change": "0x00000064"
devices/sonoff/trvzb-thermostat.json
Outdated
{ | ||
"name": "state/on" | ||
}, |
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.
This item is not supported, so please remove.
devices/sonoff/trvzb-thermostat.json
Outdated
{ | ||
"name": "config/mode" | ||
}, |
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.
Please investigate which modes are supported by the device. The code below must be amended according to the findings:
{
"name": "config/mode",
"refresh.interval": 3660,
"read": {
"at": "0x001C",
"cl": "0x0201",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x001C",
"cl": "0x0201",
"ep": 1,
"eval": "if (Attr.val == 0) { Item.val = 'off' } else if (Attr.val == 1) { Item.val = 'auto' } else if (Attr.val == 4) { Item.val = 'heat' };",
"fn": "zcl:attr"
},
"write": {
"at": "0x001C",
"cl": "0x0201",
"dt": "0x10",
"ep": 1,
"eval": "if (Item.val == 'off') { 0 } else if (Item.val == 'auto') { 1 } else if (Item.val == 'heat') { 4 };",
"fn": "zcl:attr"
},
"default": "heat"
},
"0x0000", | ||
"0x0201" | ||
] | ||
}, |
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.
In order to make use of the config/mode
item, the following code must be added and contain the actually usable settings (see respetive item comment)
"meta": {
"values": {
"config/mode": {"off": 0, "auto": 1, "heat": 4}
}
},
devices/sonoff/trvzb-thermostat.json
Outdated
}, | ||
{ | ||
"name": "config/heatsetpoint", | ||
"default": 0 |
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.
Please remove the default value and add "refresh.interval": 3660
instead.
devices/sonoff/trvzb-thermostat.json
Outdated
{ | ||
"name": "config/offset", | ||
"default": 0 | ||
}, |
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.
Please replace by the code below:
{
"name": "config/offset",
"refresh.interval": 3660,
"read": {
"at": "0x0010",
"cl": "0x0201",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0010",
"cl": "0x0201",
"ep": 1,
"eval": "Item.val = Attr.val * 10;",
"fn": "zcl:attr"
},
"write": {
"at": "0x0010",
"cl": "0x0201",
"dt": "0x28",
"ep": 1,
"eval": "Item.val / 10;",
"fn": "zcl:attr"
},
"range": [-250, 250],
"default": 0
},
@fox34 are you still here ? |
I made the requested changes, however:
How would I do this? The device can be toggled between automatic and manual operation (and turned off, obviously). Automatic mode can (only?) be configured in the "official" SONOFF app, which I cannot use because I do not own the SONOFF gateway. |
Yes, it's fine, just check wich one mode you can use on it.
And they have too problem with the "auto" mode, it seem this device don't use zigbee classic request, and use instead a personnal one > Koenkk/zigbee-herdsman-converters#6443 And BTW, they have too found some others request on the special cluster, for exemple can try
for the lock/unlock |
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.
Looks ok for me wrt the requested changes, thanks!
So ready for merging? :) |
For me yes, have checked again ,all @SwoopX remark are resolved. |
When merging? |
As discussed in #7334. Thank you @Smanar!