Sinope Line Voltage Thermostats

You need to at least keep one miwi thermostats or one load controler in Neviweb and register it with Éco Sinopé.
If you can’t, then Imap email content component can be use to catch the email from Hydro Quebec and fire the boolean to trigger all automation. I’ll post my automation to catch Hydro email later. This is still better because you get the email sooner then the signal from Éco Sinopé But it is more complicated to setup.

Thanks Claude. Will look forward to your example.

Bonne soirée
Stéphane

Hi,
This is a long shot but you guys seem to know a lot about Sinopé in general :smile:

I have 5x TH1123ZB line thermostats and using latest zigbee2mqtt (i know, its not GT130 or ZHA but bare with me).

I’m not receiving the “Power” (watts) value. I did try using ZHA and all is fine (except that I can’t set outdoor temp value and for some reason the time set is 5h later (seems like its UTC)) maybe the ZHA integration uses voltage x current instead of reading power value ?

The reported firmware is 2051 and date : 20200330.

These are fairly new, I got them at the latest black friday sale. firmware date seems old (march 2020 and purchased in late november 2021). Could this be related ?

Lastly, if it IS a firmware revision problem, is there a way to do a OTA without buying the gateway ? (the would not justify the cost as i’m using a Zigbee 3.0 dongle with HA)

Thanks for any pointers and thanks @claudegel even though i’m not using your integration, your thread and ideas on Hydro management is inspiring :slight_smile:

Hi Rigor, Please see my firmware version… I am not aware how to update them (had them connected via a GT130 not that long ago so may be this is how they got updated).

I am using ZHA using a wifi Sonoff Zigbee gateway with Tasmota and all is working fine so far. I was also able to put in an automation (that I got from this thread - Thanks you!) that updates the outside temperature coming from the Environment Canada HA integration every time it changes and all is working fine so far. Time is displayed properly for me so I suspect it may be due to your HA configured timezone but not sure.

One of my 8 thermostats

image

My automation:

- alias: Heat - OutdoorTemp
  trigger:
    - platform: state
      entity_id: sensor.mont_tremblant_temperature
  variables:
    thermostats:
      - 50:0B:91:40:00:AA:AA:AA
      - 50:0B:91:40:00:BB:BB:BB
      - 50:0B:91:40:00: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 replace (and add/remove if necessary - one line per thermostat in the thermostats block) by your values for IEEE from what you see in HA.

Stephane

Hi Rigor, firmware are in fact updated automatically when connected to GT130 and Neviweb. There is no firmware that can be downloaded sorry. It would be useful for those who are connected to ZHA or like you zigbee2mqtt.

Now it is possible to send outdoor temperature to thermostats connected to ZHA. you just need to do an automation that will send it at least once per hour. If the thermostat do not receive temperature update inside the one hour period it will revert to room temperature. I can post an automation to do it if you want.

For those who want to test imap email content to catch Hydro Quebec peak notification email.
here is how it work.
First you need to make sure you have access to your email provider, gmail or other with imap protocole. Then you will setup two input boolean to toggle peak mode on/off in configuration.yaml:

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

The first one is to initiate morning peak automation and the second is for evening peak automation because sometime we will have only morning or only evening peak period. You will see how at the end.
Then create the sensor that will read the email to find out if there is a new peak period that is coming. Hydro Quebec send email in the afternoon the day before peak period.

sensor:
  - platform: imap_email_content
    server: my.mail.com
    port: 993
    username: !secret mail_username
    password: !secret mail_password
    folder: INBOX
    senders:
      - [email protected]

  - platform: template
    sensors:
      wintercredit6_9h:
        friendly_name: Crédit 6h_9h courriel reçu
        value_template: >
          {% if is_state('sensor.pi_phyto_qc_ca','unknown') %}      
          0
          {% elif 'de 6  h' in state_attr('sensor.pi_phyto_qc_ca','body') %}
          {{ (as_timestamp(strptime(state_attr('sensor.pi_phyto_qc_ca','date').split(', ')[1],'%d %b %Y %H:%M:%S %z'))| timestamp_custom('%j'))|int }}
          {% else %}
          0
          {% endif %} 

      wintercredit16_20h:
        friendly_name: Crédit 16h_20h courriel reçu
        value_template: >
          {% if is_state('sensor.pi_phyto_qc_ca','unknown') %}      
          0
          {% elif 'de 16  h' in state_attr('sensor.pi_phyto_qc_ca','body') %}
          {{ (as_timestamp(strptime(state_attr('sensor.pi_phyto_qc_ca','date').split(', ')[1],'%d %b %Y %H:%M:%S %z'))| timestamp_custom('%j'))|int }}
          {% else %}
          0
          {% endif %} 

      today_number:
        friendly_name: Numéro de la journée d'aujourd'hui dans l'année
        value_template: "{{ as_timestamp(now())| timestamp_custom('%j')|int }}"

Make sure that email come from this address [email protected] it could be different in your case.
For english email, change ‘de 6 h’ to ‘from 6 to’ and ‘de 16 h’ to ‘from 4 to’ in the above sensor
When Hydro send new email it will populate the two sensors with the day of month number if the period is present in the email.

  • sensor.wintercredit6_9h for morning period
  • sensor.wintercredit16_20h for evening period
  • sensor.today_number, use to check that the two above are for the good period.

if there is no email it will set these sensors to 0 except the sensor.today_number that will keep the day of month number.
Now you need some automation to toggle on/off the two boolean input created above.

###############################################
#    activate mode peak Hydro for tomorrow morning. We do it after 20:00 in case there was a peak today
###############################################
  - id: morning peak
    alias: morning peak
    initial_state: true
    trigger:
      platform: time
      at:
        - "20:40:00"
    condition:
      condition: template
      value_template: >
        {{ states('sensor.wintercredit6_9h') == states('sensor.today_number') }}
    action:
      service: input_boolean.turn_on
      entity_id: input_boolean.avis_hydro

###############################################
#    activate mode peak Hydro for tomorrow evening
###############################################
  - id: peak evening
    alias: peak evening
    initial_state: true
    trigger:
      platform: time
      at:
        - "20:45:00"
    condition:
      condition: template
      value_template: >
        {{ states('sensor.wintercredit16_20h') == states('sensor.today_number') }}
    action:
      service: input_boolean.turn_on
      entity_id: input_boolean.avis_hydro_soir

###############################################
#    activate mode peak Hydro for today evening. this one is run between morning and evening peak
###############################################
  - id: check evening peak
    alias: check evening peak
    initial_state: true
    trigger:
      platform: time
      at:
        - "13:00:00"
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: input_boolean.avis_hydro_soir
          state: 'on'
        - condition: state
          entity_id: input_boolean.avis_hydro
          state: 'off'
    action:
      service: input_boolean.turn_on
      entity_id: input_boolean.avis_hydro

###############################################
#    stop mode peak when there is no peak for the morning period
###############################################
  - id: stop morning peak
    alias: stop morning peak
    initial_state: true
    trigger:
      platform: time
      at:
        - "20:30:00"
    condition:
      condition: numeric_state
      entity_id: sensor.wintercredit6_9h
      below: 1
    action:
      service: input_boolean.turn_off
      entity_id: input_boolean.avis_hydro

###############################################
#    stop mode peak when there is no peak for the evening period
###############################################
  - id: stop evening peak
    alias: stop evening peak
    initial_state: true
    trigger:
      platform: time
      at:
        - "20:35:00"
    condition:
      condition: numeric_state
      entity_id: sensor.wintercredit16_20h
      below: 1
    action:
      service: input_boolean.turn_off
      entity_id: input_boolean.avis_hydro_soir

This will start an automation that will turn off many other automations that manage normal operation and turn on other automation for peak mode

###############################################
#    activate peak mode automation
###############################################
  - 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_matin_weekend
            - 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
            - automation.alume_lumiere_ext
...

you can add all your automations that you want to turn on or turm off. Then there is the reverse automation when peak is finish.

###############################################
#    stop peak mode automation
###############################################
  - id: pointe active off
    alias: pointe active off
    initial_state: true
    trigger:
      platform: state
      entity_id: input_boolean.avis_hydro
      to: 'off'
    action:
      - service: automation.turn_off
        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_on
        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_matin_weekend
            - 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
            - automation.alume_lumiere_ext
...

You can put anything you want to control on and off. On my side it work automatic. It can be improved but it give some idea to those who are starting with Hydro peak.

2 Likes

I’ve got a working quirk for the SP2600ZB/SP2610ZB that corrects the energy readout. @claudegel Let me know if you get a reply from Sinope.

I am working late tomorrow night, but will try and submit a PR on Sunday so it can be merged for the 2022.02 release.

Sinopé told me that as it work in Neviweb, it stay like that. I’ve told them that it would be better to have all device outputting the same unit of measure, kWh.

Anyone know if the Zigbee load controller has the same issue?

Don’t think it have the same problem. Didn’t reset the device since many years and it is connected to electric car charging station. Values look ok.
load

Wow! thank you Claude. Tried to start something with NodeRed but I did not get far. I don’t know enough yet. Need to tackle smaller and simpler automations first!

Merci
Stéphane

Merci Etienne,

Had created those 2. It converts the value ok but I can only select the first one in HA energy, not sure why . Thanks for the quirk (need to understand what that is). How long usually before a PR get approved and merged into a release and is there anything I need to do when it becomes available ?

Merci
Stéphane

Claude,
Going through it and implementing it… In your imap_email_content within the template portion, you make a reference to ‘sensor.pi_phyto_qc_ca’, where is this one coming from ? I don’t see it defined. Is it the entity_id of the email automation?
Merci
Stéphane

Ho yes sorry. This is the sensor created by imap email content. This is created based on email address you are monitoring with imap email content. It contain the complete email that imap email content found to match senders: [email protected]
Look in the dev tool you will see a big listing with all the email content from Hydro Quebec under the attribute column.
If you didn’t get an email because you just install it, you can add another email to watch like this

sensor:
  - platform: imap_email_content
    server: my.mail.com
    port: 993
    username: !secret mail_username
    password: !secret mail_password
    folder: INBOX
    senders:
      - [email protected]
      - [email protected]

Then if you have an old Hydro email just copy the content and send it to your email to generate another match. But I thing it is automatically created with a value None in state column.

2 Likes

A quirk modifies the behaviour of ZHA when a device does not follow the Zigbee Standard correctly. When the PR is merged and it makes the new release, upon startup ZHA will automatically apply the quirk and kWh will display correctly.

See how it went from over 3000 kWh to 3,4 after a restart with the updated quirk.

1 Like

Nice, did you make the PR ?

Nice! Can I apply it here locally without waiting for the update to come?

Merci

I’ve published today a release for neviweb130 same as neviweb custom_component to catch Éco Sinopé signal when there is a new peak period. In this case there is a signal for load controller but I didn’t find one for thermostats.
I’ll keep searching if there is a signal or just a temperature change for pre heat and peak.

1 Like

There is DR that flashes on the Thermostat when during the pre peak and the peak Hydro event itself… Do we know how to turn it on/off from ZHA ?

I’ve the same DR that flash on my miwi thermostat controled by Éco Sinopé but nothing on my floor zigbee thermostat. Both are managed by Éco Sinopé. If you want to have that DR on your ZHA thermostats we need to find the cluster/attribute for that.
I’m working on adding many custom cluster for both light and thermostats in ZHA quirks. I’ll see if I can catch this signal. Could have something to do with the parameter drStatus that is set to on for pre-heat and peak period.