As title. I’m not sure if the information broadcast by Victron is some proprietary format or not.
Turns out the advertisements are encrypted. Can this be supported?
https://community.victronenergy.com/questions/93919/victron-bluetooth-ble-protocol-publication.html
The best support could be a decoder to decode any information encoded in the Bluetooth BLE advertising data, which also seems to be encrypted so that the encryption key would need to be retrieved by you, and only Theengs Gateway is currently supporting decryption.
For this, a more appropriate link would be this one, also giving information on how to retrieve the encryption key
https://community.victronenergy.com/questions/187303/victron-bluetooth-advertising-protocol.html
and in the comments a link to a GitHub repo already implementing the decryption and decoding for some Victron devices, which we could then implement in a similar way in a decoder, with your help of giving data samples and your testing with your encryption key.
I’d be more than happy to help with sample data and testing.
Can you start by installing Theengs Gateway on one of your machines? Usually easiest with a pip install.
And then give some sample encrypted and undecoded raw advertising data messages by starting Theengs Gateway with
-padv PUBLISH_ADVDATA, --publish_advdata PUBLISH_ADVDATA
Publish advertising and advanced data (1) or not (0)
(default: 0)
set to 1.
Can you also clarify which exact Victron model you have?
Heh - well, I have a lot of Victron gear, but I am particularly interested in gathering data from these: Blue Smart IP65 Charger (120V and 230V) - Victron Energy
I haven’t ordered one yet.
In the meantime I have some other devices I will try this with.
I’ve installed Theengs using WSL. It seems to install ok - I can see it connect to my mqtt server:
But, it doesn’t appear to be picking anything up. I can see devices using the nrf scanner, also the Victron bluetooth app.
Is this:
INFO:BLEGateway:Starting BLE scan
INFO:BLEGateway:Connected to MQTT broker
INFO:BLEGateway:Subscribed to home/+/BTtoMQTT/undecoded
ERROR:BLEGateway:[org.freedesktop.DBus.Error.ServiceUnknown] The name org.bluez was not provided by any .service files
an issue?
Is this information useful? I can try to grab
it as text later.
Oh, I missed the copy button:
0x0201061AFFE102100289A302B3B8F5EF9C2669E3B2E28F109D7CC484EEF91709536D6172745368756E7420485132313433524E585050
Personally I don’t have any experience with WSL, and
ERROR:BLEGateway:[org.freedesktop.DBus.Error.ServiceUnknown] The name org.bluez was not provided by any .service files
there definitely seems to be an issue with the Bluetooth service/adapter.
Best to log an issue for Theengs Gateway at
Yes, the advertising data, especially in the first screenshot, is the data which Theengs Decoder could use to decoder any encoded data, once decrypted, but it would be best to get it as Theengs Gateway MQTT messages, to see exactly how Gateway publishes this data, and for further decryption.
So once your Bluetooth/Bluez issue with Gateway is sorted out and you have Theengs Gateway running, it’s best to continue this, expectedly longer ;), decryption and decoding process in the Theengs Decoder discussions, at
Thanks
So I’m no bluetooth expert but I read that in Victron you can now enable GATT for the Smartsolar and Smartshunt and apparently enjoy unencrypted bluetooth.
Hi @simowilso
We are close to implementing Victron Energy device decryption decoders, starting with the Smart BatteryProtect with the help of @geekydrewbie.
From your above screenshots I can see the BLE advertising data of your Smart Battery Sense, but the party you copied was the wrong section
Best if you could get some actual TGW Plug-in data, by activating
in the Plug-in, and then copying and pasting 2 or 3 sample messages you receive and can see in MQTT Explorer.
This will help in also adding a decoder for any Victron battery monitor.
Interesting. I can try, but it will be several days at minimum because I am nowhere near my Victron devices at the moment.
No worries, @geekydrewbie and I are still taking the last hurdles of the Victron decoding anyway So no rush
Actually, no worries, as with the above image you posted I got the initial encrypted BLE advertising data just fine.
Only having upgraded my system recently I still need to remember and get used to macOS being able to select text and also translate it from images
The next step would be to be able to decrypt this data. You can either send me your bindkey for your SmartShunt in a private message here, or if you do not feel comfortable with that I can also give you a link and instructions on how to decrypt the information online, after which you can only sepost the decrypted data here for finalising the data decoder.