ecylcje
(Chris Eagles)
6
Hi,
As an update to all this I have finally managed to get the Sontex Supercal 5 to work with emonhub. I needed to make a few changes:
Firstly I only ran the following from the usefulscripts section:
- Stop emonhub
sudo systemctl stop emonhub
- Try to read a data from from the Sontex using the usefulscripts/mbus/mbus_request_data_5b.py script:
python3 /opt/emoncms/modules/usefulscripts/mbus/mbus_app_reset.py
python3 /opt/emoncms/modules/usefulscripts/mbus/mbus_request_data_5b.py
I didn’t run any of the next steps, because no matter what I tried they just reverted things to a failure mode.
I then changed the following line in the file:
ie 0x5b to 0x7b in line 402
/opt/openenergymonitor/emonhub/src/interfacers/EmonHubMBUSInterfacer.py
def request_data(self, address, records):
for i in range(0,2):
self.mbus_short_frame(address, 0x7b)
# time.sleep(1.0)
result = self.read_data_frame(records)
if result!=None:
return result
else:
time.sleep(0.2)
Once I did all this then the results started working.
As a note I did received back from Sontex the Supercal MBUS interface specifications: M-Bus Frames SC5 - 2023-08-21 - 1.0.5.pdf
Thanks all,
Chris
1 Like