Experimenting and decoding - seems some structs are wrong, check original code
This commit is contained in:
@@ -173,6 +173,38 @@ void setup() {
|
|||||||
DEVICE_TYPE_SOLAR_CHARGER // Device type
|
DEVICE_TYPE_SOLAR_CHARGER // Device type
|
||||||
);
|
);
|
||||||
|
|
||||||
|
victron.addDevice(
|
||||||
|
"Rainbow48Vb", // Device name
|
||||||
|
"3ffd00b83ffd00be",
|
||||||
|
"0ec3adf7433dd61793ff2f3b8ad32ed8", // Encryption key (32 hex chars)
|
||||||
|
DEVICE_TYPE_SOLAR_CHARGER // Device type
|
||||||
|
);
|
||||||
|
|
||||||
|
// WHY this one work?
|
||||||
|
victron.addDevice(
|
||||||
|
"Rainbow48Vc", // Device name
|
||||||
|
"3ffd00a83ffd00ae",
|
||||||
|
"0ec3adf7433dd61793ff2f3b8ad32ed8", // Encryption key (32 hex chars)
|
||||||
|
DEVICE_TYPE_SOLAR_CHARGER // Device type
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
[VictronBLE] Encrypted data: A0 01 83 2C 0E CF D6 04 89 72 6E 81 56 E4 2D F1 83
|
||||||
|
[VictronBLE] IV: 02 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
[VictronBLE] Decrypted data: E1 1C 99 32 D5 7E 81 A3 EB 8C 25 97 3E 0E DD 2D C4
|
||||||
|
[VictronBLE] Unknown device type: 0x10
|
||||||
|
[VictronBLE] BLE Device: 3ffd0148:3ffd014e, RSSI: -27 dBm
|
||||||
|
[VictronBLE] BLE Device: 3ffd0148:3ffd014e, RSSI: -81 dBm, Mfg ID: 0x2e1 (Victron)
|
||||||
|
[VictronBLE] Processing data from: Rainbow48Vc
|
||||||
|
[VictronBLE] Encrypted data: A0 01 83 2C 0E CF D6 04 89 72 6E 81 56 E4 2D F1 83
|
||||||
|
[VictronBLE] IV: 02 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
[VictronBLE] Decrypted data: E1 1C 99 32 D5 7E 81 A3 EB 8C 25 97 3E 0E DD 2D C4
|
||||||
|
[VictronBLE] Unknown device type: 0x10
|
||||||
|
[VictronBLE] BLE Device: 3ffd0148:3ffd014e, RSSI: -49 dBm, Mfg ID: 0x75
|
||||||
|
[VictronBLE] BLE Device: 3ffd0148:3ffd014e, RSSI: -26 dBm
|
||||||
|
*/
|
||||||
|
|
||||||
// Example: Solar Charger #1
|
// Example: Solar Charger #1
|
||||||
victron.addDevice(
|
victron.addDevice(
|
||||||
"MPPT 100/30", // Device name
|
"MPPT 100/30", // Device name
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ void VictronBLE::processDevice(BLEAdvertisedDevice advertisedDevice) {
|
|||||||
if (mfgData.length() >= 2) {
|
if (mfgData.length() >= 2) {
|
||||||
uint16_t mfgId = (uint8_t)mfgData[1] << 8 | (uint8_t)mfgData[0];
|
uint16_t mfgId = (uint8_t)mfgData[1] << 8 | (uint8_t)mfgData[0];
|
||||||
if (mfgId == VICTRON_MANUFACTURER_ID) {
|
if (mfgId == VICTRON_MANUFACTURER_ID) {
|
||||||
debugPrint("Found unmonitored Victron Device: " + mac);
|
debugPrint("Found unmonitored Victron Device: " + normalizeMAC(mac));
|
||||||
// DeviceInfo* deviceInfo = new DeviceInfo(mac, advertisedDevice.getName());
|
// DeviceInfo* deviceInfo = new DeviceInfo(mac, advertisedDevice.getName());
|
||||||
// devices.insert({normalizedMAC, deviceInfo});
|
// devices.insert({normalizedMAC, deviceInfo});
|
||||||
// XXX What type of Victron device is it?
|
// XXX What type of Victron device is it?
|
||||||
|
|||||||
Reference in New Issue
Block a user