Power Monitor v0.3.02

tiles
power
piston

#1

This variation of @Nezmo’s Status - House Power Usage piston gets away from the gauges. I just felt that so many gauges for a single device made the dashboard too cluttered for my taste. So, I packed all the information in to a single tile and made the piston so it could handle up to 16 devices.

Power%20Monitor%20v0_3_02%20Tiles

Unfortunately, the Font Awesome text transform feature isn’t working currently and there is no fine control over the counter positioning and it also prevented me from adding the Watts calculation. Once the text transforrm is fixed I’ll update this piston with better positioning of the counter and I’ll add the Watts calculation as another counter (counter-like) element. One of my devices (Plant Light) doesn’t report voltage so I have a conditional to set voltage to 120V for those type devices instead of using the reported value. The voltage displayed could also be rounded to keep it from getting too small or the counter size could be made larger.

v0.3.01: Corrected an issue where the voltage was set to 120 V ignoring the devices value.
v0.3.02: Fixed the decimal places in the cost to 2 (Won’t show cost as $0.1 but as $0.10). Updated the icons to feature more depth.


#2

Nice job.

I got carried away with gauges. It may be time for me to rationalize things a little.


#3

@Nezmo Don’t get me wrong, I plan to use your piston with the gauges for the whole house power monitoring (once I get the Aeotec). You did some fine work and it’s appreciated. :clap:


#4

Didn’t take you wrong at all, no worries. And thanks!


#5

Here’s a minor update adding fuel streams to the Power Monitor. Since fuel streams are still in beta testing, I’ll add this as a separate piston from the original.

Fuel streams are added for events from each of your power monitored devices power, energy, voltage and switch changes plus aggregates for power and energy under the category Electricity. So, you will have Electricity category showing data streams for the sum of Watts (power) and sum of kWh (energy) for all powered devices combined plus Electricity \ (device name) categories for each device showing data streams for it’s voltage, power, energy and switch events.

Power Monitor with Fuel Streams v0.3.02fs:
See a discussion of this piston.

Keep in mind, fuel streams are in beta and subject to change and instability. You can not currently delete old fuel streams.


#6

Ouch! Writing 5 data points to fuel streams each time any of the 3 devices changes?!?

temp

You are going to flood your system (and @ady624’s server) with spam non-stop! I expect your SmartHome and home network will become quite congested, and other pistons will stop responding reliably.


#7

Looking in to that, I am seeing more semaphores so I’ve removed the piston while I look at reducing the data points being reported. Perhaps I can limit data collection to only the device with the event so there’s only the two overall points and the data points for that individual device.

Edit: looking more closely, the semaphores were mostly before the changes. The only place where I see semaphores that may be related to the data points collection are in the Power Monitor piston itself. I’m not experiencing any other issues nor does there appear to be any issues with congesting the network. Memory use isn’t showing as an issue either. Looking at the frequency of hits, I counted 32 hits in one hour. I can’t speak to what @ady624 's server can handle but if it’s too much, let me know. In the mean time, I’ll continue to monitor the situation for problems.

Edit 2: Further investigation shows much fewer data points for the individual devices so it appears that not all data points are written with each change event. In the image below, you can see the different data points for each individual device do not line up and in some cases have big gaps. They also don’t seem to be causing a flood of data at least during this two hour period. (estimate 35 hits/hr x 6 points/hit (4 points for the device and two for overall) = 210 data points/hr)

Edit 3: No new semaphores over several hours so data collection doesn’t seem to be responsible for those. All systems operating as expected, no signs of congestion. Data points look pretty consistent for the devices, so I’ll say each device is reporting roughly every 5 min for 12 hits per hour per device for 3 devices and 4 data points that’s 240 data points per hour including the two overall data sets. Crunching some numbers, if all 16 devices are in use that would work out to 12 x 16 x 6 = 1152 data points per hour (19.2 data points per minute or ~1 every 3 sec.) at the upper limit of what the piston would produce.


#8

Still quite a lot (in my opinion), but I would have thought it would be more, since power & energy fluctuates moment by moment when any device is drawing power.

I admit, I have a few rare cases where I log often, but I only use it briefly during testing, and then I slow the fuel streams down to a reasonable level. Maybe I am just over-cautious, but when I first saw that posted in the “Example Pistons” category, it made me extrapolate, imagining of all the other users copying your piston, and really having an impact to the server that we are all using…

I never thought I would say this, but thank you for hiding that piston from others. I am sure ady would thank you as well if he was around. :+1:


#9

Power Monitor v0.3.04:
Here’s an update to the Power Monitor to allow for refreshing all values and resetting the kWh value since you can no longer do so through the SmartThings app. To prevent accidental resets, a separate tile is opened for the reset function.

Power%20Monitor%20with%20Reset

When you click/tap/press a Power Monitor tile for a device, it will refresh that device and update the values. In addition a separate Reset tile will appear for (up to) 15 seconds. Clicking the Reset tile will reset that specific device and clear the kWh value (to zero). The reset only affects the specific device not all the tiles. if you don’t click the Reset tile while it’s present then the kWh value will NOT reset.

Setup Notes:
Uses a global variable, @resetHEM to pass the device of the clicked Power Monitor tile to the Reset tile. You can do this on the right side of the piston edit window using the +add new global variable option. You do NOT need to specify the device (Plant Light in the example), that will be done programmatically.

Setup%20Global%20Variable

In each piston where it points to the Reset tile piston, you will need to edit the piston to point to the location of the Reset tile piston in your setup.

Power Monitor v0.3.04:

Reset Home Energy Device v00.01.00: