nmakel/sdm_modbus

AttributeError during loading of module

bosgnoom opened this issue · 1 comments

Hello,

Recently I have obtained a SDM120M meter. After installing I found your excellent work here.

However, during loading of the module (Raspberry Pi, running bullseye) I encounter an AttributeError: Big. I could trace this error back to meter.py, line 54 and 55, where the word and byteorder are set as Endian.Big. As this is imported from pymodbus (version 3.5.0 from pip), I checked the source of that and concluded the Endian is defined as BIG instead of Big.

Capitalizing this results in me being able to run the example program, outputting the readings of my SDM meter. I assume this is not raspberry pi / debian specific, as I am able to replicate this error on my laptop running Fedora.

As I am not a programmer by education, I will try to fork this repo and make a pull request fixing this. Doing something for the first time :)

Best regards

Should be fixed in version 0.7.0.