Aeon HEM DTH stops reporting data - help needed to debug

I recently extensively modified an existing Device Type to provide better Android support for the AEON Home Energy Monitor (HEM) v2. It seems to work fine with the exception that every so often it stops reporting data back to ST - it freezes - as if it received data it cannot handle and therefore just drops communication or something… maybe crashes, not sure. It appears that the total kWh counter jumps forward when I reset it by power cycling it so it may still be running internally however ST is not getting any of the data.

Can someone kindly help me figure out what is wrong? I am not a professional developer so I am struggling to even debug this.

Github: Aeon-HEMv2-Gen2-SmartThings-Device-Handler


The DTH stopped reporting data again… Reviewing the log it appears that just before it halted, the power being used was over 11,000 W so I wonder whether a larger than usual value is causing the issue. I thought the variable used had no issues with holding a 5 digit integer but I may be wrong. Anyone?

I installed this dth, but only a couple of the tiles show up. Is there something I need to do? My screen doesn’t look anything like your post above.

@Jwwhite - Are you using the version 2 model for the USA? There are a number of different models, one with battery, a new one with Zwave Plus support, and a number of models for other regions where only one phase is used. The DTH I hacked up is for the USA 2 phase model, second revision. When you first install it, it may take a while before data populates however the tiles should always show up. As mentioned in the post above, at times it just stops reporting however I have found that turning it off (I installed it behind a dedicated breaker in the main panel outside) for a second and back on fixes the issue. I am not sure yet why it does that however it is not very frequent at this point.

If you are not using the model shown above, this is not the right DTH. Also, I am not a developer so although the DTH is mostly working for me, I can’t say it is written correctly.