-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
@H3buss Added measured temperature SET for CCTFR6700 #2558
Conversation
Requires 'report' capability merged into herdsman.
Used for deferred writes
Also forced local_temperature othewise Home assistant is not happy
converters/toZigbee.js
Outdated
if (systemMode === undefined) { | ||
systemMode = utils.getKey(legacy.thermostatSystemModes, value, value, Number); | ||
} | ||
globalStore.putValue(entity, 'systemMode', systemMode); |
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.
Is the only reason for this to buffer the commands until the device awakes?
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.
These attributes are read by the device, they cannot be written.
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.
What if we just send a readReponse here? (without the device requested for one). Does that also work?
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.
When the device is asleep, it doesn't acknowledge any frame.
Also, spamming readResponses to the device does not seem to work either, even when awake. The device seems to correlate the responses to its requests somehow (with sequence number maybe?)
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.
I've updated herdsman to allow read response to all attributes. Can you check if it works? (update to the latest dev branch first). After that:
- Remove the read response code from the
onEvent
handler - Replace
globalStore.putValue(entity, 'systemMode', systemMode);
withendpoint.saveClusterAttributeKeyValue('hvacThermostat', {systemMode: systemMode})
This has the benefit that these attributes are persisted when z2m is restarted.
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.
-
Do I still need the hacked firmware/modified startZnp of herdsman for this to work?
-
I'm not sure how to update herdsman to the latest dev version within my zigbee2mqtt npm environment.
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.
- Firmware yes, modified startZnp no
- Just follow https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html#bare-metal again
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.
Tested and it works, I've updated the code accordingly.
I still need to use globalStore for pending writes to keypad_lockout and for handling of schneider_ui_action where I need to know if screen is awake or not.
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.
I'm sorry to come back on that issue, but I installed my production environnement and the the thermostat no longer take the readResponses into account. I think I messed-up when I tested with the hacked firmware a while ago.
After some troubleshooting, the readResponses are sent from coordinator endpoint 3, and the sent attributes are correct, however the profile is incorrect: should be 0x0104 for Home Automation, and is 0x0105.
How can I set the profile for the read responses?
converters/fromZigbee.js
Outdated
type: ['attributeReport', 'readResponse'], | ||
convert: (model, msg, publish, options, meta) => { | ||
const temperature = parseFloat(msg.data['measuredValue']) / 100.0; | ||
const property = postfixWithEndpointName('temperature', msg, model); |
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.
Why do we have a temperature
when there is already a local_temperature
? (we also do not do this for other thermostats)
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 temperature appear as a sensor on home assistant, which helps automation. But I concur that this is not really needed: the temperature could be reported on local temperature only.
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 temperature can also be retrieved from the thermostat, it's better not to have duplicated data.
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.
I removed the temperature key and expose.
Temperature is exposed as local_temperature only
Did some small updates, can you check if everything is OK? Action should be in snake case now instead of camel case. If ok this can be merged. |
Tested, and it works. Will you also publish the modified firmware? |
Hello @H3buss Do you have any idea why energy is never reported by the CCTFR6700 ?
Also the documentation is mentioning a Sorry if I'm not using the right place to discuss about this but I'm not sure if i should open a new issue or not. |
I don't know why the device do not report the energy. I'm pretty sure I got it working at some point during my tests but now it doesn't for some reason. I tried to bind the attribute manually again, to no avail. The debug message you see are from haDiagnostic cluster and I don't see how they could be related to this issue. As all my devices are now used in my production environment, I cannot work on this without braking part on my home automation. Not great for the WAF ;). As for the reporting of ambiant temperature from a sensor, I agree that the documentation is unclear. The important missing part is the topic you need to publish the temperature to: |
Requires report capability from herdsman