@Jimxenus Thanks for the thought. No doubt the mains are in there, but the box is sealed with a tag by the local power company (likely to keep people from stealing power ahead of the meter?). I had thought about calling them for temporary access to install the HEM, but no too sure I want to deal with that.
I understand, I had an electrician put my HEM in and Iâm pretty sure he went underneath that panel to access the mains. Itâs dangerous underneath there so the seal is more likely used to keep people out of there for safety reasons.
Well thatâs good information; perhaps I should phone the utility to ask. Much appreciated.
Trying to figure out what I have done wrong with the device handler code that @Dillon_Miller has kindly provided above.
I copied all of the code and created/published the device handler via the IDE. Seemed to be published and saved okay. Then I included the HEM5, which was successful, but it just shows up as a generic device (e.g. the mobile app shows and on/off icon with slider)?? Obviously Iâm missing a setp here but cannot determine what it is?
TIA,
Shawn
Hi @ShawnInPaso,
If you used the code from post #12 above, and did not change the name, then in the IDE change Type to âAeon HEM Gen5(zwave plus)â and leave Version as it is (Published).
Thank you John for your help.
I failed to update my post by indicating I did change the name as you described (found it at the bottom of the list). It is at âpublishedâ. Still no data though.
Well I am now getting data, but not all of it. Progress.
Shawn
Sorry all, Iâve been away for a while. @ShawnInPaso, be sure to hit the configure tile inside the Things list device display. You may also want to change the preferences such as your personalized cost/kWh or the reporting intervals. For most, the intervals are likely fine. However, the cost is critical or itâs kinda a useless field on the display tile list.
The configure button does more than it seems by just hitting it which is actually less than exciting in and of itself. However, this is an odd device class to say the least. It is both polled by the ST hub and also sends its own reporting data to the ST hub. So in that way, itâs both passive and active at the same time. It is passive in the sense that the ST hub will poll the HEM main class to get voltage and such which is a product of the power feeding the HEM unit from the wall plug. It is active in the sense that the device collects data from the clamps (over time) and then sends this data to the ST hub using the set preferences. If you donât hit the configure button, you likely wonât ever see the clamp data.
In short, if you are seeing only partial data from the device, you may simply need to check your preferences using the upper right gear icon, then hit the big configure tile button and wait a bit.
Hi @Dillon_Miller, thanks so much for your kind reply (not to mention the great code).
I have been hitting the config button and doing those other things you suggest (also based on your good notes in the code), yet still no clamp data. I have also been in touch with Aeon, mostly to inquire if this issue could be due to a hardware issue or perhaps because of the clamp placement. I did learn that the âright nowâ voltage (shown in the example below - I get the info circled in red) is taken from the wire that powers the device (not from the clamps).
Iâve watched the live logging a lot, and I do get the response when pressing the config button as expected. I also see the kw and kwh values being passed, but no voltage or current data.
Would you have any thoughts on the issue being with the clamps? Hard for me to imagine as the kw and kwh are being seen, but I am learning a lot with this device.
Much appreciated,
Shawn
Live Log Response form pushing the config button:
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:09 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 113 with a byte size of 4 is set to [0, 0, 0, 6]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:09 PM: debug âASSOCIATION REPORT V2â Energy Monitor groupingIdentifier: 1, maxNodesSupported: 5, nodeId: , reportsToFollow: 0
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:09 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 112 with a byte size of 4 is set to [0, 0, 0, 30]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:08 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 111 with a byte size of 4 is set to [0, 0, 0, 60]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:04 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 103 with a byte size of 4 is set to [0, 0, 0, 0]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 101 with a byte size of 4 is set to [0, 27, 27, 15]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 8 with a byte size of 1 is set to [5]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 4 with a byte size of 2 is set to [0, 10]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:12:00 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 3 with a byte size of 1 is set to [1]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 12:11:52 PM: debug Sending configure commands - kWhCost â0.19514â, monitorInterval1 â60â, monitorInterval2 â30â, monitorInterval3 â6â
What youâre describing is totally normal IF the unit isnât sending itâs report data or, the reporting data being sent is not being processed by the ST hub. Volts, kWh, and Both Totals Amps/Watts (I believe) are a base function of the unit and is part of the passive data collection thatâs done by ST hub. Iâm probably not saying exactly the way itâs done but the point is that the clamp data is/was more complicated to gather and thatâs where I had the most challenge when I adapted the code to work on this unit. If they have changed the messages being sent, you will see no clamp/pole 1/2 information but could totally still see the other info you have circled above.
I wonder if possibly the secure encapsulated messages for sourceEndPoint 1/2 are not being processed. Perhaps this is a silent updated version of the HEM Gen5 and the firmware is sending misunderstood messages⊠itâs just a thought but you can start by enabling some of the debug logging that i left in the code.
If you look through the code youâll find a number of remarked out logging options as such:
Just take out the â//â and only if itâs at the start of a line. There are other entire sections commented out that might have log.debug⊠also but donât mess with them as the entire section was found to be bad/unneeded and there are comments to that effect for those.
In my editor itâs at lines:
195, 202, 294.
What youâre looking for then is back int he IDE, under live logging. Perhaps some message about unprocessed zwave event or something similar. Maybe also encapsulated meter data⊠if you send back all that you get from the live logging for this unit over say, 2 minutes after hitting config again, that would likely be all I need to help with diagnosing.
Be sure to update the âMyDeviceHandlerâ code to unremark the debug lines and also to save/publish AND refresh the thing list on your mobile device BEFORE you hit config and ALREADY have live logging setup! LOL sorry for the caps. I learned the order of things the hard way.
Thank you so much for all of the extra help and knowledge @Dillon_Miller. I will try these actions a little later tonight and let you know what it reveals.
Well @Dillon_Miller, I had to take a quick look before I got too busy. Iâll have a longer look a little later.
I followed your instructions for the debug lines, etc., here are some initial results.
The live log now displays data that I do see on the mobile app (volts, amps, watts, kwh). Previously the volts and amps did not show up in the live log, just on the app. Not sure what the pole data would look like, but I donât think it is showing in this brief look.
I stripped all of the non âenergy monitorâ info from this log capture.
Thanks again.
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:52 PM: debug Parsed 'zw device: 1B, command: 3202, payload: A1 64 00 01 DC DE 00 00 00 00 00 00 â to [ânameâ:âvoltageâ, âunitâ:âVâ, âdisplayedâ:true, âvalueâ:122.078, âisStateChangeâ:true, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor voltage is 122.078 V]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 74 00 00 18 C5 00 00 00 00 00 00 â to [ânameâ:âpowerâ, âunitâ:âWâ, âdisplayedâ:false, âvalueâ:6, âisStateChangeâ:false, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor power is 6 W]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 64 00 00 14 36 00 1D 00 00 14 36 â to [ânameâ:âenergyâ, âunitâ:âkWhâ, âdisplayedâ:false, âvalueâ:5.174, âisStateChangeâ:false, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor energy is 5.174 kWh]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug Parsed 'zw device: 1B, command: 8503, payload: 01 05 00 â to null
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:51 PM: debug âASSOCIATION REPORT V2â Energy Monitor groupingIdentifier: 1, maxNodesSupported: 5, nodeId: [], reportsToFollow: 0
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 65 04 00 1B 1B 0F â to null
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 101 with a byte size of 4 is set to [0, 27, 27, 15]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 04 02 00 0A â to null
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 4 with a byte size of 2 is set to [0, 10]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 08 01 05 â to null
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 8 with a byte size of 1 is set to [5]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 66 04 00 00 00 00 â to null
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 102 with a byte size of 4 is set to [0, 0, 0, 0]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug Parsed 'zw device: 1B, command: 7006, payload: 03 01 01 â to null
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:42 PM: debug âCONFIGURATION REPORT V1â Energy Monitor parameter 3 with a byte size of 1 is set to [1]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:33 PM: debug Sending configure commands - kWhCost â0.19514â, monitorInterval1 â60â, monitorInterval2 â30â, monitorInterval3 â6â
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:28 PM: debug Parsed 'zw device: 1B, command: 3202, payload: A1 6C 00 00 00 62 00 00 00 00 00 00 â to [ânameâ:âcurrentâ, âunitâ:âAâ, âdisplayedâ:false, âvalueâ:0.098, âisStateChangeâ:false, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor current is 0.098 A]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:25 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 74 00 00 18 E2 00 00 00 00 00 00 â to [ânameâ:âpowerâ, âunitâ:âWâ, âdisplayedâ:false, âvalueâ:6, âisStateChangeâ:false, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor power is 6 W]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:49:23 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 64 00 00 14 36 00 42 00 00 14 36 â to [ânameâ:âenergyâ, âunitâ:âkWhâ, âdisplayedâ:false, âvalueâ:5.174, âisStateChangeâ:false, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor energy is 5.174 kWh]
023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: info data sent
023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: debug sending data
023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: debug event [name:energy, deviceId:f7c399d2-6372-43e0-92f3-d99b6faa8a00, isoDate:2016-11-15T01:48:16.510Z, unit:kWh, value:5.174, timestamp:[.sv:timestamp]]
023a3c33-814e-45a3-81fd-4098cb701a1f 5:48:18 PM: info a sensor event occured
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:48:18 PM: debug Parsed 'zw device: 1B, command: 3202, payload: A1 64 00 01 DB E6 00 00 00 00 00 00 â to [ânameâ:âvoltageâ, âunitâ:âVâ, âdisplayedâ:true, âvalueâ:121.830, âisStateChangeâ:true, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor voltage is 121.830 V]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:48:18 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 64 00 00 14 36 1E FE 00 00 14 11 â to [ânameâ:âenergyâ, âunitâ:âkWhâ, âdisplayedâ:true, âvalueâ:5.174, âisStateChangeâ:true, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor energy is 5.174 kWh]
f7c399d2-6372-43e0-92f3-d99b6faa8a00 5:48:18 PM: debug Parsed 'zw device: 1B, command: 3202, payload: 21 74 00 00 18 AD 00 00 00 00 00 00 â to [ânameâ:âpowerâ, âunitâ:âWâ, âdisplayedâ:false, âvalueâ:6, âisStateChangeâ:false, âlinkTextâ:âEnergy Monitorâ, âdescriptionTextâ:Energy Monitor power is 6 W]
ae058138-1751-4585-8e66-84c84c484e70 5:48:14 PM: debug updating TS
5:47:28 PM: info Waiting on eventsâŠ
5:47:28 PM: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.
5:47:28 PM: info This console provides live logging of your SmartThings.
Thanks for the debug info. I enabled the same debug lines in my own device, saved, published (for me) and refreshed the app (pull down+release) then hit the configure button to spark some action⊠here is the key info that I see in mine, and I donât see in yours:
125dcc85-5d0e-4fd4-8a2d-aaf228d26bb8 ?11?:?24?:?10? ?AM: debug Command from endpoint 1: MeterReport(deltaTime: 0, meterType: 1, meterValue: [0, 0, 18, 152], precision: 3, previousMeterValue: [0, 0, 0, 0], rateType: 1, scale: 5, scale2: false, scaledMeterValue: 4.760, scaledPreviousMeterValue: 0.000, size: 4)
125dcc85-5d0e-4fd4-8a2d-aaf228d26bb8 ?11?:?24?:?10? ?AM: debug encapsulated: MultiChannelCmdEncap(bitAddress: false, command: 2, commandClass: 50, destinationEndPoint: 0, parameter: [161, 108, 0, 0, 18, 152, 0, 0, 0, 0, 0, 0], sourceEndPoint: 1)
So, in reverse order⊠there is first the debug encapsulated line. This encapsulated data came from my HEM Gen5 unit and specifically from sourceEndPoint 1 which is clamp 1. Itâs not of much use on its own until itâs un-encapsulated by the ST hub according to the code starting at line ~285:
def zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd) {
def dispValue
def newValue
def formattedValue
def MAX_AMPS = 220
def MAX_WATTS = 24000
if (cmd.commandClass == 50) {
This class is what looks for âcommandClass: 50â in the encapsulated junk from the HEM and pulls it apart and reads the individual clamp 1/2 data.
Then there is the real data that is extracted from the encapsulated junk which is the âdebug Command from endpoint 1â line. This has the real meter values from clamp 1. There should be another set of encapsulated/extracted lines from endpoint 2 or clamp 2 also.
Can you send me the exact version/rev thatâs on the unit you purchased and also the output of Raw Description from the My Devices tab for your HEM?
Mine looks like this:
Raw Description 0 0 0x3101 0 0 0 e 0x5E 0x86 0x72 0x32 0x56 0x60 0x70 0x59 0x85 0x7A 0x73 0x98 0xEF 0x5A
Some of these HEX numbers represent the command classes that are advertised by your specific associated devices and I wonder if yours are the same.
I thought I remembered you mentioning somewhere above that you had to manually set your HEM to this device class!?
if Aon changed the command classes or class versions that might explain this.
Oh, also, check in your My Devices to make sure it doesnât say inactive⊠mine did that a while back and looked like it was fine but stopped tracking all data points.
Hey @Dillon_Miller - My apologies for missing your message 21 days ago. I feel really bad about your time and expertise helping me only to have not seen your message.
Over the past couple of weeks or more, I have also been in touch with Aeon Labs. An engineer there has also been providing help. He sent me a known working HEM5 in exchange for the one I had. Just tonight I installed the HEM5 from him, and voilaâ it works.
So I am not sure if the HEM I had was bad, or maybe improperly installed? Either way, it works now and I couldnât be happier about it.
Thanks so much for the help and of course for the awesome code !
Shawn
PS. Sorry I donât have the data you requested from the other HEM I had; if there is something I can glean from the new HEM I have please let me know and Iâll get it to you ASAP.
No problem at all Shawn. I too have been busy and to be honest, forgot all about this thread again :)⊠that time of year ya know. I noticed in the email regarding your response that there was a note about not seeing the cumulative kWh, Iâm assuming you see it now since you edited that out of your reply?
That time of year for sure @Dillon_Miller. Yes, after I wrote my original reply, I recalled the device manager is used to populate the fields for cost and frequency of updates, after which the remaining values appeared immediately. Works really nice now, thanks again so much!
Just wanted to share my experience. I hate working with electric and installing one of these was my least favorite thing Iâve installed. I thought installing 25 smart switches, some being 6+ gang boxes sucked. Something about working around constant live power did not thrill me. I should have shut the main, way less stuff to touch by accident.
The clamps are easy enough to put on and I took my time being careful not to touch anything.
I used the device handler code provided. Added the device via the smart app and changed the type in the IDE. I was getting no data, and when I went to configure Iâd get a refresh error. No way to edit the parameters, or even remove the device without. I used the updated preferences from post #26 (thank you tgrimmer). I could then load the preferences, but still no data, and now could access the remove device.
Back to the box, (UGH) moved around the clamps, no luck. I removed the device from within the smartthings app, and added it again. Started getting instant readings. IDK why it took two times, but its working great. Iâll see how accurate it is over time.
Thanks for all the work @Dillon_Miller and @tgrimmer, and all the other people that contributed to this thread.
Hi Dillon,
I keep getting:
No signature of method: script14819906230271631489553.metadata() is applicable for argument types: (script14819906230271631489553$_run_closure1) values: [script14819906230271631489553$_run_closure1@3e410f62] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)
Am I doing something wrong?
Thanks
NM. I see I was adding it as a smartapp, not a devicehandler.
will Dillonâs code work for one-phase HEM Gen5?