Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNA Solar - Bad Address Errors #185

Open
delboy711 opened this issue Dec 2, 2022 · 1 comment
Open

SNA Solar - Bad Address Errors #185

delboy711 opened this issue Dec 2, 2022 · 1 comment

Comments

@delboy711
Copy link

Hi, I have been using @stuartpittaway 's original SMASolar code for many years, but am now building a new emoncms system based on a VM running on an x86_64 server. All is well so far apart from getting SMASolar working with emonhub.

Bluetooth works OK and I can connect to my inverter with bluetoothctl but emonhub is failing when trying to initialise the connection.

2022-12-02 13:36:18,606 INFO     SMASolar   Opening bluetooth address 00:80:25:32:30:55
2022-12-02 13:36:19,635 DEBUG    SMASolar   initaliseSMAConnection
2022-12-02 13:36:19,670 ERROR    SMASolar   Bluetooth Error
2022-12-02 13:36:19,671 ERROR    SMASolar   [Errno 14] Bad address

I assume the bad address refers to the Inverters Bluetooth address, but if I change it to any other address I get a message
[Errno 112] Host is down so the address seems to OK.

Any suggestions as to what could be the problem?

By The Way:
There is a little bug EmonHubSMASolarInterfacer.py at line 145 decoding error codes

errCode = eval(err[0])[0]

Python objects to the line because err is not subscriptable.

My Python skills are dreadful so I did not attempt to fix this bug so I just replaced the line with

                errCode = err
                print(err)```

which reveals the error codes
@delboy711
Copy link
Author

Ok I think I have found the problem. There seems to be an issue with Pybluez release 0.23 causing the error.
Pybluez-0.22 is Ok

I now have emonhub and SMASolarInterface working perfectly on a Debian 10(Buster) VM. I will try again with Debian 11 and a compiled version of PyBluez-0.22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant