My bluetooth connection with SMA-converter stopped working. First it got unreliable (working for minutes hours or days), now not anymore.
I read Emonhub: Bluetooth not available
I updated everything, including an apt-get dist-upgrade of the emonPI - not sure if that was a good idea.
So, what I have is this error message:
2021-06-09 20:15:19,046 ERROR SMASolar [Errno 110] Connection timed out
2021-06-09 20:15:19,047 ERROR SMASolar Bluetooth error while connecting to 00:80:25:21:55:8D
2021-06-09 20:15:19,047 ERROR SMASolar 'BluetoothError' object is not subscriptable
2021-06-09 20:15:19,049 ERROR SMASolar ['Traceback (most recent call last):
File "<string>", line 3, in connect
_bluetooth.error: (110, 'Connection timed out')
During handling of the above exception, another exception occurred:
'Traceback (most recent call last):
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSMASolarInterfacer.py", line 132, in _open_bluetooth
btSocket.connect((inverteraddress, port))
File "<string>", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSMASolarInterfacer.py", line 223, in read
self._login_inverter()
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSMASolarInterfacer.py", line 64, in _login_inverter
self._btSocket = self._open_bluetooth(self._inverteraddress, self._port)
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSMASolarInterfacer.py", line 140, in _open_bluetooth
errCode = eval(err[0])[0]
TypeError: 'BluetoothError' object is not subscriptable]
If I look on the pi at the connection, i see
pi@emonpi:~ $ hcitool con
Connections:
< ACL 00:80:25:21:55:8D handle 0 state 5 lm MASTER
pi@emonpi:~ $ hciconfig dev
hci0: Type: Primary Bus: USB
BD Address: 00:16:38:3A:3A:8D ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING
RX bytes:201087 acl:4136 sco:0 events:5670 errors:0
TX bytes:87773 acl:3986 sco:0 commands:2060 errors:0
I doesn’t want to give me any information:
pi@emonpi:~ $ hcitool info 00:16:38:3A:3A:8D
Requesting information ...
Can't create connection: Operation not permitted
pi@emonpi:~ $
So to me it looks like there is some form of connection.
I don’t know enough python to see what is causing the error.
Server info:
Server Information
Server Information
Services
- emonhub :- Active Running
- emoncms_mqtt :- Active Running
- feedwriter :- Active Running - sleep 300s 272 feed points pending write
- service-runner :- Active Running
- emonPiLCD :- Active Running
- redis-server :- Active Running
- mosquitto :- Active Running
- demandshaper :- Active Running
Emoncms
- Version :- low-write 10.4
- Modules :- Administration | App v2.2.7 | Backup v2.2.7 | EmonHub Config v2.0.6 | Dashboard v2.0.10 | DemandShaper v2.1.3 | Device v2.0.10 | EventProcesses | Feed | Graph v2.0.11 | Input | Postprocess v2.1.5 | CoreProcess | Schedule | Network Setup v1.0.2 | sync | Time | User | Visualisation | WiFi v2.0.4
-
Git :-
- URL :- GitHub - emoncms/emoncms: Web-app for processing, logging and visualising energy, temperature and other environmental data
- Branch :- * stable
- Describe :- 10.4
Server
- OS :- Linux 5.10.17-v7+
- Host :- emonpi | emonpi | (192.168.2.163)
- Date :- 2021-06-09 20:36:31 BST
- Uptime :- 20:36:31 up 3:20, 1 user, load average: 0.62, 0.50, 0.55
Memory
-
RAM :- Used: 19.79%
- Total :- 924.21 MB
- Used :- 182.89 MB
- Free :- 741.32 MB
-
Swap :- Used: 0.00%
- Total :- 100 MB
- Used :- 0 B
-
Free :- 100 MB
Write Load Period
Disk
-
/ :- Used: 50.08%
- Total :- 4.06 GB
- Used :- 2.03 GB
- Free :- 1.83 GB
- Write Load :- 26.11 KB/s (3 hours 12 mins)
-
/var/opt/emoncms :- Used: 0.39%
- Total :- 9.84 GB
- Used :- 38.83 MB
- Free :- 9.3 GB
- Write Load :- 57.88 B/s (3 hours 12 mins)
-
/boot :- Used: 18.90%
- Total :- 252.05 MB
- Used :- 47.64 MB
- Free :- 204.4 MB
- Write Load :- 1.86 B/s (3 hours 12 mins)
-
/var/log :- Used: 15.11%
- Total :- 50 MB
- Used :- 7.55 MB
- Free :- 42.45 MB
- Write Load :- n/a
HTTP
- Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80
MySQL
- Version :- 5.5.5-10.3.27-MariaDB-0+deb10u1
- Host :- 127.0.0.1 (127.0.0.1)
- Date :- 2021-06-09 20:36:31 (UTC 01:00)
- Stats :- Uptime: 12021 Threads: 13 Questions: 69228 Slow queries: 0 Opens: 46 Flush tables: 1 Open tables: 40 Queries per second avg: 5.758
Redis
-
Version :-
- Redis Server :- 5.0.3
- PHP Redis :- 5.3.1
- Host :- localhost:6379
- Size :- 310 keys (838.02K)
- Uptime :- 0 days
MQTT Server
- Version :- Mosquitto 1.5.7
- Host :- localhost:1883 (127.0.0.1)
PHP
- Version :- 7.3.27-1~deb10u1 (Zend Version 3.3.27)
- Modules :- apache2handlercalendar Core ctype curl date dom v20031129exif fileinfo filter ftp gd gettext hash iconv json v1.7.0libxml mbstring mosquitto v0.4.0mysqli mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $openssl pcre PDO pdo_mysql Phar posix readline redis v5.3.1Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zlib
Pi
-
Model :- Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)
-
Serial num. :- 698A595
-
CPU Temperature :- 55.84°C
-
GPU Temperature :- 56.4°C
-
emonpiRelease :- emonSD-24Jul20
-
File-system :- read-write
Client Information
Client Information
HTTP
- Browser :- Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
- Language :- nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7
Window
- Size :- 1905 x 912
Screen
- Resolution :- 1920 x 1080
Anyone else experiencing this problem? Idea how to start debugging?