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

@nayelyz

Could you check with a multipurpose sensor, which I think you have, if the temperature offset correction works correctly?

I see strange things when I have a negative correction set (-0.1).

it sends temperature events without temperature change, only when there is a temperature change +/- 0.1 °, in the default configuration it should send an event.

When the temperature offset is 0 ° it works fine.

A user @Catalin_S, even gets to have temperature events equal to the offset temperature.

That has not happened to me.

I can’t find information about where and how the default libraries are calculated.

these are the captures.

I tested sensor temp and humidity driver without the thermostat capability and the temperature offset is working normally.
What I did:
Removed all driver, installed only temp and humidity driver and rebooted the hub.
After that I set the offset temperature to -0.1C

No error in the last 24 hours

Well, if it works with a driver it should work well with the thermostat driver.
The capabilities handlers for temperature, humudity and atm pressure are identical in the two drivers.

Are you using the standard preference of temperature offset?

What reporting change is configured for this capability? I believe the preference offset only adds/subtracts from the value received, but it shouldn’t modify the set “reporting change” which indicates when the report must be sent (Eg. if the temperature changes 0.1º, 1º, etc.)

Which thermostat capability is @Catalin_S referring to? Please share both drivers’ URLs in Github so I can see their configuration.

Yes, uses the preference temperature offset standard.

The default temperature report configuration (30,300,16)

I think too, but it seems some change with the emit events.
I do known where is the librarie code for preference temperature offset.

link to temp and humidity driver:

https://github.com/Mariano-Github/Edge-Drivers-Beta/tree/main/zigbee-temp-humidity-sensor-v2

link to thermostat v2 driver, that use default Temperature capablity handler.
The version 2.2 is identical to temp humidity sensor v2 driver. Both version 2 and 2.2 have same issue for @Catalin_S.

https://github.com/Mariano-Github/Edge-Drivers-Beta/tree/main/Zigbee-thermostat-v2

(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.