SmartThings Community

NEW: Aeon Home Energy Monitor v2 Device

dth_powermeter

(Barry) #21

Yep - I think it’s time to call in ST support…

Come to think of it, this might be related to the Android UI, although I did see the problem this morning on my iPhone.


(Matt) #22

I was able to get it to display by removing the exclusions for the decoration flat, however as you know then it loses the colors and the circles. I have to do more digging but I"m pretty sure it has to do with changes must of happened for the styled circles.


(Beckwith) #23

Ahh, I believe this is a known bug on Android. I thought I saw this before.


(Brock Haymond) #24

For anyone with the HEM v1 I have retrofitted this latest version with GUI, color, and text updates. You can just remove the commented out code to include v2 compatibility again if desired.


Aeon Labs Home Energy Meter
(Barry) #25

I like the UI changes - nice work.

One change you may wish to reconsider - using the color spectrum for only 0-3000 Watts is sort of limiting for a home with 200Amp service (roughly 18,000 Watts @ 120 Volts). making everything above 3000 Red might be right for some homes, but one with one or two A/C condensors, electric ovens, an induction stove, a fridge and a freezer is going to run more like 7-8000 many times during the day.

Dynamic tiles are reportedly coming soon, so we may see a more dynamic UI and a single device that supports both V1 and V2…

Thanks!!!


(Brock Haymond) #26

Good catch, it is true I actually customized the color scheme to suite my home electrical usage (which is very low) =). Maybe the best way to do it would be to add a high/low range to the preferences and then auto-generate the color spread from that? I’m not sure where you are located but I also prefer to not have leading 0s on the numbers in time and AM/PM instead of military time. If we can merge our code to one that will dynamically work with either v1 or v2 then we can return to a single master trunk! Thoughts?

Thanks!


(Brock Haymond) #27

Actually in thinking about it we wouldn’t need a low range, we would prob just leave that at 0. So we would only need a high range in order to generate a dynamic color spread…


(Barry) #28

Unfortunately, we cannot dynamically define the colors in a ST device yet - at least, I haven’t been able to figure out how to do that yet.

I’m going to merge your code into mine in a minute or so. Note that I don’t think you need to comment out all the code that sends the events that the V1 doesn’t have - they should never get generated. Likewise, you don’t need to comment out the unused tiles, either. All you need to do is to comment out the tiles that you don’t want shown.

I should be able to tell which of the two devices you have also…IIRC.

Let’s see what I come up with.


(Brock Haymond) #29

Agreed. I actually just commented those lines out last minute. The entire thing can prob remain as it is for both with the only line needing to change being line 212:

details([“energyOne”,“energyDisp”,“energyTwo”,“powerOne”,“powerDisp”,“powerTwo”,/“ampsOne”,“ampsDisp”,“ampsTwo”,“voltsOne”,“voltsDisp”,“voltsTwo”,/“reset”,“refresh”, “configure”])

If we could just show or hide the tiles as needed for v1 or v2 we should be good to go. As for the Xively logging, however, that might be a little more tricky trying to use the same code for both and not get several empty graphs for v1 users…


(Barry) #30

Try this version:

As for Xively, it’s easier (and more proper) to simply not get or send the Amps or Volts metrics in the SmartApp…nothing says you have to send all the available values. In in fact, in the Xively SmartApp, you could simply check to see if the values of Amps/Volts are “” or null, and not send them if they are.


(Brock Haymond) #31

I’m wondering what these errors are:

30a63a8c-31d8-4af4-8427-658de98f67da 3:42:44 PM MDT: debug Parse returned null
30a63a8c-31d8-4af4-8427-658de98f67da 3:42:44 PM MDT: debug Unhandled event SensorMultilevelReport(precision: 3, scale: 0, scaledSensorValue: 218.020, sensorType: 4, sensorValue: [0, 3, 83, 164], size: 4)

Mkay here is what I got:

It is probably best to leave the refresh and config buttons for consistency with all smart things apps. I removed some extraneous code and added low and high to all text values on the left and right. Let me know what you think.

+edit
We could prob also handle the battery event. I’ll take a look at that one.

30a63a8c-31d8-4af4-8427-658de98f67da 3:55:14 PM MDT: debug Unhandled event BatteryReport(batteryLevel: 0)

+edit
Lol nvmind I already finished adding the battery. Now I just need to put in some batteries!

+edit

Fixed parse returned null bug.

+edit

Here is the spec sheet:
http://www.pepper1.net/zwavedb/device/65


(Barry) #33

The V2 doesn’t have a battery, but then again, it shouldn’t see the battery events.

I think we’re getting close, though, to a version that requires minimal edits to support both versions.

Nice work!


(Edward Pope) #34

Great work both of you. The only thing I would add would be the ability to select “energyTwo” Cost and have it be one of the values you can select to be on the app. I had already done most of this in my code. Which was based off of Storage’s work. Although I worked from the ST version and improved on it. I hate extra code that has little value to me (SMILE).

Anyway I am not as good as you guys are, came from the C+ and ASM days. This is fun though (SMILE)


(Barry) #35

Edward -

I’m not sure what you mean - the cost/kWh is settable via the device preferences. Since this is a device, and not an App, preferences aren’t as fancy.

But perhaps I miss your point.

FWIW, my first programming language was APL, so this Java/Groovy stuff is rather tedious (though not as bad as COBOL).


(Barry) #36

I’m not a fan of putting the words “Low” and “High” in the side displays, because it forces the text to be smaller than the middle bubble(s). To each his own, I guess.

Thanks for the parse bug fix, though…


(Barry) #37

On the batteries - I think you need a

sendEvent(name: "battery" ...

some where in there, don’t you?


(Edward Pope) #38

Hey guys,

Noticing that after I did the last update that all the settings except the low and high info are showing as “–”

Any reason that I am not aware of for this? Using HEMv1 btw for the hardware.


(Edward Pope) #39

What I am talking about is when you look at the app, you can set the tile to show certain information. I allow that to happen as well for energyTwo (the cost). So when I pull up the tiles, I can look at the main tile and see the cost. Then if I want more data, I go into the app itself to look over the other data being presented,


(Barry) #40

Ahh…gotcha. Added.


(Edward Pope) #41

Thanks so much, now I need to figure out why the status displays are reading as “–” even after 24 hours. I replaced back with my adjustments to the original code, and that appears to be working ok.

Do either of you have any idea what is going on here? @Slowfoxtrot are you using Android or IOS devices? Wondering if I am running into the Android bug with this device handler?