Smartthings plug as energy meter


(Jon) #1

I know the ST outlet measures power but is there a custom device handler that can be used so it measures energy usage, if indeed it is actually capable of doing so?


#2

You want to measure the power consumption for a period of time?


[RELEASE] Iris Smart Plug (3210-L) Zigbee Plug with Z-wave Repeater
( I hate Mondays) #3

Yeah, I modified mine to sum up power x time into an energy meter. I can share it a bit later when I get to a PC.


( I hate Mondays) #4

UPDATE: I got to a Mac. LOL

Find it here: https://raw.githubusercontent.com/ady624/CoRE/master/devicetypes/ady624/enhanced-smartpower-outlet.src/enhanced-smartpower-outlet.groovy

It’s essentially keeping track of last power update time and value and on any new update, it times the time since last update with the last value and adds it to an energy attribute, assuming power did not change much since. It is not perfect, but better than nothing. Normally, energy metering should be performed within the device, for maximum precision…


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #5

Great work!… I’ve “planned” to do this exact tinkering for quite a while, but … well… it was just a good intention.


(Jon) #6

That’s perfect, thanks for this!!


(Jon) #7

Just a quick question, added this handler. What would i need to alter so it just showed consumption in Kwh instead of wh. Sorry for being pedantic!


( I hate Mondays) #8

Divide by 1000? The reason I used Wh is precision. Where it gets added to the energy, you need a / 1000.