If statement on battery powered temperature, does it drain battery if


#1

Hey guys.

I’m wondering if an of statement every 5 minutes on a battery powered device actually polls the device it’s self or it’s most recent reported value.

For instance, I have a Samsung multi sensor in the roof and I check the temperature every 5mins and if between a certain value do an action.

Should I rather be using if changes above rather than if is value x?

I’ve just found my batteries are not lasting that long and I don’t know if it’s because of these queries or because of the battery vendor. Hey


#2

I do not understand this part of your question…
(maybe include a screenshot?)


For what it’s worth, my “Samsung multi sensors” get about three months of use per battery… but I am using a knockoff brand of batteries that only costs me about 25 cents each.


One way that I can prolong the battery a bit is by wording my piston like this:

IF Sensor's temp changes               <-- Trigger
Then
    IF Sensor's temp is between X & Y  <-- Condition
    Then
        Do stuff
    END IF
END IF

This method only runs when the device reports a temp change, so the piston shouldn’t use any extra juice.


#3

This is what I wondered, if I should use a if between or if changes to rather than a timer every 5 minutes saying of above.

My battery used to last over a year as just a door sensor but when monitoring the temperature on that same door sensor it suddenly drained battery down to 3 months.

So I guess you answered my original question of the best way to read temperature for actions, set up a trigger piston rather than have it check every 5 mins. I didn’t realize it would poll the device for a new temperature every time, I thought it would use the existing reported value that ST had, I guess another way is to read a variable and have the sensor update that variable when there has been an update reported by the device.