Given I was unable to find a device handler that worked properly on Android, I decided to create my own however not having much programming experience I started off by using Barry A. Burke’s code. I made significant changes which enabled better Android support (I have no idea if there are issues with other OSs) and eliminated functionality I did not want/need. However these changes have also restricted this device handler to only support HEM v2 on a hub v2.
There seems to be very scarce documentation to aid me in the development of this device handler and any attempt to get pointers from ST resulted in “ask the community” so here I am.
The device handler is here:
The issues I am having are:
Every so often the device seems to stop sending reports as if it were crashed but when I shut power on/off to it, the overall kWh counter seems to have progressed leading me to believe it simply was no longer sending me data but it was actually still working. The only pointer I got from ST was that maybe the device handler received data it did not know how to handle however this happens randomly with many days in between.
The numbers in the tiles shift downwards after you scroll up or down a bit. I cannot find any documentation on formatting the text in those tiles. Given the ST app is made for phones, when I try to use this device handler on a tablet, the numbers never seem to be pushed downwards as the tile and circle are much larger.
I believe the delay value for each report has to be provided in hex. Given I was trying to make these delays configurable, I need some way to convert decimal to hex.
I do not believe you are forced to enter defaults when you install the device handler the first time. I believe I handle this in the code but it would be best to have proper defaulting functionality.
Below are a few screenshots of the device handler.
This screenshot shows the formatting issue: