Sinope Line Voltage Thermostats

To control your devices there are many ways to do it. I personnaly add some file in my automatiion folder where are all my automations. I have automations to control temperature during week days and other for weekend. I also have automations for temperature control in away mode. For Hydro I don’t use the Eco Sinopé because it is not enough agressive. I completely cut my heating after doing a pre-heating of one 45 minutes before the peak and revert to normal heating after the peak. I prefert to have a button on my main overview pannel that when clicked, deactivate many automations and activate other that are used during peak period. For example:

###############################################
#    activer mode pointe energie d'hydro Québec
###############################################
  - id: pointe active on
    alias: pointe active on
    initial_state: true
    trigger:
      platform: state
      entity_id: input_boolean.avis_hydro
      to: 'on'
    action:
      - service: automation.turn_on
        data:
          entity_id: 
            - automation.coupe_courant
            - automation.allume_courant
            - automation.pre_chauffe_thermo
            - automation.pre_chauffe_plainte
            - automation.pre_chauffe_plancher
            - automation.plainte_off
            - automation.thermo_off
            - automation.plainte_on
            - automation.thermo_on
            - automation.rechauffe_plancher
            - automation.stop_plancher
            - automation.plainte_nuit_on
            - automation.thermo_nuit_on
      - service: automation.turn_off
        data:
          entity_id:
            - automation.augmenter_chauffage_salon_le_matin
            - automation.baisser_chauffage_chambres_le_matin
            - automation.chauffe_cuisine_matin
            - automation.chauffe_cuisine_soir
            - automation.chauffe_cuisine_weekend
            - automation.chauffe_bain_matin
            - automation.chauffe_bain_soir
            - automation.chauffe_bain_matin_weekend
            - automation.chauffe_bain_soir_weekend
            - automation.chauffe_solarium_matin
            - automation.chauffe_solarium_soir
            - automation.chauffe_solarium_weekend
            - automation.gestion_lumiere_noel
            - automation.gestion_prise_ext_en_semaine
            - automation.gestion_prise_ext_fin_de_semaine_2
            - automation.arrive_claude
      - service: switch.turn_off
        data:
          entity_id:
            - switch.schedule_chauffe_bureau_weekend
            - switch.schedule_chauffe_bureau_semaine
            - switch.schedule_chauffe_salle_de_lavage
            - switch.schedule_chauffe_salle_a_diner
            - switch.schedule_chauffe_salon
            - switch.schedule_chauffe_chambre_1
            - switch.schedule_chauffage_visite
      - service: switch.turn_on
        data:
          entity_id:
            - switch.schedule_chauffage_salon_pointe
            - switch.schedule_chauffage_salle_a_diner_pointe
            - switch.schedule_chauffe_salle_de_lavage_pointe
            - switch.schedule_chauffe_chambre_1_pointe

I have created a input_boolean.avis_hydro in configuration.yaml

input_boolean:
  avis_hydro:
    name: Avis_hydro
    initial: off
    icon: mdi:signal-variant

Then created a button like this in my ui-lovelace.yaml:

          - type: "custom:button-card"
            color_type: card
            color: rgb(223, 255, 97)
            entity: input_boolean.avis_hydro
            icon: mdi:thermometer
            name: Hydro
            state:
              - value: "on"
                color: red
                icon: mdi:alert
                styles:
                  card:
                  - animation: blink 2s ease infinite
              - operator: default
                color: green
                icon: mdi:shield-check
            styles:
            card:
              - font-size: 12px
              - font-weight: bold

When I clic the button it switch all my automation from normal operation to peak period automation and when I click again it revert everything to normal. So when I receive the email from Hydro Quebec I wait after 8 pm and click my hydro button. Automations are taking care of everything for morning and night peak period. When it is finished I just clic the button again to revert to normal operation until next peak period.
My next step is to use IMAP Email Content component to catch email received from Hydro Quebec to do the switch automatically. I’ve changed my email at Hydro to send peak message to a specific adress that my raspberry pi is monitoring. I just need to finish setup of IMAP email content so it can catch if it is a morning or night peak period or both. Lot of fun

1 Like

Then it is just because your zha-device-handlers
is not correctly installed or configured. Mine is installed since long time so let me remember how to do it and I’ll tell you the way to go.

1 Like

Wow thank you Claude for this detailed answer. I like your setup and if I understand correctly, I could simply integrate all my thermostat directly into HA without going through the Sinopé hub. I could have a local control, while displaying my outside temperature ‘Feel Likes’.

I searched for schedules today and found the scheduler-component, do you use it when I see “switch.schedule_chauffe_bureau_weekend”?

I’m also curious to see examples of your automation. Do I understand correctly that you switch to On all your automation connected to Hydro?

  • automation.pre_chauffe_thermo = activated 45 min before the period
  • automation.plainte_off = start of period
  • automation.plainte_on = end of period for return to normal

And you deactivate the automations which could open thermostats during a peak period like “automation.arrive_claude”.

I see that you have automation for some item like “chauffeur_cuisine_” and schedules for others. What makes you use one or the other?

Yes when you see switch.schedule_chauffe_bureau_weekend it is from scheduler-component. There is a nice feature for heating shema where you can add as many period on a single bar to play with your heating


really easy

As for Hydro peak, yes when I click the button it switch all my normal automation to off and all my hydro peak automation to on in one shut. The example I’ve posted above just switch all my system to peak mode. Every line is a complete automation to control one or more devices and I use automation.turn_on and automation.turn_off service to make the switch.

here is an example of heating automation for the one who are new to HA

###########################
##       alumer plancher cuisine a 6:00 AM en semaine
###########################
  - alias: chauffe cuisine matin
    initial_state: true
    trigger:
      platform: time
      at: "06:00:00"
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: binary_sensor.workday_sensor
          state: 'on'
        - condition: or
          conditions:
          - condition: state
            entity_id: sensor.season
            state: 'winter'
          - condition: numeric_state
            entity_id: sensor.dark_sky_temperature
            below: 3.0  
    action:
      service: climate.set_temperature
      entity_id: climate.neviweb130_climate_plancher_cuisin
      data:
        temperature: 22

You can note that I’m using two condition to find out if it is time to heat or not. sensor.season to know if it is winter and sensor.dark_sky_temperature to start heating even if it is not winter. Winter start on Decembre 21 but Novenber can be cold so if outside temperature goes below 3, the automation start it work. If condition are not met, the automation just do nothing. On peak period I just stop that automation and start another one that manage the peak period for that thermostat.
Of course you can replace Dark_sky by an outdoor sensor to have more precise outdoor temperature to know when it is time to heat. My next step

At the beginning all my automation was via text automation but now I’m switching some of them to scheduler-component as it become more and more efficient and easy to manage. In some case I still need text automation because there are more possibility and fine tuning. But I think that gradually everything will be managed via component like scheduler-component. I already started to contribute to this component.

1 Like

You can send local outside temperature to miwi thermostats 2nd display with my sinope-gt125 custom_component. For zigbee thermostats you cannot use neviweb130 custom_component as Neviweb just send outside temperature to each zigbee and wifi thermostats.
For zigbee thermostats on zha you can use the follong automation:

#################################
###      envoyer la température extérieure aux thermostat zigbee. 
#################################
  - alias: Heat-OutdoorTemp
    trigger:
      - platform: state
        entity_id: sensor.dark_sky_temperature
    variables:
      thermostats:
        - 50:0b:91:40:00:02:26:6d
    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 }}"

Off course you can replace Dark_sky with a local temperature sensor. If you want feel like temperature you can get it from Dark_sky or do some calculation with your local sensor temperature et wind speed sensor.

1 Like

To get the latest zha-device-handler you just need to install ZHA from Configuration → devices and services. Click on the add buttton at the bottom and pick ZHA and install it.
In your configuration.yaml file you just add:

zha:
  database_path: zigbee.db

There are other parameters that you can add but you don’t need them:
enable_quirks boolean (Optional, default: true)
This is enabled by default so you don’t need it
custom_quirks_path string (Optional)
This one is if you want to use a development branch of ZHA to test new feature. If you add this it will override current ZHA on all HA update. The current 0.0.64 ZHA release already have the DM2500ZB quirk.
The quirk for the new DM2550ZB is on it’s way and should be added soon in dev branch then after in next ZHA release.

1 Like

EDIT:
Ok, I’m starting to get the hang of it.
Here’s what I did:

  • ZHA is already installed.
  • I added the database/path mentioned in my configuration.yaml file:

zha:
database_path: /config/zigbee.db
#custom_quirks_path: /config/custom_zha_quirks

  • Then I restarted my HA.
    *No success when pairing my DM2500ZB

So naturally, I’m thinking that I have no idea what I’m doing but here’s what I found:
Dimmer DM2500ZB
image

VS
Standard light SW2500ZB
image

So the quirks are definitely installed correctly, right?

could you post your zigbee device signature in ZHA for your DM2500ZB. Maybe Sinopé have changes the cluster for that devices. I’ve posted mine in previous post. I need to compare them for cluster number

Sure. I’ll give you 2 to compare. Sorry about the formatting.

Dimmer salon:

{
“node_descriptor”: “NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=1, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4508, maximum_buffer_size=71, maximum_incoming_transfer_size=43, server_mask=10752, maximum_outgoing_transfer_size=43, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)”,
“endpoints”: {
“1”: {
“profile_id”: 260,
“device_type”: “0x0104”,
“in_clusters”: [
“0x0000”,
“0x0002”,
“0x0003”,
“0x0004”,
“0x0005”,
“0x0006”,
“0x0008”,
“0x0702”,
“0x0b05”,
“0xff01”
],
“out_clusters”: [
“0x0003”,
“0x0004”,
“0x0019”
]
}
},
“manufacturer”: “unk_manufacturer”,
“model”: “unk_model”,
“class”: “zigpy.device.Device”
}

Dimmer cuisine:

{
“node_descriptor”: “NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=1, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4508, maximum_buffer_size=71, maximum_incoming_transfer_size=43, server_mask=10752, maximum_outgoing_transfer_size=43, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)”,
“endpoints”: {
“1”: {
“profile_id”: 260,
“device_type”: “0x0104”,
“in_clusters”: [
“0x0000”,
“0x0002”,
“0x0003”,
“0x0004”,
“0x0005”,
“0x0006”,
“0x0008”,
“0x0702”,
“0x0b05”,
“0xff01”
],
“out_clusters”: [
“0x0003”,
“0x0004”,
“0x0019”
]
}
},
“manufacturer”: “unk_manufacturer”,
“model”: “unk_model”,
“class”: “zigpy.device.Device”
}

The quirks normally just change device_type”: “0x0104 which is a dimmable switch
to device_type”: “0x0101 which is a dimmable light. Cluster are the same as what I have so we need to check the quirk version you have. I need to find out how to check it.
Are you o n the latest HA 2021.12.6 ?

I was on HA 2021.12.4, and I’ve just updated to 2021.12.6.
The problem is still there:

Here’s what I have in my custom quirks folder:
image

Am I missing anything?

what file do you have in your sinope dir. You should have init.py, light.py and thermostat.py
In light.py you should have a section class SinopeDM2500ZB(SinopeTechnologieslight): near line 93.
If you don’t have it that is the problem. your config/custom_zha_quirks may interfere with zha and the real quirks don’t load properly.

It is just a directory I created to organize the zha-device-handlers, I did not modify any of the quirks:
image

Line 93:

Its the wright file but I don’t understand why you need this custom_zha_quirks dir in config. All the quirks are installed with ZHA. If you have something elsewhere it could interfere with proper functioning of ZHA. Could you try to remove that dir and restart HA so ZHA will load with its own stuff?

Yep, just did. I removed the folder, restarted HA, removed a DM2500ZB from HA, tried pairing it again… No luck.

Starting to think that it’s the interview process that is not working. As I’ve said earlier, I always have to do two interviews for it to be added in HA. First interview always ends like this:
image

Then the device does not appears in HA, I have to unpair it, then pair it again. After that, the interview is instant, and I have an unk_manufacturer and unk_model:
image

I’m starting to run out of options :stuck_out_tongue:

what do you have under config/deps

Could you activate logging for zha and check what happen when you pair your dimmer. Normally zha will compare divices signature will all quirks and maybe we will get some more info why the devices is not matched with a quirk.

Good morning Claude!

Under /config/deps, I have nothing:
image

I enabled logger in configuration.yaml. Here’s what I got while pairing a device:

I don’t think there’s anything interesting in the initial lines. The interesting part is the ending:
No OTA image is available.

Then I unpair the device, because as stated above, the interview never ends. I then pair the device again, and there is plenty of error in the logs:

Is there any way to hard reset the dimmer? Other than holding it for 10 seconds?

Sinopé DM2550ZB dimmer is now supported in zha-device-handlers
It should appear in next HA release for ZHA

1 Like

No there is no other way to reset.
You’ve activated debug for zigpy. But you need to activate debug for ZHA
homeassistant.components.zha: debug
It’s ZHA that run the discorvery to register a device to a specific quirk. Normally when you pair a device the log should say all test done to try to pair that device to a specific quirk.