Jump to content
WallDisplay: 2.0.0-beta3 is uploaded and ready for test ×

Reading Victron Bluetooth advertising protocol in Shelly script


xnd

Recommended Posts

 

Question

Anyone able to implement reading data from Victron devices? It is: Victron Bluetooth advertising protocol

More info:
- https://community.victronenergy.com/questions/187303/victron-bluetooth-advertising-protocol.html
- details: https://community.victronenergy.com/storage/attachments/48745-extra-manufacturer-data-2022-12-14.pdf

I'm able to read that data via script on my Shelly Plus Plug S but that data are encrypted.

Quote

The encryption is done using a **AES-CTR operation**

Shelly scripting environment is very limited and I'm unsuccessful with decrypting that data yet.

 

Thank you

Screen2024-06-17at22_34_21.thumb.png.b8b940518ab0bcb27b606d538bc7ca91.png

 

i'm using basic template for reading BLE data:

let SCAN_DURATION = BLE.Scanner.INFINITE_SCAN;

function scanCB(ev, res) {
  if (ev !== BLE.Scanner.SCAN_RESULT) return;
  if (typeof res.local_name !== 'string') return;
  
  if (res.local_name.indexOf('SmartSolar') < 0) return;
  
  try {
    console.log('== ' + res.local_name);
    const raw_data = res.manufacturer_data['02e1'];
    console.log(String(raw_data));

  } catch (e) {
    console.log('ERR', e);
  }
}

BLE.Scanner.Start({ duration_ms: SCAN_DURATION, active: true }, scanCB);

 

Edited by xnd
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...