Reporting the lowest battery level

variables

#10

Okay no worries. Sorry I didn’t understand that’s what you meant.

I do have another idea of how to do it but I don’t know if it’s possible. What I would like to know is, If I have a variable that already contains information, can I add more information to that variable?
For instance;
this IF finds AVGTemp and stores it to report
this IF finds battery levels and adds it to report
this IF finds $status and adds it to report

PUSH {Report}

displays as:
Average Temp 25 degrees
Contact 12%
Motion 2 45%
Motion 7 68%
Water Cooler OFFLINE


#11

Usually the way this is tackled is lowering your variable {lowBatteryLevel} to something like 25-30 so it only lists the really low devices…

But be careful with this… I have many devices where the battery dies at about 70% (as seen in SmartThings)


#12

Yes. You can refer to the variable in any line, like this:

pic

Each line adds more data to the end of the string variable

In this case, the final variable was:
At 7:25 A.M. on Saturday in November


Pro Tip:

Usually we want to use a STRING variable when doing this, because using boolean, numbers, time or devices can return strange results.


#13

may I ask, what does the ’ symbol signify? I’m just trying to figure out how to apply this method to my piston:

Set Variable {HealthReport} = {NotOnline + " is offline"}
Set Variable {HealthReport} = {BadBatt + " battery is low"}
Set Variable {HealthReport} = {"The average temp is " + {AvgTemp}

I tried this

Set Variable {HealthReport} = {'NotOnline + " 'is offline"}
Set Variable {HealthReport} = {‘BadBatt’ + " 'battery is low"}
Set Variable {HealthReport} = {"'The average temp is " + {'AvgTemp}


#14

I often use single quotes instead of double quotes… Either will work, just be consistent.


Pro Tip:

If your phrase has an apostrophe like the word IT’S, then use double quotes for your quotation marks.


#15

Your last post overwrites the variable each and every line… You have to refer to the variable name {HealthReport} if you want to keep the old data when adding the new data.

Maybe something like this:

Set Variable {HealthReport} = 'something.'
Set Variable {HealthReport} = HealthReport' something else.'
Set Variable {HealthReport} = HealthReport' even more data.'

(these examples are using an Expression box)

Final results for this example:
something. something else. even more data.


#16

Fantastic! Thank you soo much for all of your help. :smiley:


#17

I figured I would post my piston here just in case anyone else would like to use it.

that will give you this:


#18

It looks good…

One observation though… If you have an event where {Sensors}'s $status are ONLINE, or where {NotOnline} is empty… then line 42 will not execute. (this is good). The problem will be in the next Set variable (line 55, 59, 68, 70, 73 or 75). Whichever one runs first, will add the new data to the end of the old (previous) data…

You can avoid seeing outdated info by adding a new command at the beginning of the first THEN: (right before line 32)

Set variable {HealthReport) = ''
(that is two quotes)

This effectively “clears” the variable at the beginning of each execution, so all of the old data is wiped away…


Alternatively, you can add this line to the ELSE block between lines 33-44:

Set variable {HealthReport) = '*** System Check *** Everything is online'

So the old data is removed when {Sensors}'s $status is not OFFLINE.


Basically, you must ensure that the FIRSTSet Variable” that executes does NOT have “HealthReport” written in the Expression box.


#19

Good spot. :+1:
Totally missed that, as I always have some sort of sensor that is offline.
Would editing the variable and setting a value to it do the same thing? As it does mention:
“By assigning an initial value to the variable, you are instructing the piston to initialize the variable on every run to that initial value.”
So if I just put ’ ’ in there it should do the same?


#20

Oh no, that breaks the piston. Nevermind, i’ll do Set variable {HealthReport) = '' like you suggested.:grinning:


#21

Hello guys, I’m having problems with this piston again. I have {if $devices’s $status is ‘OFFLINE’} then save matching list to a variable, like in my piston above. This has been working flawlessly. However I noticed today some of my newer sensors were not being reported as offline. I looked at the devices status in the IDE and it said ‘HUB_DISCONNECTED’, while other offline sensors showed ‘OFFLINE’. I would like to add this other status to my piston but I can’t get it to work.

If I put {if $devices’s $status is ‘HUB_DISCONNECTED’} it reports the missing offline sensor. The problem is when I try to add ‘OFFLINE’. I tried:


But when testing it just evaluates as false and skips. I read through the webCoRE wiki on and it said you use ‘||’ for an OR, but I don’t know if I have worded the expression right to make it work.

In the comparison I tried ‘is’ & ‘is any of’ but neither made any difference. I also tried:


To no avail. Thanks for any help guys.


#22

Why not split into two conditions:

IF {SensorOnLine}'s $status is 'HUB_DISCONNECTED'
   or
   {SensorOnLine}'s $status is 'OFFLINE'
       Then do stuff
END IF

Alternatively, you can dump $status into a string variable, and then check conditions like this:

pic


#23

Perfect! Thank you. The second example worked.
I did try the first example but the problem was you had to have:

IF {SensorOnLine}'s $status is ‘HUB_DISCONNECTED’
-save matching list to var
or
{SensorOnLine}'s $status is ‘OFFLINE’
-save matching list to var
END IF

Meaning if you did have devices that were offline it would overwrite the list of hub_disconnected sensors and visa versa.


#24

So ever since the migration, this piston no longer works. Apparently the new messages system has a text limit so it doesn’t support the long piece of text this piston throws out. Anyone know if smartthings knows about this or if there is a work around?


#25

Are you receiving errors from the piston (logs?) or are you just not receiving push notifications from the new app. The new app requires you to set ‘store in messages’ as true. I have a multi-line message that is sent daily with no issues in the new app.


#26
  • Is it the trigger failing? (IE: piston not executing)
  • or is the outputed commands failing? (IE: no SMS received)

If it’s the failed trigger

I wonder if it is the “IS ANY OF” comparison above

(I have not tested that type of search in the new app yet)


#27

Sorry for the delay.

So I run the piston to give me a report and this is the log:
(Sorry I can’t remember how to put it into a container - Thanks WCmore)

9/13/2020, 7:40:22 AM +154ms
+0ms 	╔Received event [Our Home].routineExecuted = 892323bc-3d51-48e6-b72c-143048a9cc1d with a delay of 141ms
+151ms 	║RunTime Analysis CS > 20ms > PS > 91ms > PE > 40ms > CE
+154ms 	║Runtime (67961 bytes) successfully initialized in 91ms (v0.3.110.20191009) (152ms)
+154ms 	║╔Execution stage started
+161ms 	║║Comparison (string) :5cd4f21e809ad429c98c4ebc87b6804f: executes (string) :5cd4f21e809ad429c98c4ebc87b6804f: = true (1ms)
+163ms 	║║Cancelling condition #66's schedules...
+164ms 	║║Condition #66 evaluated true (5ms)
+165ms 	║║Cancelling condition #65's schedules...
+165ms 	║║Condition group #65 evaluated true (state changed) (7ms)
+167ms 	║║Cancelling statement #78's schedules...
+173ms 	║║Executed virtual command setVariable (2ms)
+179ms 	║║Executed virtual command setVariable (3ms)
+1652ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1655ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1657ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1660ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1663ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1666ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1669ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1671ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1674ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1677ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1680ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1683ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1685ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1688ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1691ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1694ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1696ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1699ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1702ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1704ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1707ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1710ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1713ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1716ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1718ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1721ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1724ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1726ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (1ms)
+1729ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1732ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1735ms 	║║Comparison (string) ONLINE is_any_of (string) OFFLINE, HUB_DISCONNECTED = false (2ms)
+1744ms 	║║Condition #38 evaluated false (1562ms)
+1745ms 	║║Condition group #5 evaluated false (state did not change) (1564ms)
+1840ms 	║║Comparison (integer) 84 is_less_than (integer) 55 = false (1ms)
+1842ms 	║║Comparison (integer) 78 is_less_than (integer) 55 = false (1ms)
+1845ms 	║║Comparison (integer) 44 is_less_than (integer) 55 = true (1ms)
+1847ms 	║║Comparison (integer) 68 is_less_than (integer) 55 = false (1ms)
+1849ms 	║║Comparison (integer) 59 is_less_than (integer) 55 = false (1ms)
+1851ms 	║║Comparison (integer) 56 is_less_than (integer) 55 = false (1ms)
+1853ms 	║║Comparison (integer) 64 is_less_than (integer) 55 = false (1ms)
+1856ms 	║║Comparison (integer) 98 is_less_than (integer) 55 = false (1ms)
+1858ms 	║║Comparison (integer) 94 is_less_than (integer) 55 = false (1ms)
+1860ms 	║║Comparison (integer) 100 is_less_than (integer) 55 = false (2ms)
+1862ms 	║║Comparison (integer) 67 is_less_than (integer) 55 = false (1ms)
+1864ms 	║║Comparison (integer) 92 is_less_than (integer) 55 = false (1ms)
+1866ms 	║║Comparison (integer) 45 is_less_than (integer) 55 = true (1ms)
+1869ms 	║║Comparison (integer) 32 is_less_than (integer) 55 = true (1ms)
+1871ms 	║║Comparison (integer) 100 is_less_than (integer) 55 = false (1ms)
+1873ms 	║║Comparison (integer) 58 is_less_than (integer) 55 = false (1ms)
+1880ms 	║║Condition #41 evaluated true (133ms)
+1881ms 	║║Condition group #39 evaluated true (state did not change) (134ms)
+1917ms 	║║Comparison (integer) 44 is_less_than (integer) 55 = true (1ms)
+1919ms 	║║Condition #51 evaluated true (36ms)
+1920ms 	║║Condition group #50 evaluated true (state did not change) (37ms)
+1921ms 	║║Cancelling statement #50's schedules...
+1928ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+1928ms 	║║ + (string)
+1928ms 	║║ >> (string) ******** SYSTEM CHECK ********
+1932ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+1932ms 	║║ + (string) Bedroom Motion, Lounge Room Motion and Main Hallway Motion >> (string) ******** SYSTEM CHECK ********
+1932ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion
+1935ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+1935ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion + (string) battery is low. >> (string) ******** SYSTEM CHECK ********
+1935ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+1940ms 	║║Executed virtual command setVariable (3ms)
+1961ms 	║║Comparison (integer) 44 is_greater_than_or_equal_to (integer) 55 = false (2ms)
+1963ms 	║║Comparison (integer) 45 is_greater_than_or_equal_to (integer) 55 = false (1ms)
+1966ms 	║║Comparison (integer) 32 is_greater_than_or_equal_to (integer) 55 = false (1ms)
+1967ms 	║║Condition #91 evaluated false (24ms)
+1968ms 	║║Condition group #89 evaluated false (state did not change) (26ms)
+1971ms 	║║Cancelling statement #60's schedules...
+2045ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2045ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low. + (string)
+2045ms 	║║Average Indoor Temp is >> (string) ******** SYSTEM CHECK ********
+2045ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2045ms 	║║Average Indoor Temp is
+2049ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2049ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2049ms 	║║Average Indoor Temp is + (string) 22 >> (string) ******** SYSTEM CHECK ********
+2049ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2049ms 	║║Average Indoor Temp is 22
+2052ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2053ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2053ms 	║║Average Indoor Temp is 22 + (string) °C
+2053ms 	║║Average Outdoor Temp is >> (string) ******** SYSTEM CHECK ********
+2053ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2053ms 	║║Average Indoor Temp is 22°C
+2053ms 	║║Average Outdoor Temp is
+2056ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2056ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2056ms 	║║Average Indoor Temp is 22°C
+2056ms 	║║Average Outdoor Temp is + (string) 17 >> (string) ******** SYSTEM CHECK ********
+2056ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2056ms 	║║Average Indoor Temp is 22°C
+2056ms 	║║Average Outdoor Temp is 17
+2059ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2059ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2059ms 	║║Average Indoor Temp is 22°C
+2059ms 	║║Average Outdoor Temp is 17 + (string) °C >> (string) ******** SYSTEM CHECK ********
+2060ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2060ms 	║║Average Indoor Temp is 22°C
+2060ms 	║║Average Outdoor Temp is 17°C
+2065ms 	║║Executed virtual command setVariable (4ms)
+2070ms 	║║Condition #55 evaluated false (2ms)
+2071ms 	║║Condition group #53 evaluated false (state did not change) (3ms)
+2074ms 	║║Cancelling statement #2's schedules...
+2078ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2078ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2078ms 	║║Average Indoor Temp is 22°C
+2078ms 	║║Average Outdoor Temp is 17°C + (string)
+2079ms 	║║Battery Levels are: >> (string) ******** SYSTEM CHECK ********
+2079ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2079ms 	║║Average Indoor Temp is 22°C
+2079ms 	║║Average Outdoor Temp is 17°C
+2079ms 	║║Battery Levels are:
+2084ms 	║║Executed virtual command setVariable (2ms)
+2094ms 	║║Cancelling statement #84's schedules...
+2102ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2102ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2102ms 	║║Average Indoor Temp is 22°C
+2102ms 	║║Average Outdoor Temp is 17°C
+2102ms 	║║Battery Levels are: + (string)
+2102ms 	║║- >> (string) ******** SYSTEM CHECK ********
+2102ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2103ms 	║║Average Indoor Temp is 22°C
+2103ms 	║║Average Outdoor Temp is 17°C
+2103ms 	║║Battery Levels are:
+2103ms 	║║-
+2111ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2111ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2111ms 	║║Average Indoor Temp is 22°C
+2111ms 	║║Average Outdoor Temp is 17°C
+2111ms 	║║Battery Levels are:
+2112ms 	║║- + (string) 84 >> (string) ******** SYSTEM CHECK ********
+2112ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2112ms 	║║Average Indoor Temp is 22°C
+2112ms 	║║Average Outdoor Temp is 17°C
+2112ms 	║║Battery Levels are:
+2112ms 	║║- 84
+2115ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2115ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2115ms 	║║Average Indoor Temp is 22°C
+2115ms 	║║Average Outdoor Temp is 17°C
+2115ms 	║║Battery Levels are:
+2115ms 	║║- 84 + (string) % = >> (string) ******** SYSTEM CHECK ********
+2116ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2116ms 	║║Average Indoor Temp is 22°C
+2116ms 	║║Average Outdoor Temp is 17°C
+2116ms 	║║Battery Levels are:
+2116ms 	║║- 84% =
+2119ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2119ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2119ms 	║║Average Indoor Temp is 22°C
+2119ms 	║║Average Outdoor Temp is 17°C
+2119ms 	║║Battery Levels are:
+2119ms 	║║- 84% = + (string) Back Door >> (string) ******** SYSTEM CHECK ********
+2119ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2120ms 	║║Average Indoor Temp is 22°C
+2120ms 	║║Average Outdoor Temp is 17°C
+2120ms 	║║Battery Levels are:
+2120ms 	║║- 84% = Back Door
+2125ms 	║║Executed virtual command setVariable (3ms)
+2135ms 	║║Cancelling statement #84's schedules...
+2142ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2142ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2142ms 	║║Average Indoor Temp is 22°C
+2143ms 	║║Average Outdoor Temp is 17°C
+2143ms 	║║Battery Levels are:
+2143ms 	║║- 84% = Back Door + (string)
+2143ms 	║║- >> (string) ******** SYSTEM CHECK ********
+2143ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2143ms 	║║Average Indoor Temp is 22°C
+2143ms 	║║Average Outdoor Temp is 17°C
+2143ms 	║║Battery Levels are:
+2143ms 	║║- 84% = Back Door
+2143ms 	║║-
+2153ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2153ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2153ms 	║║Average Indoor Temp is 22°C
+2153ms 	║║Average Outdoor Temp is 17°C
+2153ms 	║║Battery Levels are:
+2153ms 	║║- 84% = Back Door
+2153ms 	║║- + (string) 78 >> (string) ******** SYSTEM CHECK ********
+2153ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2153ms 	║║Average Indoor Temp is 22°C
+2153ms 	║║Average Outdoor Temp is 17°C
+2154ms 	║║Battery Levels are:
+2154ms 	║║- 84% = Back Door
+2154ms 	║║- 78
+2157ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2157ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2157ms 	║║Average Indoor Temp is 22°C
+2157ms 	║║Average Outdoor Temp is 17°C
+2157ms 	║║Battery Levels are:
+2157ms 	║║- 84% = Back Door
+2157ms 	║║- 78 + (string) % = >> (string) ******** SYSTEM CHECK ********
+2157ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2158ms 	║║Average Indoor Temp is 22°C
+2158ms 	║║Average Outdoor Temp is 17°C
+2158ms 	║║Battery Levels are:
+2158ms 	║║- 84% = Back Door
+2158ms 	║║- 78% =
+2161ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2161ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2161ms 	║║Average Indoor Temp is 22°C
+2161ms 	║║Average Outdoor Temp is 17°C
+2161ms 	║║Battery Levels are:
+2161ms 	║║- 84% = Back Door
+2161ms 	║║- 78% = + (string) Bedroom Hallway Motion >> (string) ******** SYSTEM CHECK ********
+2162ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2162ms 	║║Average Indoor Temp is 22°C
+2162ms 	║║Average Outdoor Temp is 17°C
+2162ms 	║║Battery Levels are:
+2162ms 	║║- 84% = Back Door
+2162ms 	║║- 78% = Bedroom Hallway Motion
+2167ms 	║║Executed virtual command setVariable (3ms)
+2177ms 	║║Cancelling statement #84's schedules...
+2184ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2184ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2184ms 	║║Average Indoor Temp is 22°C
+2184ms 	║║Average Outdoor Temp is 17°C
+2185ms 	║║Battery Levels are:
+2185ms 	║║- 84% = Back Door
+2185ms 	║║- 78% = Bedroom Hallway Motion + (string)
+2185ms 	║║- >> (string) ******** SYSTEM CHECK ********
+2185ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2185ms 	║║Average Indoor Temp is 22°C
+2185ms 	║║Average Outdoor Temp is 17°C
+2185ms 	║║Battery Levels are:
+2185ms 	║║- 84% = Back Door
+2185ms 	║║- 78% = Bedroom Hallway Motion
+2186ms 	║║-
+2194ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2194ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2194ms 	║║Average Indoor Temp is 22°C
+2194ms 	║║Average Outdoor Temp is 17°C
+2194ms 	║║Battery Levels are:
+2194ms 	║║- 84% = Back Door
+2194ms 	║║- 78% = Bedroom Hallway Motion
+2194ms 	║║- + (string) 44 >> (string) ******** SYSTEM CHECK ********
+2194ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2194ms 	║║Average Indoor Temp is 22°C
+2195ms 	║║Average Outdoor Temp is 17°C
+2195ms 	║║Battery Levels are:
+2195ms 	║║- 84% = Back Door
+2195ms 	║║- 78% = Bedroom Hallway Motion
+2195ms 	║║- 44
+2198ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2198ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2198ms 	║║Average Indoor Temp is 22°C
+2198ms 	║║Average Outdoor Temp is 17°C
+2198ms 	║║Battery Levels are:
+2198ms 	║║- 84% = Back Door
+2198ms 	║║- 78% = Bedroom Hallway Motion
+2199ms 	║║- 44 + (string) % = >> (string) ******** SYSTEM CHECK ********
+2199ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2199ms 	║║Average Indoor Temp is 22°C
+2199ms 	║║Average Outdoor Temp is 17°C
+2199ms 	║║Battery Levels are:
+2199ms 	║║- 84% = Back Door
+2199ms 	║║- 78% = Bedroom Hallway Motion
+2199ms 	║║- 44% =
+2202ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2202ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2202ms 	║║Average Indoor Temp is 22°C
+2202ms 	║║Average Outdoor Temp is 17°C
+2202ms 	║║Battery Levels are:
+2202ms 	║║- 84% = Back Door
+2203ms 	║║- 78% = Bedroom Hallway Motion
+2203ms 	║║- 44% = + (string) Bedroom Motion >> (string) ******** SYSTEM CHECK ********
+2203ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2203ms 	║║Average Indoor Temp is 22°C
+2203ms 	║║Average Outdoor Temp is 17°C
+2203ms 	║║Battery Levels are:
+2203ms 	║║- 84% = Back Door
+2203ms 	║║- 78% = Bedroom Hallway Motion
+2203ms 	║║- 44% = Bedroom Motion
+2208ms 	║║Executed virtual command setVariable (3ms)
+2217ms 	║║Cancelling statement #84's schedules...
+2225ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2225ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2225ms 	║║Average Indoor Temp is 22°C
+2225ms 	║║Average Outdoor Temp is 17°C
+2225ms 	║║Battery Levels are:
+2225ms 	║║- 84% = Back Door
+2225ms 	║║- 78% = Bedroom Hallway Motion
+2225ms 	║║- 44% = Bedroom Motion + (string)
+2225ms 	║║- >> (string) ******** SYSTEM CHECK ********
+2226ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2226ms 	║║Average Indoor Temp is 22°C
+2226ms 	║║Average Outdoor Temp is 17°C
+2226ms 	║║Battery Levels are:
+2226ms 	║║- 84% = Back Door
+2226ms 	║║- 78% = Bedroom Hallway Motion
+2226ms 	║║- 44% = Bedroom Motion
+2226ms 	║║-
+2234ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2234ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2234ms 	║║Average Indoor Temp is 22°C
+2234ms 	║║Average Outdoor Temp is 17°C
+2234ms 	║║Battery Levels are:
+2234ms 	║║- 84% = Back Door
+2234ms 	║║- 78% = Bedroom Hallway Motion
+2235ms 	║║- 44% = Bedroom Motion
+2235ms 	║║- + (string) 68 >> (string) ******** SYSTEM CHECK ********
+2235ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2235ms 	║║Average Indoor Temp is 22°C
+2235ms 	║║Average Outdoor Temp is 17°C
+2235ms 	║║Battery Levels are:
+2235ms 	║║- 84% = Back Door
+2235ms 	║║- 78% = Bedroom Hallway Motion
+2235ms 	║║- 44% = Bedroom Motion
+2235ms 	║║- 68
+2238ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2238ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2238ms 	║║Average Indoor Temp is 22°C
+2239ms 	║║Average Outdoor Temp is 17°C
+2239ms 	║║Battery Levels are:
+2239ms 	║║- 84% = Back Door
+2239ms 	║║- 78% = Bedroom Hallway Motion
+2239ms 	║║- 44% = Bedroom Motion
+2239ms 	║║- 68 + (string) % = >> (string) ******** SYSTEM CHECK ********
+2239ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2239ms 	║║Average Indoor Temp is 22°C
+2239ms 	║║Average Outdoor Temp is 17°C
+2239ms 	║║Battery Levels are:
+2240ms 	║║- 84% = Back Door
+2240ms 	║║- 78% = Bedroom Hallway Motion
+2240ms 	║║- 44% = Bedroom Motion
+2240ms 	║║- 68% =
+2243ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2243ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2243ms 	║║Average Indoor Temp is 22°C
+2243ms 	║║Average Outdoor Temp is 17°C
+2243ms 	║║Battery Levels are:
+2243ms 	║║- 84% = Back Door
+2243ms 	║║- 78% = Bedroom Hallway Motion
+2243ms 	║║- 44% = Bedroom Motion
+2243ms 	║║- 68% = + (string) En-Suite Shower Sensor >> (string) ******** SYSTEM CHECK ********
+2243ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2244ms 	║║Average Indoor Temp is 22°C
+2244ms 	║║Average Outdoor Temp is 17°C
+2244ms 	║║Battery Levels are:
+2244ms 	║║- 84% = Back Door
+2244ms 	║║- 78% = Bedroom Hallway Motion
+2244ms 	║║- 44% = Bedroom Motion
+2244ms 	║║- 68% = En-Suite Shower Sensor
+2249ms 	║║Executed virtual command setVariable (2ms)
+2258ms 	║║Cancelling statement #84's schedules...
+2265ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2266ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2266ms 	║║Average Indoor Temp is 22°C
+2266ms 	║║Average Outdoor Temp is 17°C
+2266ms 	║║Battery Levels are:
+2266ms 	║║- 84% = Back Door
+2266ms 	║║- 78% = Bedroom Hallway Motion
+2266ms 	║║- 44% = Bedroom Motion
+2266ms 	║║- 68% = En-Suite Shower Sensor + (string)
+2266ms 	║║- >> (string) ******** SYSTEM CHECK ********
+2266ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2267ms 	║║Average Indoor Temp is 22°C
+2267ms 	║║Average Outdoor Temp is 17°C
+2267ms 	║║Battery Levels are:
+2267ms 	║║- 84% = Back Door
+2267ms 	║║- 78% = Bedroom Hallway Motion
+2267ms 	║║- 44% = Bedroom Motion
+2267ms 	║║- 68% = En-Suite Shower Sensor
+2267ms 	║║-
+2275ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2275ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2275ms 	║║Average Indoor Temp is 22°C
+2275ms 	║║Average Outdoor Temp is 17°C
+2275ms 	║║Battery Levels are:
+2276ms 	║║- 84% = Back Door
+2276ms 	║║- 78% = Bedroom Hallway Motion
+2276ms 	║║- 44% = Bedroom Motion
+2276ms 	║║- 68% = En-Suite Shower Sensor
+2276ms 	║║- + (string) 59 >> (string) ******** SYSTEM CHECK ********
+2276ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2276ms 	║║Average Indoor Temp is 22°C
+2276ms 	║║Average Outdoor Temp is 17°C
+2276ms 	║║Battery Levels are:
+2276ms 	║║- 84% = Back Door
+2277ms 	║║- 78% = Bedroom Hallway Motion
+2277ms 	║║- 44% = Bedroom Motion
+2277ms 	║║- 68% = En-Suite Shower Sensor
+2277ms 	║║- 59
+2280ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2280ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2280ms 	║║Average Indoor Temp is 22°C
+2280ms 	║║Average Outdoor Temp is 17°C
+2280ms 	║║Battery Levels are:
+2280ms 	║║- 84% = Back Door
+2280ms 	║║- 78% = Bedroom Hallway Motion
+2281ms 	║║- 44% = Bedroom Motion
+2281ms 	║║- 68% = En-Suite Shower Sensor
+2281ms 	║║- 59 + (string) % = >> (string) ******** SYSTEM CHECK ********
+2281ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2281ms 	║║Average Indoor Temp is 22°C
+2281ms 	║║Average Outdoor Temp is 17°C
+2281ms 	║║Battery Levels are:
+2281ms 	║║- 84% = Back Door
+2281ms 	║║- 78% = Bedroom Hallway Motion
+2281ms 	║║- 44% = Bedroom Motion
+2282ms 	║║- 68% = En-Suite Shower Sensor
+2282ms 	║║- 59% =
+2285ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2285ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2285ms 	║║Average Indoor Temp is 22°C
+2285ms 	║║Average Outdoor Temp is 17°C
+2285ms 	║║Battery Levels are:
+2285ms 	║║- 84% = Back Door
+2286ms 	║║- 78% = Bedroom Hallway Motion
+2286ms 	║║- 44% = Bedroom Motion
+2286ms 	║║- 68% = En-Suite Shower Sensor
+2286ms 	║║- 59% = + (string) Front Door >> (string) ******** SYSTEM CHECK ********
+2286ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2286ms 	║║Average Indoor Temp is 22°C
+2286ms 	║║Average Outdoor Temp is 17°C
+2286ms 	║║Battery Levels are:
+2286ms 	║║- 84% = Back Door
+2286ms 	║║- 78% = Bedroom Hallway Motion
+2287ms 	║║- 44% = Bedroom Motion
+2287ms 	║║- 68% = En-Suite Shower Sensor
+2287ms 	║║- 59% = Front Door
+2293ms 	║║Executed virtual command setVariable (4ms)
+2303ms 	║║Cancelling statement #84's schedules...
+2311ms 	║║Calculating (string) ******** SYSTEM CHECK ********
+2311ms 	║║Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low.
+2311ms 	║║Average Indoor Temp is 22°C
+2311ms 	║║Average Outdoor Temp is 17°C
+2311ms 	║║Battery Levels are:
+2311ms 	║║- 84% = Back Door
+2311ms 	║║- 78% = Bedroom Hallway Motion
+2311ms 	║║- 44% = Bedroom Motion
+2311ms 	║║- 68% = En-Suite Shower Sensor
+2311ms 	║║- 59% = Front Door + (string)
+2312ms 	║║- >> (string) ******** SYSTEM CHECK ********

I know the piston worked as my health report variable has stored the report:

******** SYSTEM CHECK ******** Bedroom Motion, Lounge Room Motion and Main Hallway Motion battery is low. Average Indoor Temp is 22°C Average Outdoor Temp is 17°C Battery Levels are: - 84% = Back Door - 78% = Bedroom Hallway Motion - 44% = Bedroom Motion - 68% = En-Suite Shower Sensor - 59% = Front Door - 56% = Gaming Time Motion - 64% = Garage Door - 98% = Garage Inner Door - 94% = Garage Rear Door - 100% = Goodnight Button - 67% = Kitchen Motion - 92% = Laundry Door - 45% = Lounge Room Motion - 32% = Main Hallway Motion - 100% = TV Button - 58% = Water Cooler Level ***** END OF REPORT *****

But when I go into the new Smartthings app there is no message:

That;s the issue I’m having. It used to show the message in the old app but now I’ve migrated, the old app no longer shows these notifications and neither does the new app.


#28

I’m using “Send Notification”, as I didn’t want it as a push notification, but there is no store in messages option. I do know what your talking about though.


#29

Okay, update:
If I set it to push notification - Store in messages, it works.

The layout is all wrong so I’ll have to tweak it. So perhaps the send notification is broken? I’ll just use push from now on.

I’ll ask another question while I’m here. How are you guys now using your Smartthings ‘Automations’ aka routines to trigger webcore pistons? As the new app doesn’t allow an empty automation, how have you set it up to allow you to trigger webcore pistons?

UPDATE:
Also, some people wanted an updated piston so here you go:

I had planned to list the battery levels in ascending order using WCmore’s idea but I couldn’t figure out how to code it into my existing piston. Something like:

For each $device in SensorBatt do

only when
[$device: battery < 10]
do
Add $devices to report

only when
[$device: battery > 10 && < 21]
do
Add $devices to report

only when
[$device: battery > 20 && < 31]
do
Add $devices to report

But I couldn’t figure it out, sorry guys. I don’t really understand how to use expressions and operators, I just tend to code by trial and error.