birdie1 / victron Goto Github PK
View Code? Open in Web Editor NEWVictron bluetooth and serial communication at a python script. With MQTT and HomeAssistant support.
License: GNU General Public License v3.0
Victron bluetooth and serial communication at a python script. With MQTT and HomeAssistant support.
License: GNU General Public License v3.0
Hi
I recently switched from the bluetooth to serial implementation which works fine for the smarthsunt, but not for the smartsolar products. After triggering the script manual I can see that there are missing dependencies to the library but this should be working (as it works with the smartshunt). Is there any advice that you can give me?
root@raspibus:/opt/victron# python3 victron.py -d 1
/opt/victron/victron.py:237: DeprecationWarning: Callback API version 1 is deprecated, update to latest version
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1)
Exception in thread Thread-1 (read_data_callback):
Traceback (most recent call last):
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
File "/opt/victron/victron.py", line 267, in <module>
victron_thread(1, config, devices_config, q)
File "/opt/victron/victron.py", line 24, in victron_thread
self.run()
File "/usr/lib/python3.11/threading.py", line 975, in run
v = Victron(config, vdevice_config, output, args, thread_count, thread_q)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/victron/lib/victron.py", line 40, in __init__
pid, ser, fw = self.victron_type.get_device_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self._target(*self._args, **self._kwargs)
File "/opt/victron/lib/victron_serial/victron_serial.py", line 59, in get_device_info
File "/opt/victron/lib/victron_serial/victron_serial.py", line 18, in read_data_callback
pid = self.map['PID'][4](data['PID'], self.map['PID'])
callbackFunction(packet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/victron/lib/victron_serial/victron_serial.py", line 40, in <lambda>
File "/opt/victron/lib/helper.py", line 61, in convert_map_out
callback_wrapper = lambda packet: self.read_data_callback(packet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return f'{value}: {command[3][value]}'
File "/opt/victron/lib/victron_serial/victron_serial.py", line 103, in read_data_callback
~~~~~~~~~~^^^^^^^
KeyError: '0xA07D'
self.process_packet(packet)
File "/opt/victron/lib/victron_serial/victron_serial.py", line 111, in process_packet
self.send_out(key, value)
File "/opt/victron/lib/victron_serial/victron_serial.py", line 119, in send_out
data = helper_function(value, map_entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/victron/lib/helper.py", line 61, in convert_map_out
return f'{value}: {command[3][value]}'
~~~~~~~~~~^^^^^^^
KeyError: '0xA07D'
Hi Jonas,
I installed your script on my Raspberry Pi 3 B+ and connected the Victron SmartSolar 100 30 via original USB-Cable to the Pi.
I can check the Version of the script and so on, but I cannot execute the script properly. When I try, I get this:
pi@rpi:~/victron$ ./victron.py -d SmartsolarAlfred
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 1266, in run
self.function(*self.args, **self.kwargs)
File "/home/pi/victron/./victron.py", line 24, in victron_thread
v = Victron(config, vdevice_config, output, args, thread_count, thread_q)
File "/home/pi/victron/lib/victron.py", line 28, in init
self.victron_type = VictronSerial(device_config, self.output)
File "/home/pi/victron/lib/victron_serial/victron_serial.py", line 20, in init
from lib.victron_serial.victron_smartsolar import Smartsolar
File "/home/pi/victron/lib/victron_serial/victron_smartsolar.py", line 4, in
from vedirect import Vedirect
ImportError: cannot import name 'Vedirect' from 'vedirect' (unknown location)
Do you have any idea what causes this problem?
Regards
Sebastian
As I have not seen a feature request option here I am opening this issue.
Using the SmartShunt vie Bluetooth works fine. Using the non-BLE option fetches data continuously for a few seconds and then disconnects (as designed).
I would like to see a permanent connection to be able to let it run like a daemon.
Thanks for your great work!
After a few minutes(5-10) i get the follwoing error:
`[INFO ] (2023-04-09 11:15:16,504) victron_gatt.py::62 MPPT-Solar: Disconnected!
[DEBUG ] (2023-04-09 11:15:16,507) victron_bluetooth.py::252 MPPT-Solar: Will reconnect at 2023-04-09 11:16:16.507228
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/heavyreisen/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 139, in start_discovery
self._adapter.StartDiscovery()
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in call
return self._connection.call_blocking(self._named_service,
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 1266, in run
self.function(*self.args, **self.kwargs)
File "/home/heavyreisen/Downloads/victron/victron.py", line 25, in victron_thread
v.connect_disconnect_loop()
File "/home/heavyreisen/Downloads/victron/lib/victron.py", line 52, in connect_disconnect_loop
self.victron_type.connect_disconnect_loop(self.cmd, self.config['timer'])
File "/home/heavyreisen/Downloads/victron/lib/victron_bluetooth/victron_bluetooth.py", line 248, in connect_disconnect_loop
if self.connect_loop():
File "/home/heavyreisen/Downloads/victron/lib/victron_bluetooth/victron_bluetooth.py", line 220, in connect_loop
manager.start_discovery()
File "/home/heavyreisen/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 149, in start_discovery
raise _error_from_dbus_error(e)
gatt.errors.Failed: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
`
Config:
`## Add your devices here:
devices:
- name: MPPT-Solar
type: smartsolar
protocol: bluetooth
mac: C7:F9:7F:61:6E:37
#devices:
timer:
retry: 15
bluetooth:
connected: 60,
disconnected: 60
bluetooth-ble:
repeat: 60
serial:
repeat: 30
logger: mqtt
Mandatory:
host: 192.168.178.22
port: 1883
base_topic: victron
hass: True
Optional:
username: admin
password: 580500
mqtt:
host: 192.168.178.22
port: 1883
base_topic: victron
hass: True
username: xxx
password: xxx
collections:`
Thanks for the brilliant work on this project. Pretty amazing what you have created so far.
I totally understand your approach of getting data in the MQTT. However, I would love to use it for single queries. So instead of running a delay and then query the device again, I would like to just quit the script. In addition I would love you you could do a JSON encoded output to stdout.
I'm not that familiar with Python, so not sure if I would be able to change the code accordingly (and pretty).
But is this anything which we could add to the project? Or would this be against the overall concept?
I'm able to connect on both bluetooth and bluetooth-ble to a victron smartshunt but I can't seem to get any data out of it. The only MQTT topics published are the HASS config topics. I've tried with hass set to True and False and it's the same.
Here is my BLE config
devices:
- name: Shunt1
type: smartshunt
protocol: bluetooth-ble
mac: D1:43:04:AA:84:9A
My MQTT config:
mqtt:
host: 192.168.0.51
port: 1883
base_topic: victron
hass: True
and an example of some of the logs:
[DEBUG ] (2021-12-30 00:39:33,047) victron_ble.py::80 Shunt1: Will reconnect at 2021-12-30 00:40:33.046711
[INFO ] (2021-12-30 00:40:34,165) victron_ble.py::47 Shunt1: Connecting...
[INFO ] (2021-12-30 00:40:35,217) victron_gatt_ble.py::41 Shunt1: Connect successful!
[DEBUG ] (2021-12-30 00:40:37,031) victron_gatt_ble.py::68 Shunt1: [D1:43:04:AA:84:9A] Resolved services
[DEBUG ] (2021-12-30 00:40:37,035) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6628>
[DEBUG ] (2021-12-30 00:40:37,293) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6760>
[DEBUG ] (2021-12-30 00:40:37,308) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6130>
[DEBUG ] (2021-12-30 00:40:37,323) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6d30>
[DEBUG ] (2021-12-30 00:40:37,339) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6250>
[DEBUG ] (2021-12-30 00:40:37,354) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6460>
[DEBUG ] (2021-12-30 00:40:37,369) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6100>
[DEBUG ] (2021-12-30 00:40:37,384) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6688>
[DEBUG ] (2021-12-30 00:40:37,399) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6160>
[DEBUG ] (2021-12-30 00:40:37,417) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c6070>
[DEBUG ] (2021-12-30 00:40:37,432) victron_gatt_ble.py::72 Shunt1: Read value from characteristic <gatt.gatt_linux.Characteristic object at 0xb39c60d0>
[INFO ] (2021-12-30 00:40:37,592) victron_gatt_ble.py::53 Shunt1: Disconnect successful!
[DEBUG ] (2021-12-30 00:40:37,605) victron_ble.py::80 Shunt1: Will reconnect at 2021-12-30 00:41:37.605105
I'm running on a Pi Zero W
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
SmartShunt 500A/50mV
Firmware: 4.08
Bluetooth enabled = true
Bluetooth GATT service enabled = true
I've swapped from my desired base topic to the example one in config.yml. The Pi is sitting less than a foot away from the Shunt (I could connect when it was further away plugged into mains, but it would never read the characteristics so I moved it to my inverter).
I'm going to keep playing with it more tomorrow and add some extra debug lines for troubleshooting.
Any help is much appreciated!
The smartshunt sends out new data via gatt ble protocol. I already added remaining time and starter voltage.
I need some help to decode the other values. I found these values on my smartshunt:
victron_smartshunt_ble.py::91 Shunt1: Characteristic (65970383-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Rawvalue: b'\xff\x7f'
victron_smartshunt_ble.py::92 Shunt1: Characteristic (65970383-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Value signed: 32767.0 | Value unsigned: 32767.0
victron_smartshunt_ble.py::91 Shunt1: Characteristic (65970382-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Rawvalue: b'\xff\xff'
victron_smartshunt_ble.py::92 Shunt1: Characteristic (65970382-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Value signed: -1.0 | Value unsigned: 65535.0
victron_smartshunt_ble.py::91 Shunt1: Characteristic (6597edec-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Rawvalue: b'\xff\xff'
victron_smartshunt_ble.py::92 Shunt1: Characteristic (6597edec-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Value signed: -1.0 | Value unsigned: 65535.0
victron_smartshunt_ble.py::91 Shunt1: Characteristic (6597ffff-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Rawvalue: b''
victron_smartshunt_ble.py::92 Shunt1: Characteristic (6597ffff-4bda-4c1e-af4b-551c4cf74769) not found in known Table | Value signed: 0.0 | Value unsigned: 0.0
Can somebody check, what values do you get? To get this output, just start a bluetooth-ble protocol smartshunt with debug option.
Thanks
Hey there,
I'd be interested in the ability to set the Current Limit over bluetooth, based on other system variables, in realtime.
Is that possible at all with the current approach to this, has it even been tried? Or is everybody mostly interested in reading values?
Are there any specific instructions for installing the requirements on VenusOS v2.85? I'm getting an error saying that pycairo can't be built:
$ pip3.8 install pycairo
Collecting pycairo
Using cached pycairo-1.21.0.tar.gz (340 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: pycairo
Building wheel for pycairo (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp487fvecp
cwd: /var/volatile/tmp/pip-install-b_7f_1st/pycairo
Complete output (15 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-cpython-38
creating build/lib.linux-armv7l-cpython-38/cairo
copying cairo/__init__.py -> build/lib.linux-armv7l-cpython-38/cairo
copying cairo/__init__.pyi -> build/lib.linux-armv7l-cpython-38/cairo
copying cairo/py.typed -> build/lib.linux-armv7l-cpython-38/cairo
running build_ext
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing 'cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
ERROR: Failed building wheel for pycairo
Failed to build pycairo
ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly
I tried installing PEP 517 manually but it's not changed the error.
Hey there,
Any plan to implement the ping to prevent the regular bluetooth disconnects? I see there are some provisions there for that already and only send_ping needs to be called regularly from the right place.
Hey,
very fine project, meeting quite exactly my use case: getting my SmartSolar values via bluetooth and mqtt into the home assistant of my camper.
Sadly, I'm missing these values: "virtual load output" and "state [bulk, float, absorption]". I'm not sure, why:
Since the official GATT-protocol ist officially not available for other devices than SmartShunt (or did I miss something?), I think, I'm connecting via reverse engineered VictronConnect-protocol? I use this in config.yml
:
devices:
- name: SmartSolar
type: smartsolar
protocol: bluetooth
mac: ...
The advertisement protocol is no solution, since it doesn't contain the (for me important) virtual load output state - neither the App show this value in the preview values section, nor the spec includes it. Further more, the advertisment doesn't include the panel voltage and current, which I get here.
Thank You very much for hints how to get these values and how to contribute.
Looking for some advice. I managed to set up the connection to a SmartSolar 250/70. It was working fine for a week or two, sending data to a MQTT logger. A couple of days ago it stopped working, and is throwing two different errors in the log:
It either fails to connect with this error:
[ERROR ] (2022-06-05 10:36:46,588) victron_gatt.py::56 smartsolar1: Connection failed: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.!
Or it connects and then throws this one:
[ERROR ] (2022-06-05 10:01:24,054) connection.py::236 Exception in handler for D-Bus signal:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 232, in maybe_handle_message
self._handler(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/gatt/gatt_linux.py", line 398, in properties_changed
self.services_resolved()
File "/data/home/root/victron-master/lib/victron_bluetooth/victron_gatt.py", line 85, in services_resolved
self.start_send_init_squence()
File "/data/home/root/victron-master/lib/victron_bluetooth/victron_gatt.py", line 153, in start_send_init_squence
self.send_init_sequence()
File "/data/home/root/victron-master/lib/victron_bluetooth/victron_gatt.py", line 159, in send_init_sequence
c = self.characteristics[uuid]
KeyError: '306b0002-b081-4037-83dc-e59fcc3cdfd0'
I'm using the built-in Bluetooth connection in a Raspberry Pi 3B+. The SmartSolar is connected as shown in bluetoothctl:
Device C7:FB:23:EF:97:A3 (random)
Name: SmartSolar HQ1950WPKXP
Alias: SmartSolar HQ1950WPKXP
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (306b0001-b081-4037-83dc-e59fcc3cdfd0)
UUID: Vendor specific (68c10001-b17f-4d3a-a290-34ad6499937c)
UUID: Vendor specific (97580001-ddf1-48be-b73e-182664615d8e)
ManufacturerData Key: 0x02e1
ManufacturerData Value:
01 aa 3d 3e a5 9a a4 26 82 0b 00 00 6d 84 ed 5b ..=>...&....m..[
AdvertisingFlags:
00 .
AdvertisingData Key: 0x00 (0)
AdvertisingData Value:
ff e1 02 02 aa 3d 3e 9a 7f 0d 82 0b 54 87 54 db .....=>.....T.T.
3e 77 67 03 d8 35 f0 6a 4f f6 c2 d9 e7 >wg..5.jO....
I've removed and rediscovered the SmartSolar and can't see anything wrong there:
[bluetooth]# remove C7:FB:23:EF:97:A3
[DEL] Descriptor (Handle 0xec70)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000a/char000b/desc000d
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[DEL] Characteristic (Handle 0xb288)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000a/char000b
00002a05-0000-1000-8000-00805f9b34fb
Service Changed
[DEL] Primary Service (Handle 0x0020)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000a
00001801-0000-1000-8000-00805f9b34fb
Generic Attribute Profile
[DEL] Descriptor (Handle 0xf2bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e/char000f/desc0011
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[DEL] Characteristic (Handle 0xa098)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e/char000f
68c10002-b17f-4d3a-a290-34ad6499937c
Vendor specific
[DEL] Characteristic (Handle 0x50a0)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e/char0012
68c10003-b17f-4d3a-a290-34ad6499937c
Vendor specific
[DEL] Primary Service (Handle 0x0020)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e
68c10001-b17f-4d3a-a290-34ad6499937c
Vendor specific
[DEL] Characteristic (Handle 0x7b98)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char0015
97580002-ddf1-48be-b73e-182664615d8e
Vendor specific
[DEL] Descriptor (Handle 0xf2bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char0017/desc0019
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[DEL] Characteristic (Handle 0x7040)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char0017
97580003-ddf1-48be-b73e-182664615d8e
Vendor specific
[DEL] Characteristic (Handle 0x6878)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char001a
97580004-ddf1-48be-b73e-182664615d8e
Vendor specific
[DEL] Descriptor (Handle 0xf2bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char001c/desc001e
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[DEL] Characteristic (Handle 0x5d38)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char001c
97580006-ddf1-48be-b73e-182664615d8e
Vendor specific
[DEL] Primary Service (Handle 0x0020)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014
97580001-ddf1-48be-b73e-182664615d8e
Vendor specific
[DEL] Descriptor (Handle 0xf2bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0020/desc0022
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[DEL] Characteristic (Handle 0x49c0)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0020
6b0002b0-8140-3700-83dc-e59fcc3cdfd0
Vendor specific
[DEL] Descriptor (Handle 0xf2bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0023/desc0025
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[DEL] Characteristic (Handle 0x3588)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0023
306b0003-b081-4037-83dc-e59fcc3cdfd0
Vendor specific
[DEL] Descriptor (Handle 0xf2bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0026/desc0028
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[DEL] Characteristic (Handle 0x2588)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0026
306b0004-b081-4037-83dc-e59fcc3cdfd0
Vendor specific
[DEL] Primary Service (Handle 0x0020)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f
306b0001-b081-4037-83dc-e59fcc3cdfd0
Vendor specific
[DEL] Device C7:FB:23:EF:97:A3 SmartSolar HQ1950WPKXP
Device has been removed
And then re-added:
[CHG] Device C7:FB:23:EF:97:A3 Connected: yes
Connection successful
[NEW] Primary Service (Handle 0x88bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000a
00001801-0000-1000-8000-00805f9b34fb
Generic Attribute Profile
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000a/char000b
00002a05-0000-1000-8000-00805f9b34fb
Service Changed
[NEW] Descriptor (Handle 0x6e54)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000a/char000b/desc000d
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Primary Service (Handle 0x88bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e
68c10001-b17f-4d3a-a290-34ad6499937c
Vendor specific
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e/char000f
68c10002-b17f-4d3a-a290-34ad6499937c
Vendor specific
[NEW] Descriptor (Handle 0x8474)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e/char000f/desc0011
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service000e/char0012
68c10003-b17f-4d3a-a290-34ad6499937c
Vendor specific
[NEW] Primary Service (Handle 0x88bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014
97580001-ddf1-48be-b73e-182664615d8e
Vendor specific
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char0015
97580002-ddf1-48be-b73e-182664615d8e
Vendor specific
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char0017
97580003-ddf1-48be-b73e-182664615d8e
Vendor specific
[NEW] Descriptor (Handle 0xa18c)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char0017/desc0019
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char001a
97580004-ddf1-48be-b73e-182664615d8e
Vendor specific
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char001c
97580006-ddf1-48be-b73e-182664615d8e
Vendor specific
[NEW] Descriptor (Handle 0xaf84)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service0014/char001c/desc001e
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Primary Service (Handle 0x88bc)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f
306b0001-b081-4037-83dc-e59fcc3cdfd0
Vendor specific
[NEW] Characteristic (Handle 0x77a0)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0020
6b0002b0-8140-3700-83dc-e59fcc3cdfd0
Vendor specific
[NEW] Descriptor (Handle 0xcf4c)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0020/desc0022
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0023
306b0003-b081-4037-83dc-e59fcc3cdfd0
Vendor specific
[NEW] Descriptor (Handle 0xdd04)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0023/desc0025
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[NEW] Characteristic (Handle 0x8894)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0026
306b0004-b081-4037-83dc-e59fcc3cdfd0
Vendor specific
[NEW] Descriptor (Handle 0xece4)
/org/bluez/hci0/dev_C7_FB_23_EF_97_A3/service001f/char0026/desc0028
00002902-0000-1000-8000-00805f9b34fb
Client Characteristic Configuration
[CHG] Device C7:FB:23:EF:97:A3 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device C7:FB:23:EF:97:A3 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device C7:FB:23:EF:97:A3 UUIDs: 306b0001-b081-4037-83dc-e59fcc3cdfd0
[CHG] Device C7:FB:23:EF:97:A3 UUIDs: 68c10001-b17f-4d3a-a290-34ad6499937c
[CHG] Device C7:FB:23:EF:97:A3 UUIDs: 97580001-ddf1-48be-b73e-182664615d8e
[CHG] Device C7:FB:23:EF:97:A3 ServicesResolved: yes
And pairing:
[bluetooth]# scan on
[NEW] Device C7:FB:23:EF:97:A3 SmartSolar HQ1950WPKXP
[bluetooth]# pair C7:FB:23:EF:97:A3
Attempting to pair with C7:FB:23:EF:97:A3
[CHG] Device C7:FB:23:EF:97:A3 Connected: yes
Request passkey
[agent] Enter passkey (number in 0-999999): xxxxxx
Pairing successful
[SmartSolar HQ1950WPKXP]#
Any thoughts or suggestions?
Edit: Forgot to mention, system has been rebooted several times.
Setup:
After running fine for a while the following exception occurs. (see below)
I can immediately restart and victron.py continues to fetch data. I know that the bluetooth connection can be unreliable but maybe theres something to catch in the code here.
[INFO ] (2022-10-12 04:10:26,478) victron_bluetooth.py::224 Solar1: Connecting...
[INFO ] (2022-10-12 04:10:37,245) victron_gatt.py::50 Solar1: Connected!
[INFO ] (2022-10-12 04:10:37,247) victron_gatt.py::50 Solar1: Connected!
[INFO ] (2022-10-12 04:10:40,344) victron_gatt.py::50 Solar1: Connected!
[INFO ] (2022-10-12 04:10:58,485) victron_gatt.py::62 Solar1: Disconnected!
[INFO ] (2022-10-12 04:11:59,511) victron_bluetooth.py::224 Solar1: Connecting...
[INFO ] (2022-10-12 04:12:03,818) victron_gatt.py::50 Solar1: Connected!
[INFO ] (2022-10-12 04:12:03,819) victron_gatt.py::62 Solar1: Disconnected!
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/anschi/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 138, in start_discovery
self._adapter.SetDiscoveryFilter(discovery_filter)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in call
return self._connection.call_blocking(self._named_service,
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.7 was not provided by any .service files
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 1266, in run
self.function(*self.args, **self.kwargs)
File "/home/anschi/apps/victron/victron.py", line 25, in victron_thread
v.connect_disconnect_loop()
File "/home/anschi/apps/victron/lib/victron.py", line 52, in connect_disconnect_loop
self.victron_type.connect_disconnect_loop(self.cmd, self.config['timer'])
File "/home/anschi/apps/victron/lib/victron_bluetooth/victron_bluetooth.py", line 248, in connect_disconnect_loop
if self.connect_loop():
File "/home/anschi/apps/victron/lib/victron_bluetooth/victron_bluetooth.py", line 220, in connect_loop
manager.start_discovery()
File "/home/anschi/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 149, in start_discovery
raise _error_from_dbus_error(e)
gatt.errors.Failed: The name :1.7 was not provided by any .service files
2022-01-24 23:34:16 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:16 WARNING (MainThread) [homeassistant.components.mqtt.mixins] Erroneous JSON: OFF
2022-01-24 23:34:16 WARNING (MainThread) [homeassistant.components.mqtt.mixins] Erroneous JSON: 0: None
2022-01-24 23:34:16 WARNING (MainThread) [homeassistant.components.mqtt.mixins] Erroneous JSON: SmartShunt 500A/50mV
2022-01-24 23:34:16 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] Erroneous JSON: 0xA389: SmartShunt 500A/50mV
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
2022-01-24 23:34:17 WARNING (MainThread) [homeassistant.components.mqtt.mixins] JSON result was not a dictionary
I dont know what else could help with debugging the issue.
To be able to install everything from requirements.txt
, I had to
apt-get install libcairo2 libcairo2-dev libgirepository1.0-dev python3-dbus
on a RPi 3B+.
Maybe this could be integrated into readme.md?
Also some packages made problems, which I could solve by changing
typed-ast==1.4.3
to typed-ast>=1.4.3
PyGObject==3.38.0
to PyGObject>=3.38.0
dbus-python==1.2.16
to pydbus
(I read it here)in requirements.txt
. I don't know, if this is a good fix, but it made the project work for me.
Quite many dependencies for this project. Are they really all neccesary?
Hello,
I got following crash:
(venv) pi@rpi-jinx:~/victron $ python victron.py -d 0
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 1266, in run
self.function(*self.args, **self.kwargs)
File "/home/pi/victron/victron.py", line 25, in victron_thread
v = Victron(config, vdevice_config, output, args, thread_count, thread_q)
File "/home/pi/victron/lib/victron.py", line 40, in __init__
pid, ser, fw = self.victron_type.get_device_info()
File "/home/pi/victron/lib/victron_serial/victron_serial.py", line 26, in get_device_info
return self.victron_device.get_device_info()
File "/home/pi/victron/lib/victron_serial/victron_smartshunt.py", line 61, in get_device_info
ser = self.MAP['SER#'][4](data['SER#'], self.MAP['SER#'])
KeyError: 'SER#
devices:
- name: Shunt1
type: smartshunt
protocol: serial
port: /dev/ttyUSB0
It seems like the smartshunt is not supporting this field on the serial interface.
When the SoC is not synchronized, it throws an Exception:
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 1299, in run
self.function(*self.args, **self.kwargs)
File "/src/victron.py", line 26, in victron_thread
v.connect_disconnect_loop()
File "/src/lib/victron.py", line 52, in connect_disconnect_loop
self.victron_type.connect_disconnect_loop(self.cmd, self.config['timer'])
File "/src/lib/victron_serial/victron_serial.py", line 36, in connect_disconnect_loop
self.victron_device.get_data(self.output)
File "/src/lib/victron_serial/victron_smartshunt.py", line 73, in get_data
data = command[4](value, command)
File "/src/lib/helper.py", line 44, in convert_int_factor
data = int(value) * command[3]
ValueError: invalid literal for int() with base 10: '---'
Sometimes my smartshunt connected by usb disconnects and values remain static in homeassistant. It would be nice to have a expire_after option so its very obvious the values are old and not updating.
https://www.home-assistant.io/integrations/sensor.mqtt/#expire_after
I tried the code from https://github.com/vvvrrooomm/victron
and it works ;) Can you add support for this? I couldnยดt get your code to work.
There are still errors but some Value are ok:
SmartSolar: SmartSolar Solar Voltage: 33.64V
SmartSolar: Voltage: 13.56V
SmartSolar: SmartSolar Battery Current: 0.2A
...
Seems there is no support for BT LE and Smartsolar yet..
Here is the output from other script:
python3 victron.py -d 2
starting with devices: 2
prepare device SmartSolar
SmartSolar start timer loop
manager event loop startinf
SmartSolar connect
SmartSolar: [F5:4D:3D:9C:1B:F6] Connected
SmartSolar connected:True
SmartSolar BT connected until 15:36:32
SmartSolar:subscribe notifications
SmartSolar:characteristics empty, sleep & retry - CHECK DEVICE PAIRING!
SmartSolar: [F5:4D:3D:9C:1B:F6] Resolved services
[F5:4D:3D:9C:1B:F6] Service [306b0001-b081-4037-83dc-e59fcc3cdfd0] (vendor, smartsolar & BMV712 )
[F5:4D:3D:9C:1B:F6] Characteristic [306b0004-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0003-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0002-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Service [97580001-ddf1-48be-b73e-182664615d8e] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [97580006-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580004-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580003-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580002-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Service [68c10001-b17f-4d3a-a290-34ad6499937c] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [68c10003-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Characteristic [68c10002-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Service [00001801-0000-1000-8000-00805f9b34fb] (generic attributes)
[F5:4D:3D:9C:1B:F6] Characteristic [00002a05-0000-1000-8000-00805f9b34fb]
SmartSolar: notifications for 000c: 00002a05-0000-1000-8000-00805f9b34fb
SmartSolar: notifications for 0010: 68c10002-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0013: 68c10003-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0016: 97580002-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0018: 97580003-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001b: 97580004-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001d: 97580006-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0021: 306b0002-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0024: 306b0003-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0027: 306b0004-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: enable notifications done
SmartSolar send init sequence
SmartSolar: sending 0021, databytearray(b'\xfa\x80\xff')
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9\x80')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x01')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x03\x00')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'\x03\x01\x03\x03")
SmartSolar: write succeeded
SmartSolar: sending 0027, databytearray(b'\x05\x00\x81\x19\xec\x0f\x05\x00\x81\x19\xec\x0e\x05\x00\x81\x19\x01\x0c\x05\x00')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x81\x18\x90\x05\x00\x81\x19\xec?\x05\x00\x81\x19\xec\x12')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x02\x9f\x00\x00\x01\x00\x03\x01\xff'
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x19\xec\xdc\x05\x03\x81\x19\xec\xeb\x05\x03\x81\x19\xec\xed')
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x07\x00\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'")
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: write succeeded
SmartSolar: unknown single packet: b'\x07\x00\x03\x00\x07\x00\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: error handling: b'\t\x00\x19\xec\x0f\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\t\x00\x19\xec\x0e\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\t\x00\x19\x01\x0c\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\t\x00\x18\x90\x01'
SmartSolar: error handling: b'\x08\x00\x19\xec?A\x00': 'unknown command 0x3f'
SmartSolar: error handling: b'\t\x00\x19\xec\x12\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\xf7\x03\x00'
SmartSolar: error handling: b'\t\x03\x19\xec\xeb\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: error handling: b'\t\x03\x19\xec\xed\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.64V
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.7V
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xe5\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbB+\r'
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.7V
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xe6\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbB+\r'
SmartSolar: Voltage: 13.56V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.73V
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xe7\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.76V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xe8\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbB6\r'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xe9\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.88V
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: error handling: b'\x08\x03\x19\x01\x0eA\x00': 18416392
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xea\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbB=\r'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.92V
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xeb\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 33.95V
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xec\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbBK\r'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 34.04V
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xed\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BL\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBL\x05'
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xee\x06\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\x10PX"\x00\x04\x00\x00\x00\x00\x00\x00\x00\x8c\x05\xa9\x04': 3961062152
SmartSolar: error handling: b'\x00\x00\x00\x00\x00*\x00\x01\x00\x12\x02\x14\x00\x00\x00\x0e\x00K\x102': 3961062152
SmartSolar: unknown single packet: b'\x00'
SmartSolar: [F5:4D:3D:9C:1B:F6] Disconnected
SmartSolar planned disconnect
SmartSolar BT disconnected, connecting again at 15:37:26
SmartSolar connecting in 30
SmartSolar connect
SmartSolar: [F5:4D:3D:9C:1B:F6] Connected
SmartSolar connected:True
SmartSolar BT connected until 15:38:26
SmartSolar:subscribe notifications
SmartSolar: notifications for 000c: 00002a05-0000-1000-8000-00805f9b34fb
SmartSolar: notifications for 0010: 68c10002-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0013: 68c10003-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0016: 97580002-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0018: 97580003-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001b: 97580004-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001d: 97580006-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0021: 306b0002-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0024: 306b0003-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0027: 306b0004-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: enable notifications done
SmartSolar: [F5:4D:3D:9C:1B:F6] Resolved services
[F5:4D:3D:9C:1B:F6] Service [306b0001-b081-4037-83dc-e59fcc3cdfd0] (vendor, smartsolar & BMV712 )
[F5:4D:3D:9C:1B:F6] Characteristic [306b0004-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0003-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0002-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Service [97580001-ddf1-48be-b73e-182664615d8e] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [97580006-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580004-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580003-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580002-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Service [68c10001-b17f-4d3a-a290-34ad6499937c] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [68c10003-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Characteristic [68c10002-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Service [00001801-0000-1000-8000-00805f9b34fb] (generic attributes)
[F5:4D:3D:9C:1B:F6] Characteristic [00002a05-0000-1000-8000-00805f9b34fb]
SmartSolar send init sequence
SmartSolar: sending 0021, databytearray(b'\xfa\x80\xff')
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9\x80')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x01')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x03\x00')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'\x03\x01\x03\x03")
SmartSolar: write succeeded
SmartSolar: sending 0027, databytearray(b'\x05\x00\x81\x19\xec\x0f\x05\x00\x81\x19\xec\x0e\x05\x00\x81\x19\x01\x0c\x05\x00')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x81\x18\x90\x05\x00\x81\x19\xec?\x05\x00\x81\x19\xec\x12')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x19\xec\xdc\x05\x03\x81\x19\xec\xeb\x05\x03\x81\x19\xec\xed')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x02\x9f\x00\x00\x01\x00\x03\x01\xff'
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'")
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x07\x00\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: unknown single packet: b'\x07\x00\x03\x00\x07\x00\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: error handling: b'\t\x00\x19\xec\x0f\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\t\x00\x19\xec\x0e\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\t\x00\x19\x01\x0c\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: write succeeded
SmartSolar: unknown single packet: b'\t\x00\x18\x90\x01'
SmartSolar: error handling: b'\x08\x00\x19\xec?A\x00': 'unknown command 0x3f'
SmartSolar: error handling: b'\t\x00\x19\xec\x12\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\xf7\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: error handling: b'\t\x03\x19\xec\xeb\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: error handling: b'\t\x03\x19\xec\xed\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 35.63V
SmartSolar: error handling: b'\x08\x03\x19\xecZDU\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 35.66V
SmartSolar: error handling: b'\x08\x03\x19\xecZDV\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBL\x05'
SmartSolar: error handling: b'\x08\x03\x19\xecZDW\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 35.67V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 35.66V
SmartSolar: error handling: b'\x08\x03\x19\xecZDX\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBM\x05'
SmartSolar: error handling: b'\x08\x03\x19\xecZDY\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: SmartSolar Solar Voltage: 35.67V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbB\xee\r'
SmartSolar: error handling: b'\x08\x03\x19\xecZDZ\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBM\x05'
SmartSolar: error handling: b'\x08\x03\x19\xecZD[\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 35.68V
SmartSolar: error handling: b'\x08\x03\x19\xecZD\\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 35.69V
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BL\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\x01\x0eA\x00': 18416392
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBM\x05'
SmartSolar: error handling: b'\x08\x03\x19\xecZD]\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBK\x05'
SmartSolar: error handling: b'\x08\x03\x19\xecZD^\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: [F5:4D:3D:9C:1B:F6] Disconnected
SmartSolar planned disconnect
SmartSolar BT disconnected, connecting again at 15:39:18
SmartSolar connecting in 30
SmartSolar connect
SmartSolar: [F5:4D:3D:9C:1B:F6] Connected
SmartSolar connected:True
SmartSolar BT connected until 15:40:19
SmartSolar:subscribe notifications
SmartSolar: notifications for 000c: 00002a05-0000-1000-8000-00805f9b34fb
SmartSolar: notifications for 0010: 68c10002-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0013: 68c10003-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0016: 97580002-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0018: 97580003-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001b: 97580004-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001d: 97580006-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0021: 306b0002-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0024: 306b0003-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0027: 306b0004-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: enable notifications done
SmartSolar: [F5:4D:3D:9C:1B:F6] Resolved services
[F5:4D:3D:9C:1B:F6] Service [306b0001-b081-4037-83dc-e59fcc3cdfd0] (vendor, smartsolar & BMV712 )
[F5:4D:3D:9C:1B:F6] Characteristic [306b0004-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0003-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0002-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Service [97580001-ddf1-48be-b73e-182664615d8e] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [97580006-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580004-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580003-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580002-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Service [68c10001-b17f-4d3a-a290-34ad6499937c] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [68c10003-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Characteristic [68c10002-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Service [00001801-0000-1000-8000-00805f9b34fb] (generic attributes)
[F5:4D:3D:9C:1B:F6] Characteristic [00002a05-0000-1000-8000-00805f9b34fb]
SmartSolar send init sequence
SmartSolar: sending 0021, databytearray(b'\xfa\x80\xff')
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9\x80')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x01')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x03\x00')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'\x03\x01\x03\x03")
SmartSolar: write succeeded
SmartSolar: sending 0027, databytearray(b'\x05\x00\x81\x19\xec\x0f\x05\x00\x81\x19\xec\x0e\x05\x00\x81\x19\x01\x0c\x05\x00')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x81\x18\x90\x05\x00\x81\x19\xec?\x05\x00\x81\x19\xec\x12')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x19\xec\xdc\x05\x03\x81\x19\xec\xeb\x05\x03\x81\x19\xec\xed')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x02\x9f\x00\x00\x01\x00\x03\x01\xff'
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'")
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x07\x00\x03\x00'
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: write succeeded
SmartSolar: unknown single packet: b'\x07\x00\x03\x00\x07\x00\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: error handling: b'\t\x00\x19\xec\x0f\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\t\x00\x19\xec\x0e\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\t\x00\x19\x01\x0c\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\t\x00\x18\x90\x01'
SmartSolar: error handling: b'\x08\x00\x19\xec?A\x00': 'unknown command 0x3f'
SmartSolar: error handling: b'\t\x00\x19\xec\x12\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\xf7\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: error handling: b'\t\x03\x19\xec\xeb\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: error handling: b'\t\x03\x19\xec\xed\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.28V
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BL\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.27V
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xc6\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.56V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.3V
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBK\x05'
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xc7\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xc8\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xc9\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: unknown single packet: b'\x08\x03\x18\x90A\x01'
SmartSolar: error handling: b'\x08\x03\x19\x01PD!\x00\x00\x00': 18416392
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xca\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xcb\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xcc\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.31V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbB1\x0e'
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xcd\x07\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\x01\x0eA\x00': 18416392
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbB.\x0e'
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xce\x07\x12\x00': 3961062152
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBK\x05'
SmartSolar: error handling: b'\x08\x03\x19\xecZD\xcf\x07\x12\x00': 3961062152
SmartSolar: [F5:4D:3D:9C:1B:F6] Disconnected
SmartSolar planned disconnect
SmartSolar BT disconnected, connecting again at 15:41:11
SmartSolar connecting in 30
SmartSolar connect
SmartSolar: [F5:4D:3D:9C:1B:F6] Connected
SmartSolar connected:True
SmartSolar BT connected until 15:42:11
SmartSolar:subscribe notifications
SmartSolar: notifications for 000c: 00002a05-0000-1000-8000-00805f9b34fb
SmartSolar: notifications for 0010: 68c10002-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0013: 68c10003-b17f-4d3a-a290-34ad6499937c
SmartSolar: notifications for 0016: 97580002-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0018: 97580003-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001b: 97580004-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 001d: 97580006-ddf1-48be-b73e-182664615d8e
SmartSolar: notifications for 0021: 306b0002-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0024: 306b0003-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: notifications for 0027: 306b0004-b081-4037-83dc-e59fcc3cdfd0
SmartSolar: enable notifications done
SmartSolar: [F5:4D:3D:9C:1B:F6] Resolved services
[F5:4D:3D:9C:1B:F6] Service [306b0001-b081-4037-83dc-e59fcc3cdfd0] (vendor, smartsolar & BMV712 )
[F5:4D:3D:9C:1B:F6] Characteristic [306b0004-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0003-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Characteristic [306b0002-b081-4037-83dc-e59fcc3cdfd0]
[F5:4D:3D:9C:1B:F6] Service [97580001-ddf1-48be-b73e-182664615d8e] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [97580006-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580004-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580003-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Characteristic [97580002-ddf1-48be-b73e-182664615d8e]
[F5:4D:3D:9C:1B:F6] Service [68c10001-b17f-4d3a-a290-34ad6499937c] (vendor, VE.Direct Smart)
[F5:4D:3D:9C:1B:F6] Characteristic [68c10003-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Characteristic [68c10002-b17f-4d3a-a290-34ad6499937c]
[F5:4D:3D:9C:1B:F6] Service [00001801-0000-1000-8000-00805f9b34fb] (generic attributes)
[F5:4D:3D:9C:1B:F6] Characteristic [00002a05-0000-1000-8000-00805f9b34fb]
SmartSolar send init sequence
SmartSolar: sending 0021, databytearray(b'\xfa\x80\xff')
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9\x80')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x01')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x03\x00')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'\x03\x01\x03\x03")
SmartSolar: write succeeded
SmartSolar: sending 0027, databytearray(b'\x05\x00\x81\x19\xec\x0f\x05\x00\x81\x19\xec\x0e\x05\x00\x81\x19\x01\x0c\x05\x00')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x02\x9f\x00\x00\x01\x00\x03\x01\xff'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\x07\x00\x03\x00'
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x81\x18\x90\x05\x00\x81\x19\xec?\x05\x00\x81\x19\xec\x12')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: unknown single packet: b'\x07\x00\x03\x00\x07\x00\x03\x00'
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b'\x19\xec\xdc\x05\x03\x81\x19\xec\xeb\x05\x03\x81\x19\xec\xed')
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: write succeeded
SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'")
SmartSolar: write succeeded
SmartSolar: sending 0021, databytearray(b'\xf9A')
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: error handling: b'\t\x00\x19\xec\x0f\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: write succeeded
SmartSolar: error handling: b'\t\x00\x19\xec\x0e\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\t\x00\x19\x01\x0c\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\t\x00\x18\x90\x01'
SmartSolar: error handling: b'\x08\x00\x19\xec?A\x00': 'unknown command 0x3f'
SmartSolar: error handling: b'\t\x00\x19\xec\x12\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: unknown single packet: b'\xf7\x03\x00'
SmartSolar: unknown single packet: b'\xf9\x01'
SmartSolar: error handling: b'\t\x03\x19\xec\xeb\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: unknown single packet: b"\x08\x00\x18\x93B\x10'"
SmartSolar: error handling: b'\t\x03\x19\xec\xed\x01': decode_fixed_len() takes 1 positional argument but 2 were given
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BL\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xecZD6\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBM\x05'
SmartSolar: Voltage: 13.56V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xecZD7\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBK\x05'
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.82V
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: error handling: b'\x08\x03\x19\xecZD8\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbBc\x0e'
SmartSolar: Voltage: 13.55V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.82V
SmartSolar: error handling: b'\x08\x03\x19\xecZD9\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.83V
SmartSolar: Voltage: 13.56V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x82\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.84V
SmartSolar: error handling: b'\x08\x03\x19\xecZD:\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.85V
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.86V
SmartSolar: error handling: b'\x08\x03\x19\xecZD;\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.85V
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xecZD<\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00': 3961062152
SmartSolar: Voltage: 13.56V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x85\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.86V
SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
SmartSolar: SmartSolar Battery Current: 0.2A
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BL\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\xecZD=\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\x8dBM\x05'
SmartSolar: Voltage: 13.56V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.87V
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BM\x05': 'unknown command 0xa9'
SmartSolar: error handling: b'\x08\x03\x19\x01\x0eA\x00': 18416392
SmartSolar: error handling: b'\x08\x03\x19\xecZD>\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.89V
SmartSolar: Voltage: 13.56V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.88V
SmartSolar: error handling: b'\x08\x03\x19\xecZD?\x08\x12\x00': 3961062152
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x90\x01\x00\x00\x08\x03': 3961062152
SmartSolar: unknown single packet: b'\x19\xed\xbbBf\x0e'
SmartSolar: Voltage: 13.57V
SmartSolar: error handling: b'\x08\x03\x19\xec\x8aB\x04\x00\x08\x03\x19\xed\xbcD\x83\x01\x00\x00': 3961062152
SmartSolar: SmartSolar Solar Voltage: 36.89V
SmartSolar: error handling: b'\x08\x03\x19\xed\xa9BL\x05': 'unknown command 0xa9'
SmartSolar: [F5:4D:3D:9C:1B:F6] Disconnected
Hi,
my read out is very unreliable
Its an Smartsolar 75/15 connected via the original ve.direct USB Cable to an Raspberry pi Zero (1 and 2)
It throws Errors like:
[WARNING] (2022-07-01 11:28:46) victron_smartsolar.py::58 smartsolar2: H2c
PID not found in mapping dictionary
[WARNING] (2022-07-01 11:28:51) victron_smartsolar.py::58 smartsolar2: LOAD not found in mapping dictionary
[WARNING] (2022-07-01 11:28:51) victron_smartsolar.py::58 smartsolar2: Mr
PID not found in mapping dictionary
[WARNING] (2022-07-01 11:28:51) victron_smartsolar.py::58 smartsolar2: H2T
PID not found in mapping dictionary
[WARNING] (2022-07-01 11:28:51) victron_smartsolar.py::58 smartsolar2: H2c
PID not found in mapping dictionary
Looks like Serial protocol parsing issues.
Does anyone experience similar issues?
Also ive noticed that the vedirect Lib is unmaintained.
There are at least 2 Forks:
https://github.com/karioja/vedirect (original)
https://github.com/nznobody/vedirect (micropython only?)
https://github.com/jmfife/vedirect (incompatible?)
any plans to support one of these?
Thx
Hey @birdie1
your project is interesting and I'm using it with my Orion Smart and Smart solar devices via Bluetooth.
I'm sorry in advance if the questions may sound dumb but I'm new to working with bluetooth.
I used your same collection for the smart solar:
collections:
smartsolar:
device:
- Day sequence Number (0..364)
- Product ID
- Serial
- Firmware
- Production Date
latest:
- Voltage
- Current
- Voltage Panel
- SmartSolar Solar Voltage # added
- Power
- Status
- MPPT Tracker Operation Mode
- Off Reason
- Virtual Load Output
- Error Code
history:
- Energy All Time
- Energy Today
- Energy Today Max
- Energy Yesterday
- Energy Yesterday Max
But I only get this (when I run python victron.py -d 1
)
python victron.py -d 1 -c --debug
):(.venv) rudloff@capsule:~/sources/CapsuleScripts/devices_driver/victron$ python victron.py -d 1 -c --debug
[INFO ] (2021-09-17 21:53:48,769) victron_bluetooth.py::213 SmartSolar: Connecting...
[INFO ] (2021-09-17 21:53:49,447) victron_gatt.py::50 SmartSolar: Connected!
[DEBUG ] (2021-09-17 21:53:49,608) victron_gatt.py::69 SmartSolar: [EF:7A:84:4F:EB:A1] Resolved services
[DEBUG ] (2021-09-17 21:53:49,611) victron_gatt.py::75 [EF:7A:84:4F:EB:A1] Service [306b0001-b081-4037-83dc-e59fcc3cdfd0] (vendor, smartsolar & BMV712 )
[DEBUG ] (2021-09-17 21:53:49,614) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [306b0004-b081-4037-83dc-e59fcc3cdfd0]
[DEBUG ] (2021-09-17 21:53:49,617) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [306b0003-b081-4037-83dc-e59fcc3cdfd0]
[DEBUG ] (2021-09-17 21:53:49,620) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [306b0002-b081-4037-83dc-e59fcc3cdfd0]
[DEBUG ] (2021-09-17 21:53:49,623) victron_gatt.py::75 [EF:7A:84:4F:EB:A1] Service [97580001-ddf1-48be-b73e-182664615d8e] (vendor, VE.Direct Smart)
[DEBUG ] (2021-09-17 21:53:49,626) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [97580006-ddf1-48be-b73e-182664615d8e]
[DEBUG ] (2021-09-17 21:53:49,628) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [97580004-ddf1-48be-b73e-182664615d8e]
[DEBUG ] (2021-09-17 21:53:49,631) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [97580003-ddf1-48be-b73e-182664615d8e]
[DEBUG ] (2021-09-17 21:53:49,633) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [97580002-ddf1-48be-b73e-182664615d8e]
[DEBUG ] (2021-09-17 21:53:49,636) victron_gatt.py::75 [EF:7A:84:4F:EB:A1] Service [68c10001-b17f-4d3a-a290-34ad6499937c] (vendor, VE.Direct Smart)
[DEBUG ] (2021-09-17 21:53:49,639) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [68c10003-b17f-4d3a-a290-34ad6499937c]
[DEBUG ] (2021-09-17 21:53:49,643) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [68c10002-b17f-4d3a-a290-34ad6499937c]
[DEBUG ] (2021-09-17 21:53:49,645) victron_gatt.py::75 [EF:7A:84:4F:EB:A1] Service [00001801-0000-1000-8000-00805f9b34fb] (generic attributes)
[DEBUG ] (2021-09-17 21:53:49,647) victron_gatt.py::77 [EF:7A:84:4F:EB:A1] Characteristic [00002a05-0000-1000-8000-00805f9b34fb]
[DEBUG ] (2021-09-17 21:53:49,649) victron_gatt.py::81 SmartSolar: Subscribe to notifications
[DEBUG ] (2021-09-17 21:53:49,650) victron_gatt.py::124 SmartSolar:subscribe notifications
[DEBUG ] (2021-09-17 21:53:49,651) victron_gatt.py::130 SmartSolar: notifications for 000c: 00002a05-0000-1000-8000-00805f9b34fb
[DEBUG ] (2021-09-17 21:53:49,652) victron_gatt.py::130 SmartSolar: notifications for 0010: 68c10002-b17f-4d3a-a290-34ad6499937c
[DEBUG ] (2021-09-17 21:53:49,653) victron_gatt.py::130 SmartSolar: notifications for 0013: 68c10003-b17f-4d3a-a290-34ad6499937c
[DEBUG ] (2021-09-17 21:53:49,654) victron_gatt.py::130 SmartSolar: notifications for 0016: 97580002-ddf1-48be-b73e-182664615d8e
[DEBUG ] (2021-09-17 21:53:49,656) victron_gatt.py::130 SmartSolar: notifications for 0018: 97580003-ddf1-48be-b73e-182664615d8e
[DEBUG ] (2021-09-17 21:53:49,656) victron_gatt.py::130 SmartSolar: notifications for 001b: 97580004-ddf1-48be-b73e-182664615d8e
[DEBUG ] (2021-09-17 21:53:49,657) victron_gatt.py::130 SmartSolar: notifications for 001d: 97580006-ddf1-48be-b73e-182664615d8e
[DEBUG ] (2021-09-17 21:53:49,658) victron_gatt.py::130 SmartSolar: notifications for 0021: 306b0002-b081-4037-83dc-e59fcc3cdfd0
[DEBUG ] (2021-09-17 21:53:49,659) victron_gatt.py::130 SmartSolar: notifications for 0024: 306b0003-b081-4037-83dc-e59fcc3cdfd0
[DEBUG ] (2021-09-17 21:53:49,660) victron_gatt.py::130 SmartSolar: notifications for 0027: 306b0004-b081-4037-83dc-e59fcc3cdfd0
[DEBUG ] (2021-09-17 21:53:49,661) victron_gatt.py::135 SmartSolar: enable notifications done
[DEBUG ] (2021-09-17 21:53:51,665) victron_gatt.py::84 SmartSolar: Send init sequence
[DEBUG ] (2021-09-17 21:53:51,665) victron_gatt.py::160 SmartSolar: sending 0021, databytearray(b'\xfa\x80\xff')
[DEBUG ] (2021-09-17 21:53:52,673) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:52,676) victron_gatt.py::160 SmartSolar: sending 0021, databytearray(b'\xf9\x80')
[DEBUG ] (2021-09-17 21:53:53,682) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:53,685) victron_gatt.py::160 SmartSolar: sending 0024, databytearray(b'\x01')
[DEBUG ] (2021-09-17 21:53:54,702) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:54,714) victron_gatt.py::160 SmartSolar: sending 0024, databytearray(b'\x03\x00')
[DEBUG ] (2021-09-17 21:53:55,725) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\x02\x9f\x00\x00\x01\x00\x03\x01\xff' - value_origin:b'\x02\x9f\x00\x00\x01\x00\x03\x01\xff'
[DEBUG ] (2021-09-17 21:53:55,726) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\xf9\x01\xf9\x01' - value_origin:b'\xf9\x01\xf9\x01'
[DEBUG ] (2021-09-17 21:53:55,726) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:55,726) victron_gatt.py::160 SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'\x03\x01\x03\x03")
[DEBUG ] (2021-09-17 21:53:56,728) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\xf9\x01' - value_origin:b'\xf9\x01'
[DEBUG ] (2021-09-17 21:53:56,728) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\x07\x00\x03\x00' - value_origin:b'\x07\x00\x03\x00'
[DEBUG ] (2021-09-17 21:53:56,731) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:56,741) victron_gatt.py::160 SmartSolar: sending 0027, databytearray(b'\x05\x00\x81\x19\xec\x0f\x05\x00\x81\x19\xec\x0e\x05\x00\x81\x19\x01\x0c\x05\x00')
[DEBUG ] (2021-09-17 21:53:57,755) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\xf9\x01' - value_origin:b'\xf9\x01'
[DEBUG ] (2021-09-17 21:53:57,755) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b"\x08\x00\x18\x93B\x10'" - value_origin:b"\x08\x00\x18\x93B\x10'"
[DEBUG ] (2021-09-17 21:53:57,755) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\x07\x00\x03\x00\x07\x00\x03\x00' - value_origin:b'\x07\x00\x03\x00\x07\x00\x03\x00'
[DEBUG ] (2021-09-17 21:53:57,756) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:57,756) victron_gatt.py::160 SmartSolar: sending 0024, databytearray(b'\x81\x18\x90\x05\x00\x81\x19\xec?\x05\x00\x81\x19\xec\x12')
[DEBUG ] (2021-09-17 21:53:58,757) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:58,757) victron_gatt.py::160 SmartSolar: sending 0024, databytearray(b'\x19\xec\xdc\x05\x03\x81\x19\xec\xeb\x05\x03\x81\x19\xec\xed')
[DEBUG ] (2021-09-17 21:53:59,759) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\xf9\x01' - value_origin:b'\xf9\x01'
[DEBUG ] (2021-09-17 21:53:59,759) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\t\x00\x19\xec\x0f\x01': 'unknown command (in fixed len) 0x0'
[DEBUG ] (2021-09-17 21:53:59,760) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\t\x00\x19\xec\x0e\x01': 'unknown command (in fixed len) 0x0'
[DEBUG ] (2021-09-17 21:53:59,760) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\t\x00\x19\x01\x0c\x01': 'unknown command (in fixed len) 0x0'
[DEBUG ] (2021-09-17 21:53:59,760) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\t\x00\x18\x90\x01' - value_origin:b'\t\x00\x18\x90\x01'
[DEBUG ] (2021-09-17 21:53:59,760) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\x08\x00\x19\xec?A\x01': 'unknown command (in var len) 0x3f in dict_keys([140, 141, 142, 125, 143, 188, 189, 187, 239, 240, 246])'
[DEBUG ] (2021-09-17 21:53:59,761) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\x08\x00\x19\xec\x12B\xff\xff': 'unknown command (in var len) 0x12 in dict_keys([140, 141, 142, 125, 143, 188, 189, 187, 239, 240, 246])'
[DEBUG ] (2021-09-17 21:53:59,761) victron_bluetooth.py::353 SmartSolar: Collected SmartSolar Solar Voltage -> 0.03
[DEBUG ] (2021-09-17 21:53:59,761) victron.py::82 SmartSolar: SmartSolar Solar Voltage not in any collections, it will never be published
[DEBUG ] (2021-09-17 21:53:59,761) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:53:59,761) victron_gatt.py::160 SmartSolar: sending 0021, databytearray(b'\xf9A')
[DEBUG ] (2021-09-17 21:54:00,763) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\xf9\x01' - value_origin:b'\xf9\x01'
[DEBUG ] (2021-09-17 21:54:00,763) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\xf7\x03\x00' - value_origin:b'\xf7\x03\x00'
[DEBUG ] (2021-09-17 21:54:00,764) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\t\x03\x19\xec\xeb\x01': 'unknown command (in fixed len) 0x0'
[DEBUG ] (2021-09-17 21:54:00,764) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\t\x03\x19\xec\xed\x01': 'unknown command (in fixed len) 0x0'
[DEBUG ] (2021-09-17 21:54:00,764) victron_bluetooth.py::353 SmartSolar: Collected SmartSolar Solar Voltage -> 0.01
[DEBUG ] (2021-09-17 21:54:00,764) victron.py::82 SmartSolar: SmartSolar Solar Voltage not in any collections, it will never be published
[DEBUG ] (2021-09-17 21:54:00,765) victron_bluetooth.py::353 SmartSolar: Collected Identify -> normal operation (default)
[DEBUG ] (2021-09-17 21:54:00,765) victron.py::82 SmartSolar: Identify not in any collections, it will never be published
[DEBUG ] (2021-09-17 21:54:00,765) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:54:00,765) victron_gatt.py::160 SmartSolar: sending 0024, databytearray(b"\x06\x00\x82\x18\x93B\x10'")
[DEBUG ] (2021-09-17 21:54:01,769) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
[DEBUG ] (2021-09-17 21:54:01,770) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
[DEBUG ] (2021-09-17 21:54:01,770) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:54:01,770) victron_gatt.py::160 SmartSolar: sending 0021, databytearray(b'\xf9A')
[DEBUG ] (2021-09-17 21:54:02,773) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\xf9\x01' - value_origin:b'\xf9\x01'
[DEBUG ] (2021-09-17 21:54:02,773) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b"\x08\x00\x18\x93B\x10'" - value_origin:b"\x08\x00\x18\x93B\x10'"
[DEBUG ] (2021-09-17 21:54:02,774) victron_gatt.py::96 SmartSolar: write succeeded
[DEBUG ] (2021-09-17 21:54:03,479) victron_bluetooth.py::244 UNRECOGNIZED DATA: SmartSolar: unknown single packet: value:b'\x08\x03\x18\x90A\x01' - value_origin:b'\x08\x03\x18\x90A\x01'
[DEBUG ] (2021-09-17 21:54:03,494) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\x08\x03\x19\x01PD\x01\x00\x00\x00': index out of range
[DEBUG ] (2021-09-17 21:54:05,804) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\x08\x03\x19\x02\x00A\x01': 35193608
[DEBUG ] (2021-09-17 21:54:05,819) victron_gatt.py::117 UNRECOGNIZED DATA: SmartSolar: error handling: b'\x08\x03\x19\x02\x02D\x02\x00\x00\x00': 35193608
[INFO ] (2021-09-17 21:54:10,789) victron_gatt.py::63 SmartSolar: Disconnected!
I just just got this project setup, thanks for making it by the way! Once it was connected to my smart solar 100/30 via vedirect and to my mqtt broker I noticed values being posted on the base of the mqtt broker and not under the topic I set. Is it suppose to do that? Seems like it would conflict when I add a smart shunt and it tries to post to the same base of the mqtt server and not its own sub-topic.
P.S. Do you see any problem with setting time timer to 1 second repeat on serial? For more real time values.
P.P.S. I had to downgrade from newer version of python down to python 3.8.13 to get the project to work. Others might find that useful in the readme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.