Homey Community Forum

Why is this flow not working ? (Temp sensor, time, switch)

Hi,
I’m struggling to understand why my flow is not working. The logic behind the flow seems to me it should work. I have a small Aqara temperature sensor (Zigbee), Cleverio small socket (Z-wave). My time Zone is Norway.

My flow is as follows:



Today it was over 25 degrees celcius in the room from a wood oven, and I wanted my electrical oven to switch off (which is plugged into the Cleverio socket), but it didn’t happen.

Any ideas ?

Best regards,
Martin Bergholtz

Was this device also turned on by Homey?

image

Try to remove this card (it’s not really needed) and see if it works than.

hit the TEST button, fill in a temp value higher then 23.5 and see what the flow does. keep a eye on the marks :white_check_mark: :x:

1 Like

Hi, I tried to remove the og turned on (even though it is always turned on through Homey). Pressed test and it didn’t work. I set a threshold below current temperature, and pressed test. Doesn’t work. Really strange.

You say it is always turned on by homey, I hope you don’t mean you’ve turned on the option “always on” in advanced settings? because that will forbid turning it off. And the temperature, is that the local tag or the temperature from another device? Checking the marks wile running a test as asked by @RoyWissenburg is indeed the first way to go to see if homey thinks a condition is not met or a command fails. If they all succeed, is manually turning the devce of working as expected? Maybe it’s a range problem?

you could also make a flow to check if the temp actually changes by having no conditions and simply posting a notification. Maybe the temp was 25 stable?

Which temperature tag did you insert? Make another flow in which you check if temperature changed then send notification to timeline: https://homey.app/f/umI3pr. The temperature tag to be inserted in the notification is the local one (top of tag list). Disable/delete this flow after short test as it can run very often.

Are the sensor and the room thermometer near to eachother? Otherwise you can’t measure the difference.
Temperature precision: ±0.3℃ for the sensor, what is the room thermometer precision?
What are the setting for the sensor?
My temperature sensor has a setting for the minimum value difference that must be reached before the sensor makes contact with Homey.

Hi and thanks for many suggestions. @Edwin_D and @tlangelaar - it is not set to “Always on” in advanced. The tag i choose is from the Aqara sensor tag:
image
Range is not a problem as it’s in the room next door to the homey and sensor shows correct values (verified with other sensors to see).

@Kees_Van_der_linden The sensor shows correct values compared to other sensors. Seeing the Aqara showed 25 degrees, and I wanted treshold to shut off at 23,5 it should be big enough gap right ?

@Edwin_D I did to a test and the strange this is that I get a yellow exlamation mark next to the logic:
image
Thats from pressing test and saying 25 (tried with various levels above 23.5 too - same result). The weird thing is that I have the same flow for switching off at night, and that test gives a green check mark :thinking:
image

Really strange

Not that strange, the temperature tag you used isn’t the local tag (which you fill in when pressing test) but the device’s tag, which has the value 22.4 which definitely isn’t greater (higher) then 23.5

I think @Caseda might be on the right track. When playing around in Homeyscript I too had problems when reacting on value changes that it seemed like the flow to change the value change was triggered BEFORE the value in the devices capability reflected the same change. I took another approach but didn’t investigate further what originally went worng when it finally worked.

If this is true, the local tag will give you the right value and the tag from (the same!) device will not. If that fixes your problem, I think you should send in a bug report to Athom.

Maybe this can be tested, I will see if I can create a flow on any of my aqara temp sensors to verify that this can actually happen.

EDIT: so far the local tag and the sensor tag are equal on firmware V5 RC50, so it doesn’t seem to be a problem for me.

When you test the flow in the web interface, I think you can see an error message for the tag that fails sometimes (was it by hovering/clicking on the error icon, or did it just show as a banner on top? I’m not sure).

Hi, it seems what @Caseda says is correct. The test button does not use the temperature I enter in the Test - but the actual temperature read from the sensor itself.

I changed to flow to fit with what the temperature is right now, and changing around the time so it would be correct within the time frame of when I press test. Doing all that - the flow works. However it did not turn off that day when the room was alot warmer due to extra heat from wood oven. Very strange as the temperature sensor in the flow was 2 degrees higher than my treshold for turning it off. Might be a coincidence - but I will see if it happens again when I reheat it with wood oven as supplement again.

Ah yes, using the actual sensor again instead of the local variable does break the test. Never thought of that - I guess this must have fooled a lot of others too. Good catch @Caseda !

Dit you notice shortly after 6:00? Because if the temp is high before 6:00 it wont turn off until the temp changes after 6:00. So if the temp was stable from 6:00 on… Maybe you also need a rule when it’s 6:00 and the temp is above the threshold, turn it of too.

Hey - it was not high until midday, so sadly no. Can’t seem to get this working right. I’ve tried alot now. Strange

Then start from scratch.
WHEN temp changes THEN push message to phone with the temp tag provided at the top saying “In this flow”.
When that works take the next step:
WHEN temp changes AND (logic card) temp is higher then 23.5 (make sure to use the tag again provided at the top saying “In this flow”) THEN push message with the correct tag.
Move on from there.
In the insights u see the temp actually change?

1 Like

Thank you @Rocodamelshekima , I will try this and do it as steps to see. Good idea.

Insight shows the temperature does change, so the sensor should work :slight_smile:

1 Like

@Rocodamelshekima Apparently all my sensors send the temperature through the message function, and now it seems all my flows are working. What happened the other day is beyond my understanding, as the flow should have worked - but didn’t. Now it works and I’ve not changed it. Hoping it stays that way :sweat_smile: