After spending several frustrating hours trying to get my Zigbee smart plug to report current readings correctly, I finally figured it out! Here’s what happened and how I solved it.
I noticed that my smart plug was reporting current values in milliamperes (mA) instead of amperes (A). This was causing confusion in my energy monitoring setup. I tried using the Gain-Offset feature to divide the reported value by 1000, but it kept returning ‘UNDEF’. I scoured the logs and even reached out to the community for help, but nothing seemed to work.
Then, I remembered that the Modbus Gain-Offset profile can only process plain numbers without units. I realized that the issue wasn’t with the gain factor itself but with the unit attached to the value. By removing the unit from the configuration, the gain adjustment worked perfectly!
Here’s the setup that worked for me:
- Point Configuration: Label as ‘Current’, type as ‘Number:ElectricCurrent’, and category as ‘Energy’.
- Thing Configuration: Make sure the Zigbee channel for current is correctly set up with polling enabled.
This fix not only resolved the issue but also gave me a deeper understanding of how units affect data processing in OpenHAB. I’m now able to accurately monitor my energy consumption, which is a huge relief!
If anyone else is struggling with similar issues, especially with Zigbee devices, I highly recommend checking the units in your configurations. Sometimes, it’s the little details that make all the difference!
Happy tinkering! ![]()