# Rule advice - Numeric comparisons

I want to build in a a safety trap for room Temperatures.

Each room has a zigbee (native or via Hue Hub) and a zwave temperature sensor.

BOTH are averaged by the the Thermostat Controller APP to determine a Temperature that drives Heat demand from the Thermostat Controller.

So for each room I have THREE temperature readings - a zigbee, a zwave and the average temp between them in the Thermostat Controller.

The Thermostat Controller is readable from the Device that the Thermostat Controller manages.

What I am looking for is a Full per Room

If the ZB* Temp OR the ZW* Temp is either Greater than TC* (+ or - X(x= variable) degrees) Then send Alert - "Room Temp Sensor Warning"

• ZB - Zigbee, ZQ - Zwave, TC - Thermostat Controller

Then repeat per managed zone/room.

Just not got any idea on how to put that into a Rule.

Any suggestions would be very helpful - thanks

So you have:

1. Zigbee Temp
2. Z-Wave Temp
3. Hardware Thermostat.

And you want to find if any of these three are different from either of the other two by more than +/- x degrees.

Is this correct?

Almost but not completely.

The Thermostat Controller is an HE built in App.

It reports the average of the two zone/room zigbee and zwave temp sensors.

The test is to detect if one of the two temp sensors is misbehaving by detecting if one of the temp sensors is x degrees above or below the average temp as recorded by the Thermostat Controller.

For example

Zigbee temp sensor reports 21c
Zwave temp sensor reports 23c

The Thermostat Controller would report 22c as the average temp in the zone/room.

If x=2c

The test would be if either the zigbee or zwave temp sensors report > or < 2c delta from the Thermostat Controller then report an error.

In this case

Zigbee = 22
Zwave = 17

Thermostat Controller average 19.5c which is greater than a 2c delta causing an alert to be sent.

This will trap rogue temp sensors.

What about zigbee temp - z-wave temp = x, if x > 2

Ie if you have a roge sensor the gap between the 2 sensors will be large. The thermostat control valve is irrelevant as it will always be in the middle

You have a good point why include the Thermostat Controller APP average Temp, I could just use

IF zigbee temp sensor - zwave temp sensor > 3
OR
If zwave temp sensor - zigbee temp sensor >3

Endif

And do that rule for each Zone/Room

I'll see if I can get one going

Thanks

Will check if this works

Actually identified an issue with just using the devices and not the Thermostat Controller app Temp.

Not all devices have a temp offset on them - this is circumvented by using the Thermostat Controller App offset option.

Checking against just the actual devices may cause an issue, I need to spend more time on it.

This is all part of using one HE for managing hot water and central heating zones/rooms and using another HE to provide oversight and validity checking of the actions of the Heating HE.

The Oversight HE can push an orderly reboot and power off for the Heating HE if required using a Hue Power Plug.

I can Hard reboot both from the Hue App if absolutely required and I am remote and the HEs are unresponsive.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.