Sinope Line Voltage Thermostats

Merci de la mise à jour! Pour moi, c’est revenu ce matin finalement! Merci à tous! :smile:

Hi Claude
Any updates on the modification in ZHA ?
for the outside temps and the consumption on the TH1124ZB ?

1 Like

Still working on that. With zigbee I cannot have a development server along with my production HA server because the zigbee devices cannot be connected to two zigbee gateway at the same time so it is a little more complicated as I don’t want to bust my setup when hydro peak period are comming. But I hope to have something soon

1 Like

I too have not been successful in having outdoor temp displayed on this termostat.

The outdoor_temp attribute is permanently valued at -32768 and nothing I have attempted to set has had any effect.

Outside temp does work with these if using zigbee2mqtt. That’s where I’ve had them for the last year or so, but once @claudegel get’s it figured out I’m hoping to bring them all “in house” to ZHA.

I received my Conbee II and started moving over my thermostats away from the GT30. The Sinope quirk has already been built for the thermostats, it just needs to be updated for the correct signatures. I have an updated quirk working locally for my TH1123ZB and TH1124ZB, and can display outside temp with a service call. I now just have to get it integrated into the quirks repo when I get a chance.

I can share the correct device signature if anyone wants to try it locally.

Share it. I will make a pull request to add it to ZHA

Any chance adding support for the Sinope Technologies TH1300ZB would work as well?

I should be able to get it done this weekend. Unless you think it will be merged faster if it comes from you as you’ve authored part of the quirk already?

Here’s the SimpleDescriptor captured in the logs.

2021-04-08 14:42:18 INFO (MainThread) [zigpy.endpoint] [0x1fc7:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=769, device_version=1, input_clusters=[0, 3, 4, 5, 513, 516, 1026, 1794, 2820, 2821, 65281], output_clusters=[10, 65281, 25])

Basically translates to the same as the TH1400ZB signature, so I added

class SinopeTH1123ZB(SinopeTechnologiesThermostat):
    """TH1123ZB thermostat."""

    signature = {
        # <SimpleDescriptor endpoint=1 profile=260 device_type=769 device_version=1
        # input_clusters=[0, 3, 4, 5, 513, 516, 1026, 1794, 2820, 2821, 65281]
        # output_clusters=[10, 25, 65281]>
        MODELS_INFO: [(SINOPE, "TH1123ZB"), (SINOPE, "TH1124ZB")],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha_p.PROFILE_ID,
                DEVICE_TYPE: zha_p.DeviceType.THERMOSTAT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,                               #0x0000
                    Identify.cluster_id,                            #0x0003
                    Groups.cluster_id,                              #0x0004
                    Scenes.cluster_id,                              #0x0005
                    Thermostat.cluster_id,                          #0x0201
                    UserInterface.cluster_id,                       #0x0204
                    TemperatureMeasurement.cluster_id,              #0x0402
                    Metering.cluster_id,                            #0x0702
                    ElectricalMeasurement.cluster_id,               #0x0B04
                    Diagnostic.cluster_id,                          #0x0B05
                    SINOPE_MANUFACTURER_CLUSTER_ID,                 #0xFF01
                ],
                OUTPUT_CLUSTERS: [
                    Time.cluster_id,                                #0x000A
                    Ota.cluster_id,                                 #0x0019
                    SINOPE_MANUFACTURER_CLUSTER_ID,                 #0xFF01
                ],
            }
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    UserInterface.cluster_id,
                    TemperatureMeasurement.cluster_id,
                    Metering.cluster_id,
                    ElectricalMeasurement.cluster_id,
                    Diagnostic.cluster_id,
                    SinopeTechnologiesThermostatCluster,
                    SinopeTechnologiesManufacturerCluster,
                ],
                OUTPUT_CLUSTERS: [
                    Time.cluster_id,
                    Ota.cluster_id,
                    SINOPE_MANUFACTURER_CLUSTER_ID,
                ],
            }
        }
    }

Just wondering if we should get rid or overwrite the original SinopeTechnologiesThermostat class? Does not match my thermostat’s signature for TH1123ZB or TH1124ZB, but whoever authored it must have had a reason for the 196 endpoint.

Signature for the TH1300ZB is already in the quirk, does ZHA not apply the quirk correctly? You can look up if any quirks are being used in the ZHA panel for your device.

If not try pairing your thermostat again and look for the SimpleDescriptor entry in your logs, we can build the correct signature off that.

Sorry I’m pretty new to HA and I’m not sure what you mean by “ZHA panel for your device” but if I open up the device configuration and click the “Zigbee Device Configuration” button I see:

{
  "node_descriptor": "NodeDescriptor(byte1=17, byte2=64, mac_capability_flags=142, manufacturer_code=4508, maximum_buffer_size=71, maximum_incoming_transfer_size=43, server_mask=10752, maximum_outgoing_transfer_size=43, descriptor_capability_field=0)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0301",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0201",
        "0x0204",
        "0x0402",
        "0x0702",
        "0x0b04",
        "0x0b05",
        "0xff01"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019",
        "0xff01"
      ]
    }
  },
  "manufacturer": "Sinope Technologies",
  "model": "TH1300ZB",
  "class": "zigpy.device.Device"
}

The log entry when pairing is

2021-04-09 20:33:27 INFO (MainThread) [zigpy.endpoint] [0x96e2:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=769, device_version=1, input_clusters=[0, 3, 4, 5, 513, 516, 1026, 1794, 2820, 2821, 65281], output_clusters=[10, 65281, 25])

Sent the pull request. Will let everyone know when it is merged.
It is my first PR so bear with me please.

I took a quick look at the quirks code for the TH1300ZB. Could it be not working because of a typo in the MODELS_INFO line (TH11300ZB)?

class SinopeTH1300ZB(SinopeTechnologiesThermostat):
    """TH1300ZB thermostat."""
    signature = {
        # <SimpleDescriptor endpoint=1 profile=260 device_type=769 device_version=1
        # input_clusters=[0, 3, 4, 5, 513, 516, 1026, 1794, 2820, 2821, 65281]
        # output_clusters=[10, 25, 65281]>
        MODELS_INFO: [(SINOPE, "TH11300ZB")],

I fixed this typo locally and it appears to work with the quirks being applied and I’m able to set the outdoor_temp attribute!

I created a pull request for the change: https://github.com/zigpy/zha-device-handlers/pull/840

Nice catch! That should do it.

I assume you found where the quirk is displayed, but here it is for others having issues.

Sorry guys this was my typo. TH11300ZB -> TH1300ZB
Too much wine that night when I’ve sent the PR :slight_smile:

Here’s the automation I’ve been using for displaying the outside temp.

- alias: Heat - OutdoorTemp
  trigger:
    - platform: state
      entity_id: sensor.temperature
  variables:
    thermostats:
      - AA:AA:AA:AA:AA:AA:AA:AA
      - BB:BB:BB:BB:BB:BB:BB:BB
      - CC:CC:CC:CC:CC:CC:CC:CC
  action:
    - repeat:
        count: "{{thermostats|length}}"
        sequence:
          - service: zha.set_zigbee_cluster_attribute
            data:
              ieee: "{{ thermostats[repeat.index-1] }}"
              endpoint_id: 1
              cluster_id: 0xff01
              cluster_type: in
              attribute: 0x0010
              value: "{{ ( trigger.to_state.state|float * 100 ) |int }}"

Just list all your ieee in the thermostats variable and it will update all thermostats every time the temperature for the trigger changes. I’ve been using it with environment Canada for 10 thermostats and it’s been rock solid.

5 Likes

@EtienneMD in your PR please change line 234
MODELS_INFO: [(SINOPE, "TH1123ZB"), (SINOPE, "TH1124ZB")],
to
MODELS_INFO: [(SINOPE, "TH1123ZB"), (SINOPE, "TH1124ZB"), (SINOPE, "TH1500ZB")],
This one behave the same as the first two.

Okay doing that now