(EDGE Driver-Mc): Zigbee Temp Sensor and Child Thermostat Mc, Zigbee Temp Sensor with Thermostat Mc

(NEW RELEASE) Version 3.0 of Edge Driver Zigbee Temp Sensor and Thermostat Mc:

Improvements and bug fixes:

  1. Added Thermostat Lock function:
  • This function allows to maintain settings of Thermostat Mode, Temperature, Fan… until we unlock it manually or with an routine or scene and without having to cancel the daily schedule made with routines.
  • It is automatically activated when Off, manual or away modes are selected, so the programmed automations will not change the settings set.
  • If you want to make a temporary temperature change, it is not necessary to lock the thermostat, you just have to make the temperature change and it will be maintained until the next programmed period.
  • This function prevents the use of a virtual device to perform these functions.

  1. Added temperature presets for ECO Mode in preferences

  2. Added in preferences an option to choose the scale of steps for the adjustment of the temperature set points. The stock presentation of +/- 1º is not very precise, especially for ºC. Have to save energy!!

  • You can choose steps of +/- 0.5º (default) or +/- 0.1º

  • For the change of presentation to take effect, you have to close the app and clear the cache of the app on the Android phone.

  • The presentation to enter the temperature by typing the value does not work well, it is already reported to @nayelyz

  • With the +/-0.1º scale, in some values, a value with many decimal places is presented for 2 sec and then shows the correct value, with 1 decimal place. It is a problem of presentation too.

4.Added an information field, below the temperature set point, showing:

  • The device temperature unrounded (2 decimal places), which is used to calculate state changes.
  • The Next Expected State of the Thermostat and the temperature at which it will occur.
  • This can help to understand at what temperatures the state changes will be made with the different configurable options, Differential Temperature or Underfloor Heating.

As the update has new Custom Capabilities and preferences it is necessary to clear the cache of the app on the phone after the update. A hub reboot should not be necessary.

For this reason, the update is not performed automatically, it will be done by changing the driver on the device, driver menu, select another driver. You do not need unistall device and not lost routines , scenes or settings.

The thermostat will not control the Thermostat State until a new first event of the current temperature is received. You can force an event by heating the sensor a little with your hand.

To facilitate the update, I am going to change version 2.2 to the name Zigbee Temp Sensor and Thermostat Mc-(OLD).

I will publish the new version 3.0 with the original name Zigbee Temp Sensor and Thermostat Mc.

In this way, your driver installed will renamed with (OLD), indicating that there is a new version available and you can install the new version with a driver change whenever you want.

┌─────────────┬───────────────────────────────────────┐
│ Driver Id   │ 0998de7a-38b0-4728-8f9e-7b8c18d29ba1  │
│ Name        │ Zigbee Temp Sensor with Thermostat Mc │
│ Package Key │ Zigbee_Thermostat_v3.0                │
│ Version     │ 2021-11-29T11:06:43.751401            │
└─────────────┴───────────────────────────────────────┘
2 Likes

@Mariano_Colmenarejo I can`t access the drivers list on you channel.

Can you access other channels of other users?

I can not access any channel

I can’t access either. And I haven’t seen any info about this. What might be the reason why this is is happening.

You are right, i can’t access any channel.

1 Like

@Catalin_S, @Sakari, @milandjurovic71
The issue with the channel invitation is already solved:

1 Like

I niticed that sonoff SNZB-02 has an inconsistent report with Temperature driver. It’s a floor temperature with unchanged environment in the time frame. See the photo

Hello

I don’t understand exactly what goes wrong.
According to the photo it is working as the default report configuration says.

minimum interval = 30 sec
maximum interval = 300 sec
Reportable change = 0.1°

According to this it will send an event:

  • when there is a change in temperature equal to or greater than 0.1° always, regardless of the minimum or maximum time intervals.

  • When there is a temperature change < reportable change and a minimum time of 30sec has elapsed since the previous report and up to a maximum of 300 sec.

  • As with the default configuration, the reportable change is the maximum precision 0.1°, events can occur with the same minute.

  • As the temperature shown in the app is rounded to 1 decimal place, it may be that the device reports 23.06° and the app shows 23.1° and 5 minutes later it reports 23.04° and the app shows 23.0°

In the thermostat driver, the changes to send events to the app, I have filtered them to changes sent by the device > 0.06°C, to avoid unwanted changes of state.
The temperature sensor driver is not filtered
This sensor is the same of your sonoff SNZB-02

In the driver preferences you have some settings to modify the reporting intervals and reportable temperature.

I have some devices configurated to report every 1 Hour or temperature change >= 1°

And the sensor used for thermostat with default settings (30, 300, 0.1)

You can select settings as you need.

I don’t know if this answers your question

Any questions, tell me

Hello,
I think this could be the reason for such a quick change of the temperature. I will change the report interval and monitor it.

1 Like

In case anyone is interested:

How to make the temperature and humidity sensor driver show temperature and humidity on the sensor tile
It would also be valid to show other attributes such as battery …

Screenshot_20211227-195255

  • Create a custom capability with an attribute of type text
  • Create Capability presentation

Or you can use this capability

Capability: legendabsolute60149.infoPanel

  • Create a VID presentation and on the dasboard I remove the Temperature capabilty and put the Custom Capability. In the detailView I do not put it, so that the custom Capability does not appear in the details view.
{
    "mnmn": "SmartThingsCommunity",
    "vid": "bcef4bd6-e6c2-3753-ab47-80470a09b972",
    "version": "0.0.1",
    "type": "profile",
    "iconUrl": null,
    "dashboard": {
        "states": [
            {
                "component": "main",
                "capability": "legendabsolute60149.infoPanel",
                "version": 1,
                "idx": 0,
                "group": "main",
                "values": [],
                "composite": false
            }
        ],
        "actions": []
    },
    "detailView": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "relativeHumidityMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "battery",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "refresh",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "automation": {
        "conditions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "relativeHumidityMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            },
            {
                "component": "main",
                "capability": "battery",
                "version": 1,
                "values": [],
                "patch": [],
                "exclusion": []
            }
        ],
        "actions": []
    },
    "presentationId": "bcef4bd6-e6c2-3753-ab47-80470a09b972",
    "manufacturerName": "SmartThingsCommunity"
}

- Add the custom capability and VID in the profile.yml file:

name: temp-humid-battery
components:
- id: main
  capabilities:
  - id: temperatureMeasurement
    version: 1
  - id: relativeHumidityMeasurement
    version: 1
  - id: battery
    version: 1
  - id: refresh
    version: 1
  - id: firmwareUpdate
    version: 1
  - id: legendabsolute60149.infoPanel
    version: 1
  categories:
  - name: Thermostat
preferences:
  - preferenceId: tempOffset
    explicit: true  
  - preferenceId: humidityOffset
    explicit: true
metadata:
  deviceType: Thermostat	
  ocfDeviceType: oic.d.thermostat
  deviceTypeId: Thermostat
  mnmn: SmartThingsCommunity
  vid: bcef4bd6-e6c2-3753-ab47-80470a09b972

- Declare Custom Capability in init.lua

-- Custom Capability declaration
local info_Panel = capabilities ["legendabsolute60149.infoPanel"]
  • In the Temperature and Humidity Handler I add a code to give text value to the custom capability attribute and emit event when there is a change in temperature or humidity
--- temperature handler
local function temp_attr_handler(self, device, tempvalue, zb_rx)
  device:set_field("last_temp_value", tempvalue.value / 100, {persist = true})
  tempMeasurement_defaults.temp_attr_handler(self, device, tempvalue, zb_rx)

  -- emit tile info
  local temp = device:get_field("last_temp_value")
  local humid = device:get_field("last_humid_value")
  local text = string.format("%.1f",temp).."º".."C".." / "..humid.." % "

 device:emit_event(info_Panel.infoPanel(text))
end
---humidity_attr_handler
local function humidity_attr_handler(driver, device, value, zb_rx)
  device:set_field("last_humid_value", utils.round(value.value / 100.0), {persist = true})
  device:emit_event_for_endpoint(zb_rx.address_header.src_endpoint.value, capabilities.relativeHumidityMeasurement.humidity(utils.round(value.value / 100.0)))

  -- emit tile info
  local humid = device:get_field("last_humid_value")
  local temp = device:get_field("last_temp_value")
  local text = string.format("%.1f",temp).."º".."C".." / "..humid.." % "

  device:emit_event(info_Panel.infoPanel(text))
end

What if you need to see it in ºF you would have to write a code to convert it to ºF, since the automatic conversion will not be done

6 Likes

HI @Mariano_Colmenarejo
This is awesome , can you add the humidity to your driver ? I dont care about battery .
Thank you

This method has an added drawback, which can be annoying for some users.

  • An extra event is generated with the text of tile in the history each time a temperature or humidity event occurs.
  • It could be made as optional by changing the profile according to the user choice in preferences.
  • I’ve been looking at other better options, which should work but don’t work:
    Add more capabilities to the dashboard presentation and the tile should be enlarged to show the additional capabilities. The presentation VID is created without errors, but it does not show it.
    I reported it to @nayelyz, and agreed to talk to the engineers, because she remembered using it.

I will look at it, depending on what they answer me

Ok , thanks for the explanation.

Thanks for developing this driver. i successfully installed it to one of the SONOFF temp hum sensors . However If one more is added, it won’t give anything reading. The device is online but not working.

I don’t understand how that can be. It should be a pairing problem.
You can download the other driver, temperature sensor or thermostat and make a change of driver from one to the other. This will cause the setup to be done again.

I have had up to three devices running at the same time and they work fine.

Hey thanks for the reply. It works fine now. I deleted all of them added them again

1 Like

@Mariano_Colmenarejo

Using the driver, I noticed that there is a difference in battery information between what is shown on the sensor display and the ST app.

In the sensor display it shows the battery with 50% or less, in the driver it shows 100%. When I was with the DHT Smartsense temp/humidity sensor, it showed the battery correctly, but it was off line at least once a day,

I appreciate if you can see this question.

I tested it with its two drivers: zigbee temp humity sensor mc and zigbee temp sensor with thermostat mc, both with the same battery issue.

Below is the sensor data

Metrics
Last Hop LQI: 104
Last Hop RSSI: -74
Received Messages From Device: 425
Received Messages From Device (Duplicates): 6
Messages Transmitted to Device: 1242
Messages Transmitted to Device (Failures): 829
Updated Time: 2022-01-07 9:42 AM EDT
Date
zigbeeNodeType: SLEEPY_END_DEVICE
application: 43
endpointId: 01
manufacturer: _TZ2000_a476raq2
model: TS0201
Raw Description 01 0104 0302 00 04 0000 0001 0402 0405 01 0019

This driver uses for battery information the attribute 0x0021 battery percentage remaining.
It only shows with the default libraries the value sent by the device divided by 2.

The smartsense DTH uses the attribute 0x0020, battery voltage for all but those manufactured by smajim. If it matches this DTH, it is sending different battery data for each attribute. Which one is correct?

I would have to add the battery management by voltage. When i have time i will do

1 Like

(NEW RELEASE) New Version 2.5 of Edge Beta Driver: Zigbee Temp Humidity Sensor Mc:

Improvements:

  1. Added new profile with Temperature, RelativeHumidity, Atmospheric Pressure in (kPa & mBar) and Illuminance
  2. Added report interval settings in preferences for all capabilities
    Note: Not all devices accept configuration changes after pairing
  3. For some manufacturers added new subdriver to Battery voltage handler @Raimundo
  4. New devices added
  - id: "KMPCIL/sensor"
    deviceLabel: Environment Sensor
    manufacturer: KMPCIL
    model: RES001
    deviceProfileName: temp-humid-press-illumin
  - id: "KMPCIL/BME280"
    deviceLabel: Environment Sensor BME280
    manufacturer: KMPCIL
    model: RES001BME280
    deviceProfileName: temp-humid-press-illumin
  - id: "KMPCIL/RES005"
    deviceLabel: Environment Sensor RES005
    manufacturer: KMPCIL
    model: RES005
    deviceProfileName: temp-humid-press-illumin

As the new version has new Custom Capabilities, Profile and preferences, the update is not performed automatically, it will be done by changing the driver on the device, driver menu, select another driver.
To facilitate the update, I am going to change version 2.0 to the name Zigbee Temp Humidity Sensor Mc-(OLD).
I will publish the new version 2.5 with the original name Zigbee Temp Humidity Sensor Mc.
In this way, your driver installed will have the rename with (OLD), indicating that there is a new version available and you can install the new version with a driver change whenever you want.

1 Like

Hello, would add this device?

Data * zigbeeNodeType: ROUTER

  • firmwareManufacturerCode: 4919
  • application: 28
  • endpointId: 01
  • firmwareImageType: 0
  • manufacturer: ELKO
  • model: Super TR
    Raw Description 01 0104 0301 00 05 0000 0003 0004 0005 0201 02 0003 0019
    Firmware * Current Version: 0x40016550
  • Target Version: 0x40016550
  • Last Updated: N/A
  • Last Checked: 2021-10-05 2:35 PM CEST -