Ok I have had my EmonPi running for many years, but latley finally made the jump to get onto current release which required repalcing the SD card and a restore.
So I am now running on:
low-write 10.2.7
But since the new SD card and backup restore SMAsolar is not logging to EmonCMS, I still see the input but there is no update to the inputs and they are N/A.
I have reviewed issues at the github page and I can’t see my problem:
https://github.com/openenergymonitor/emonhub/tree/master/conf/interfacer_examples/smasolar
I was receiving the error:
2021-02-04 10:00:38,860 ERROR SMASolar Failed to grab all the bytes needed for a Level 2 packet
2021-02-04 10:00:38,862 ERROR SMASolar [‘Traceback (most recent call last):\n’, ’ File “/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSMASolarInterfacer.py”, line 268, in read\n inverter[“serialNumber”])\n’, ’ File “/opt/openenergymonitor/emonhub/src/smalibrary/SMASolar_library.py”, line 284, in request_data\n bluetoothbuffer = read_SMA_BT_Packet(btSocket, packet_send_counter, True, mylocalBTAddress)\n’, ’ File “/opt/openenergymonitor/emonhub/src/smalibrary/SMASolar_library.py”, line 73, in read_SMA_BT_Packet\n raise Exception(“Failed to grab all the bytes needed for a Level 2 packet”)\n’, ‘Exception: Failed to grab all the bytes needed for a Level 2 packet\n’]
So I downloaded the diagnostic tool and ran a test:
sudo service emonhub stop hcitool scan python SMASolarInverterPacketDebug.py aa:bb:cc:dd:ee:ff 0000 > test.txt
I found two issues that I identified missing packages:
sudo apt install python-bluetooth
sudo apt install python-requests
This then ran absolutely fine, so I restarted EmonHub with my fingers crossed… but no updates still.
I am now getting in the log:
2021-02-04 10:49:49,734 ERROR SMASolar ‘<’ not supported between instances of ‘int’ and ‘str’
2021-02-04 10:49:49,736 ERROR SMASolar [‘Traceback (most recent call last):\n’, ’ File “/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSMASolarInterfacer.py”, line 283, in read\n for key in sorted(output):\n’, “TypeError: ‘<’ not supported between instances of ‘int’ and ‘str’\n”]
So I am now a bit lost, as all worked before and I would seem to have the latest code and suspect I might have hit some compatibility with the existing code and a newer library?
I also don’t see others with the issue, so it could be my config or other missing packages?
Tagging @stuart who I think wrote the code in case he can help - any suggestins welcome