Device Status Tiles

temperature
device_health
light
tiles
power

#40

Thanks! Let me know when they are up :wink:


#41

All the device status tile pistons are updated on the first 4 posts, here’s the changelog:

  • Added comments to the variable section as additional guidance when setting up the variables and piston.
  • Added 24Hour Variable if you want 24 hour timestamps.
  • Added DDMMDateFormat Variable if you want DD/MM Date format since I know it’s formatted that way for some countries. This can be mixed and matched with the 24hour variable too.
  • Added a 10 minute update on-top of the updates when there’s events. This will help sync the tiles if the tiles are not in the correct status and will make the tiles display if there’s no events yet for a device. If there’s no events for a device, it’ll display in the footer as "No Event Yet’ since there’s not a timestamp yet. This will make it so you are not having to manually trigger events for the devices you are monitoring just to get the tile to display. The 10 minute timer can be adjusted if you are having issues with tiles not updating correctly, do not have it update any faster than 1 minute though, otherwise you will have speed issues if you have a lot of pistons.
  • Removed the wait that was added in error on all the tiles I posted
  • Added the clear tile function based on bangali’s presence sensor to remove any extra tiles if you remove a device for example or change devices. This will eliminate extra tiles that are still displaying if you change what devices are assigned to the piston.
  • Fixed the background colors on the Light Sensor tiles since Yellow is hard to read if tile was 10000 Lux level for example.

I highly recommend creating a second instance of WebCoRE for the tiles like I did since it’ll split the memory usage and make everything run and work faster. The WebCoRE site will start to get slow too unless you do this and you can link them together by registering another instance on the WebCore Dashboard:

image

More tiles to come, looking to add humidity, presence and room tiles. The room tiles I want to create is for the Rooms Occupancy DTH located here created by bangali:

https://community.webcore.co/t/rooms-occupancy-dth-with-states-for-rooms-to-use-in-wc-st/1813:


#42

Great stuff! I’ve added them and they are looking good. Also made a new instance for WebCoRE. Can’t wait for the room tiles :wink: I’m using the room occupancy aswell now


#43

I updated the Light Sensor Status Tile above to fix an issue with the timestamps not working.


#44

Thanks for these. However, I’m getting errors, with both the old and updated Light tile script.

Cancelling statement #206’s schedules…
+13862ms ║║Calculating (decimal) 0.0 - (decimal) 1.0 >> (decimal) -1.0
+13997ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+14001ms ║╚Execution stage complete. (474ms)

I put the context so you may be able to determine which line it is.
It’s the same error as @johhnwilliam above.

It keeps on turning on my light (the first one in the list - ie: device1). Happens every 10 mins or so.


#45

I already posted about that error here: Error in Logs on Tile Piston

It didn’t seem to cause any issues though.


#46

Yeah, but it is causing issues, as I mentioned. It keeps on turning on my lights every 10 mins.


#47

Post the green screenshot and logs so I can check. That error isn’t the cause of your lights turning on.


#48

Thanks! Here is the snapshot. I’ll send the logs when they propagate. I had to turn the piston off, because it was turning on my balcony lights.


#49

Are you clicking on the tiles by chance in your browser?

image

This is the only coding that toggles the lights when the tiles are clicked on (phone or computer). If you are trying to open the piston, make sure you are holding the CTRL key down then click on the tile to open the piston. You could try removing that section out also to see if that fixes it.


#50

no, not clicking in the browser. Browser has been closed and it’s occurring. Although, it has not happened yet since I resumed that piston.


#51

It just happened again, and the ST app says “Light tiles send the on command to balcony lights”.

Very strange. Obviously “Light Tiles” is the name of this piston.

I noticed when I went out of the garage that the balcony light was on. I have another webcore piston that turns on a light when the garage door is open and off when it shuts. But the balcony lights tile is turning the light on and off when the garage opens and closes. It’s not the other webcore piston. I checked the logs in my ST app, and it is definitely the light tiles piston.

Could your coding have used a global variable that it should not have?? My other webcore piston is rather basic, cause I’m not a coder. The backup code is etbk7


#52

Remove the tilePressDeviceID off to see if that fixes it. There’s no global variable being used that would effect this piston so I’m not sure what the root cause is. Do you have the logs still?


#53

Here is the log. I’ve bolded (what I think) is the problem. The execute command in line 31 of the piston is not limited to the bulbs in this piston, but is turning on that balcony lights (the first in my list), when a another bulb is sent the turn on command because the garage door is open.

Received event [TV Light].level = 80 with a delay of 142ms
+737ms ║RunTime Analysis CS > 59ms > PS > 473ms > PE > 205ms > CE
+747ms ║Piston waited at a semaphore for 321ms
+750ms ║Runtime (55625 bytes) successfully initialized in 473ms (v0.2.0fb.20171026) (748ms)
+752ms ║╔Execution stage started
+767ms ║║Cancelling statement #91’s schedules…
+781ms ║║Calculating (string) off == (string) on >> (boolean) false
+788ms ║║Executed virtual command setVariable (3ms)
+811ms ║║Calculating (integer) 9 + (integer) 1 >> (integer) 10
+818ms ║║Executed virtual command setVariable (4ms)
+826ms ║║Executed virtual command setVariable (4ms)
+836ms ║║Calculating (integer) 10 - (integer) 1 >> (integer) 9
+843ms ║║Executed virtual command setVariable (3ms)
+858ms ║║Calculating (integer) 10 - (integer) 1 >> (integer) 9
+868ms ║║Executed virtual command setVariable (7ms)
+877ms ║║Executed virtual command setVariable (6ms)
+907ms ║║Calculating (string) 80 + (string) % >> (string) 80%
+915ms ║║Calculating (string) 80% + (string) 2703 >> (string) 80% 2703
+920ms ║║Calculating (string) 80% 2703 + (string) K >> (string) 80% 2703K
+926ms ║║Calculating (string) 80 + (string) % >> (string) 80%
+932ms ║║Calculating (integer) 2703 > (integer) 0 >> (boolean) true
+950ms ║║Calculating (enum) off == (enum) on >> (boolean) false
+961ms ║║Executed virtual command setTile (1ms)
+965ms ║║Cancelling statement #226’s schedules…
+971ms ║║Executed virtual command setVariable (3ms)
+993ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+999ms ║║Cancelling statement #229’s schedules…
+1003ms ║║Executed virtual command clearTile (1ms)
+1191ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+1197ms ║║Cancelling statement #229’s schedules…
+1200ms ║║Executed virtual command clearTile (0ms)
+1221ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+1229ms ║║Cancelling statement #229’s schedules…
+1234ms ║║Executed virtual command clearTile (1ms)
+1262ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+1269ms ║║Cancelling statement #229’s schedules…
+1274ms ║║Executed virtual command clearTile (1ms)
+1298ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+1304ms ║║Cancelling statement #229’s schedules…
+1307ms ║║Executed virtual command clearTile (0ms)
+1311ms ║║Cancelling statement #206’s schedules…
+1324ms ║║Calculating (decimal) 80.0 - (decimal) 1.0 >> (decimal) 79.0
+1498ms ║║An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object
+1501ms ║╚Execution stage complete. (750ms)
+1503ms ║Setting up scheduled job for Fri, Nov 3 2017 @ 10:07:04 PM AEDT (in 108.101s)
+1520ms ╚Event processed successfully (1520ms)


#54

Do you have full logs, nothing is showing to be executing a command to turn on or off any lights on those logs above.


#55

Here’s an example of lights being turned on from a piston so you know what to look for:
+704ms ║║Executed physical command [Hallway Switch].on() (18ms)


#56

I updated the temperature tiles to add an option for Celsius and add Humidity on the 3rd post above if anyone is interested. The humidity only shows if the device supports it, otherwise it’ll only display the temperature.


#57

bfara83- I’m not seeing the tiles. I have my Categories set to tiles/details. Please assist. Thanks.


#58

When you first setup a new piston, it’ll default to the first category that you have setup on the top. Make sure the first category is setup to tiles/details and then you can move the category that you want to move it to once you open it.

If you still can’t find it, log into your Smartthings hub site that you did to install WebCore then do the following:

  1. Goto My Locations on top-left side

  2. Click on smartapps under Installed SmartApps section

  3. Look for the name of the WebCore Instance you installed this piston on then click on the name that you gave the piston that you installed from the device tiles above. Below is an example of what mine looks like:

  4. This will show if it saved correctly. If you click on it and look for category, you’ll see the number of the category. For example for me it shows 4 on an example that I selected so it’ll be the 4th category from the top.
    image

If you aren’t finding it at all, try creating it again using the code using the “Restore a piston using a backup code” option.


#59

It only happens when I open my garage door, which has a piston which turns lights red if garage door is opened. That piston has no reference to the balcony lights, at all.

Here are the logs for the light turning on (for this piston). Fish tank light is the light that turns on whenever the garage door opens.

06/11/2017, 13:37:47 +19ms
+1ms ╔Received event [Fish Tank Light].level = 1 with a delay of 107ms
+190ms ║RunTime Analysis CS > 21ms > PS > 40ms > PE > 129ms > CE
+200ms ║Runtime (55563 bytes) successfully initialized in 40ms (v0.2.0fd.20171105) (198ms)
+201ms ║╔Execution stage started
+214ms ║║Cancelling statement #91’s schedules…
+225ms ║║Calculating (string) off == (string) on >> (boolean) false
+230ms ║║Executed virtual command setVariable (2ms)
+243ms ║║Calculating (integer) 2 + (integer) 1 >> (integer) 3
+248ms ║║Executed virtual command setVariable (3ms)
+253ms ║║Executed virtual command setVariable (3ms)
+260ms ║║Calculating (integer) 3 - (integer) 1 >> (integer) 2
+266ms ║║Executed virtual command setVariable (3ms)
+276ms ║║Calculating (integer) 3 - (integer) 1 >> (integer) 2
+280ms ║║Executed virtual command setVariable (2ms)
+286ms ║║Executed virtual command setVariable (3ms)
+306ms ║║Calculating (string) 1 + (string) % >> (string) 1%
+312ms ║║Calculating (string) 1% + (string) 2703 >> (string) 1% 2703
+315ms ║║Calculating (string) 1% 2703 + (string) K >> (string) 1% 2703K
+319ms ║║Calculating (string) 1 + (string) % >> (string) 1%
+324ms ║║Calculating (integer) 2703 > (integer) 0 >> (boolean) true
+336ms ║║Calculating (enum) off == (enum) on >> (boolean) false
+345ms ║║Executed virtual command setTile (1ms)
+347ms ║║Cancelling statement #226’s schedules…
+352ms ║║Executed virtual command setVariable (2ms)
+370ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+375ms ║║Cancelling statement #229’s schedules…
+378ms ║║Executed virtual command clearTile (0ms)
+400ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+404ms ║║Cancelling statement #229’s schedules…
+407ms ║║Executed virtual command clearTile (0ms)
+425ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+429ms ║║Cancelling statement #229’s schedules…
+432ms ║║Executed virtual command clearTile (1ms)
+449ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+454ms ║║Cancelling statement #229’s schedules…
+457ms ║║Executed virtual command clearTile (1ms)
+474ms ║║Calculating (integer) 11 + (integer) 1 >> (integer) 12
+478ms ║║Cancelling statement #229’s schedules…
+481ms ║║Executed virtual command clearTile (0ms)
+485ms ║║Cancelling statement #206’s schedules…
+495ms ║║Calculating (decimal) 1.0 - (decimal) 1.0 >> (decimal) 0.0
+571ms ║║Executed physical command [Balcony Lights].on() (70ms)
+572ms ║║Executed virtual command [Balcony Lights].toggle (74ms)
+576ms ║╚Execution stage complete. (375ms)
+578ms ║Setting up scheduled job for Mon, Nov 6 2017 @ 1:38:52 PM AEDT (in 64.732s)
+591ms ╚Event processed successfully (591ms)