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

Add more controls to Sinopé thermostats 2nd display and minor fix to SW2500ZB energy report #5724

Merged
merged 3 commits into from
May 7, 2023

Conversation

ericgu08
Copy link
Contributor

@ericgu08 ericgu08 commented May 6, 2023

Thermostat: TH1123ZB, TH1124ZB, TH1123ZB-G2, TH1124ZB-G2, TH11300ZB, TH1400ZB, TH1500ZB.
(Tested on TH1124ZB with older (2019) and latest firwmare)

  1. Add property second_display_mode for the thermostat Second display control, available with the latest thermostat firmware. There are 3 availables modes:

a) auto: The outdoor temperature (thermostat_outdoor_temperature) is displayed until considered expired by the thermostat. The display then revert to the set point value. The outdoor temp is considered expired when it has not been refreshed within outdoor_temperature_timeout.
b) setpoint: Display the set point value at all time.
c) outdoor temp: Same as auto, except the display blank when the outdoor temperature is expired.

  1. thermostat_outdoor_temperature is now exposed, along with second_display_mode and outdoor_temperature_timeout, converters were also added.

  2. Property enable_outdoor_temperature is deprecated. It was emulating the function by controlling the outdoor_temperature_timout. Newer firmware should use the second_display_mode and older firmware without Second Display mode support should control the timeout directly instead.

Light Switch: SW2500ZB

  1. Extended the timer_seconds range to 65536, as allowed by the light switch. Added a preset named Disabled with the value 0.
  2. Added the value 0 to the connected_load range. Starting at 1 was a typo.
  3. Added reporting.readMeteringMultiplierDivisor(endpoint) required for the energy summation (currentSummDelivered()) to report a value.

@ericgu08 ericgu08 marked this pull request as ready for review May 6, 2023 03:28
@@ -987,7 +1085,7 @@ module.exports = [
},
},
{
zigbeeModel: ['SW2500ZB'],
zigbeeModel: ['SW2500ZA'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change, this will make the SW2500ZB unsupported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Koen, sorry and thanks for catching that. I had no intention to rename the zigbeeModel. I use those locally as this is the only way I found to test my modifications. I have to use a different name in the external converter (and in database.db) than the one in the official load. Thanks!

@@ -564,16 +609,17 @@ module.exports = [
},
},
{
zigbeeModel: ['TH1124ZB'],
zigbeeModel: ['TH1124ZA'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Koenkk
Copy link
Owner

Koenkk commented May 7, 2023

Thanks!

@Koenkk Koenkk merged commit 284dc7c into Koenkk:master May 7, 2023
1 check passed
@onixx
Copy link
Contributor

onixx commented Feb 3, 2024

@ericgu08 have you had luck getting energy reporting on a DM2500ZB ? All mine do not report energy.

@ericgu08
Copy link
Contributor Author

ericgu08 commented Feb 4, 2024

@ericgu08 have you had luck getting energy reporting on a DM2500ZB ? All mine do not report energy.

Hello @onixx, I don't own a DM2500ZB. I'm 90% sure the same modification could be applied to the DM2500ZB, but since I had not way to test, I preferred leave it unmodified, and be sure no issue was introduce.

In the file sinope.ts, in definitions for DM2500ZB, for the fromZigbee, you have to replace fz.electrical_measurement with fz.metering.

in exposes: add:

            exposes.numeric('connected_load', ea.ALL)
                .withUnit('W').withValueMin(0).withValueMax(1800)
                .withDescription('Load connected in watt'),
            e.energy(),

In configure, for const binds, add seMetering

and add:

            try {
                await reporting.currentSummDelivered(endpoint, {min: 10, max: 300, change: [0, 10]});
            } catch (error) {/* Do nothing*/}

@onixx
Copy link
Contributor

onixx commented Feb 4, 2024

Thx, for the info @ericgu08 there might be a firmware or revision limitation as I am not getting data on my SW2500ZB either here. I will need to try to hook them up to the original hub to see if any updates can be done. Have you noticed this feature appearing after an update ?
This is what I have on the SW2500ZB
Read result of 'genBasic': {"swBuildId":"539\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}

@ericgu08
Copy link
Contributor Author

ericgu08 commented Feb 4, 2024

I think we have the same Firmware version. I do see 539 under MQTT device info or in Z2M frontend, which correspond to 1.3.2 in Neviweb. Did you set a value other than 0 for the Connected load? The switch doesn't automatically detect the load, like in some other devices (thermostat). If I set it to the max (1800W) and turn on the switch, after few seconds, I can see the Energy value increasing. I just installed the latest Z2M release version and it is still working for me.

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

Successfully merging this pull request may close these issues.

None yet

3 participants