Wstęp do Bramki BLE

Adamus10
Posts: 22
Joined: Sat Oct 28, 2023 8:05 pm

Post

Cześć,

Rozwijając urządzenie przygotowane w ramach tematu o termometrze XAOMI (viewtopic.php?t=11193) narodził mi się w głowie pomysł bramki dla urządzeń BLE.

Mogę głównie się oprzeć na kodzie z biblioteki, która odnalazłem dla urządzeń BLE (do dekodowania) oraz części z kodu z linka do wysyłania dla SUPLI

Wyzwania do rozwiązania dla mnie (nie jestem obeznany w tym języku programowania jak i supli):
- test urządzeń z obszernej listy, którą biblioteka obsługuje na podstawie kodu z biblioteki (liczę na społeczność)
- zmienne, do przemyślenia jak zmienić model z obsługi termometrów na bardziej optymalny. Czujników może być sporo więc trzeba przemyśleć by nie zadeklarować tablice dla liczbę czujników x liczba danych
- być może próba z ominięciem zmiennych by za jednym razem zaraz po odczytaniu przesyłać dane na suple
- zarządzanie kanałami (modyfikacja kolejności macadresów nie wpływała na przesył (kolejność) danych, podobnie usunięcie macadresu)
- moduł konfiguracji web

Prace nad kodem trwają powoli, nie ma się jeszcze czym chwalić.

Zależy mi na ten moment by chętni zainstalowali sobie bibliotekę i przetestowali co tam serial wypluje z siebie.
U mnie to wygląda tak:

Code: Select all

Scanning...
Advertised Device: Name: ATC_61263A, Address: a4:c1:38:61:26:3a
Service Data:
UUID: 0x181a, Data: ��8a&: 
TheengsDecoder found device: {"id":"A4:C1:38:61:26:3A","name":"ATC_61263A","rssi":-90,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":20.1,"tempf":68.18,"hum":57,"batt":59,"volt":2.744,"mac":"A4:C1:38:61:26:3A"}
Advertised Device: Name: ATC_A84299, Address: a4:c1:38:a8:42:99
Service Data:
UUID: 0x181a, Data: ��8�B� 
TheengsDecoder found device: {"id":"A4:C1:38:A8:42:99","name":"ATC_A84299","rssi":-77,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":20.9,"tempf":69.62,"hum":56,"batt":82,"volt":2.946,"mac":"A4:C1:38:A8:42:99"}
Advertised Device: Name: ATC_511184, Address: a4:c1:38:51:11:84
Service Data:
UUID: 0x181a, Data: ��8Q� 
TheengsDecoder found device: {"id":"A4:C1:38:51:11:84","name":"ATC_511184","rssi":-85,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":21.1,"tempf":69.98,"hum":60,"batt":65,"volt":2.797,"mac":"A4:C1:38:51:11:84"}
Advertised Device: Name: ATC_7B61C9, Address: a4:c1:38:7b:61:c9
Service Data:
UUID: 0x181a, Data: ��8{a� 
TheengsDecoder found device: {"id":"A4:C1:38:7B:61:C9","name":"ATC_7B61C9","rssi":-30,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":21,"tempf":69.8,"hum":58,"batt":73,"volt":2.877,"mac":"A4:C1:38:7B:61:C9"}
Kod do wgrania na ESP32:

Code: Select all

#include <Arduino.h>

#define ARDUINOJSON_USE_LONG_LONG 1
#include "ArduinoJson.h"

#include "NimBLEDevice.h"
#include "decoder.h"

NimBLEScan* pBLEScan;

TheengsDecoder decoder;

StaticJsonDocument<512> doc;

class MyAdvertisedDeviceCallbacks: public NimBLEAdvertisedDeviceCallbacks {

  std::string convertServiceData(std::string deviceServiceData) {
    int serviceDataLength = (int)deviceServiceData.length();
    char spr[2 * serviceDataLength + 1];
    for (int i = 0; i < serviceDataLength; i++) sprintf(spr + 2 * i, "%.2x", (unsigned char)deviceServiceData[i]);
    spr[2 * serviceDataLength] = 0;
    return spr;
  }

  void onResult(BLEAdvertisedDevice* advertisedDevice) {
    Serial.printf("Advertised Device: %s \n", advertisedDevice->toString().c_str());
    JsonObject BLEdata = doc.to<JsonObject>();
    String mac_adress = advertisedDevice->getAddress().toString().c_str();
    mac_adress.toUpperCase();
    BLEdata["id"] = (char*)mac_adress.c_str();

    if (advertisedDevice->haveName())
      BLEdata["name"] = (char*)advertisedDevice->getName().c_str();

    if (advertisedDevice->haveManufacturerData()) {
      char* manufacturerdata = BLEUtils::buildHexData(NULL, (uint8_t*)advertisedDevice->getManufacturerData().data(), advertisedDevice->getManufacturerData().length());
      BLEdata["manufacturerdata"] = manufacturerdata;
      free(manufacturerdata);
    }

    if (advertisedDevice->haveRSSI())
      BLEdata["rssi"] = (int)advertisedDevice->getRSSI();

    if (advertisedDevice->haveTXPower())
      BLEdata["txpower"] = (int8_t)advertisedDevice->getTXPower();

    if (advertisedDevice->haveServiceData()) {
      int serviceDataCount = advertisedDevice->getServiceDataCount();
      for (int j = 0; j < serviceDataCount; j++) {
        std::string service_data = convertServiceData(advertisedDevice->getServiceData(j));
        BLEdata["servicedata"] = (char*)service_data.c_str();
        std::string serviceDatauuid = advertisedDevice->getServiceDataUUID(j).toString();
        BLEdata["servicedatauuid"] = (char*)serviceDatauuid.c_str();
      }
    }

    if (decoder.decodeBLEJson(BLEdata)) {
      BLEdata.remove("manufacturerdata");
      BLEdata.remove("servicedata");
      BLEdata.remove("servicedatauuid");
      BLEdata.remove("type");
      BLEdata.remove("cidc");
      BLEdata.remove("acts");
      BLEdata.remove("cont");
      BLEdata.remove("track");
      Serial.print("TheengsDecoder found device: ");
      serializeJson(BLEdata, Serial);
      Serial.println("");
    }
  }
};

void setup() {
  Serial.begin(115200);
  Serial.println("Scanning...");
  NimBLEDevice::setScanFilterMode(CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE);
  NimBLEDevice::setScanDuplicateCacheSize(200);
  NimBLEDevice::init("");

  pBLEScan = NimBLEDevice::getScan(); //create new scan
  // Set the callback for when devices are discovered, no duplicates.
  pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks(), false);
  pBLEScan->setActiveScan(true); // Set active scanning, this will get more data from the advertiser.
  pBLEScan->setInterval(97); // How often the scan occurs / switches channels; in milliseconds,
  pBLEScan->setWindow(37);  // How long to scan during the interval; in milliseconds.
  pBLEScan->setMaxResults(0); // do not store the scan results, use callback only.
}

void loop() {
  // If an error occurs that stops the scan, it will be restarted here.
  if(pBLEScan->isScanning() == false) {
      // Start scan with: duration = 0 seconds(forever), no scan end callback, not a continuation of a previous scan.
      pBLEScan->start(0, nullptr, false);
  }

  delay(2000);
}

Biblioteki do zainstalowania:
  • ArduinoJson
  • NimBLE-Arduino
  • TheengsDecoder
Lista wspieranych urządzeń przez bibliotekę:
https://decoder.theengs.io/devices/devices.html
Aktualnie około 100 urządzeń, listę zawsze można rozszerzyć.
Git: https://github.com/ElPlecinio
User avatar
iborkim
Posts: 85
Joined: Sat Jun 11, 2016 10:59 am

Post

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
Scanning...
Advertised Device: Name: , Address: d4:9d:c0:92:f8:8b, manufacturer data: 75004204018060d49dc092f88bd69dc092f88a01000000000000 
TheengsDecoder found device: {"id":"D4:9D:C0:92:F8:8B","rssi":-97}
Advertised Device: Name: , Address: 0b:18:d3:f6:ab:df, manufacturer data: 06000109210a359a2f2500384445534b544f502d55554e504e4c30 
TheengsDecoder found device: {"id":"0B:18:D3:F6:AB:DF","rssi":-50,"brand":"GENERIC","model":"MS-CDP","model_id":"MS-CDP","device":"Microsoft advertising beacon"}
Advertised Device: Name: , Address: d0:d0:03:a0:b2:91, manufacturer data: 75004204018060d0d003a0b291d2d003a0b29001000000000000 
TheengsDecoder found device: {"id":"D0:D0:03:A0:B2:91","rssi":-67}
Advertised Device: Name: [AV] samsung bar, Address: 24:fc:e5:af:7d:4c, manufacturer data: 7500420483401118070024fce5af7d4c000026fce5af7d4b0006 
TheengsDecoder found device: {"id":"24:FC:E5:AF:7D:4C","name":"[AV] samsung bar","rssi":-69}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225e466bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%�f��8���<~� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-73}
Advertised Device: Name: ATC_FEA3A9, Address: a4:c1:38:fe:a3:a9
Service Data:
UUID: 0x181a, Data: ��8��� 
TheengsDecoder found device: {"id":"A4:C1:38:FE:A3:A9","name":"ATC_FEA3A9","rssi":-43,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":22.2,"tempf":71.96,"hum":57,"batt":87,"volt":2.997,"mac":"A4:C1:38:FE:A3:A9"}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225e666bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%���ts�� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-81}
Advertised Device: Name: , Address: 44:54:07:e5:2f:29, serviceUUID: 0xfe50
Service Data:
UUID: 0xfe50, Data: �� 
TheengsDecoder found device: {"id":"44:54:07:E5:2F:29","rssi":-68}
Advertised Device: Name: Qingping Temp RH M, Address: 58:2d:34:81:57:3a
Service Data:
UUID: 0xfdcd, Data: :W�4-X� 
TheengsDecoder found device: {"id":"58:2D:34:81:57:3A","name":"Qingping Temp RH M","rssi":-75,"brand":"ClearGrass/Qingping","model":"Round TH","model_id":"CGG1","tempc":21.5,"tempf":70.7,"hum":56.7,"batt":80,"mac":"58:2D:34:81:57:3A"}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225ea66bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%�8���@k3 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-75}
Advertised Device: Name: ATC_72CFF8, Address: a4:c1:38:72:cf:f8
Service Data:
UUID: 0x181a, Data: ��8r�� 
TheengsDecoder found device: {"id":"A4:C1:38:72:CF:F8","name":"ATC_72CFF8","rssi":-92,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":21.7,"tempf":71.06,"hum":56,"batt":50,"volt":2.673,"mac":"A4:C1:38:72:CF:F8"}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225ec66bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%�$�)���� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-76}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225ee66bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%�JD���L� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-87}
Advertised Device: Name: ATC_97184F, Address: a4:c1:38:97:18:4f
Service Data:
UUID: 0x181a, Data: ��8�O 
TheengsDecoder found device: {"id":"A4:C1:38:97:18:4F","name":"ATC_97184F","rssi":-62,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":21.5,"tempf":70.7,"hum":59,"batt":36,"volt":2.556,"mac":"A4:C1:38:97:18:4F"}
Advertised Device: Name: LYWSD02, Address: 3f:59:c8:81:cc:37, serviceUUID: 0x181a
Service Data:
UUID: 0xfe95, Data: p [B7́�Y?	� 
TheengsDecoder found device: {"id":"3F:59:C8:81:CC:37","name":"LYWSD02","rssi":-93,"brand":"Xiaomi/Mijia","model":"e-ink Clock","model_id":"LYWSD02","hum":76,"mac":"3F:59:C8:81:CC:37"}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225f066bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%�M���Y� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-77}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225f266bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%�%}
7� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-92}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f0310584225f866bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%�f��8��Go� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-71}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842250066bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%f��8���r� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-72}
Advertised Device: Name: MI_SCALE, Address: 88:0f:10:a8:1e:d7, manufacturer data: 5701880f10a81ed7, serviceUUID: 0x181d
Service Data:
UUID: 0x181d, Data: � 
TheengsDecoder found device: {"id":"88:0F:10:A8:1E:D7","name":"MI_SCALE","rssi":-97}
Advertised Device: Name: ATC_DF3D36, Address: a4:c1:38:df:3d:36
Service Data:
UUID: 0x181a, Data: ��8�=6 
TheengsDecoder found device: {"id":"A4:C1:38:DF:3D:36","name":"ATC_DF3D36","rssi":-86,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":19.9,"tempf":67.82,"hum":66,"batt":47,"volt":2.65,"mac":"A4:C1:38:DF:3D:36"}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842250666bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%�4��:# 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-72}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842250866bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%1>BF6�" 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-80}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842250a66bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%f��8��y��� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-86}
Advertised Device: Name: D1705081, Address: 00:a0:50:5e:62:4d, serviceUUID: 00035b03-58e6-07dd-021a-08123a000300 
TheengsDecoder found device: {"id":"00:A0:50:5E:62:4D","name":"D1705081","rssi":-98}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842250e66bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%;D�J�_ 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-69}
Advertised Device: Name: ATC_0CECEE, Address: a4:c1:38:0c:ec:ee
Service Data:
UUID: 0x181a, Data: ��8�� 
TheengsDecoder found device: {"id":"A4:C1:38:0C:EC:EE","name":"ATC_0CECEE","rssi":-97,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":17.4,"tempf":63.32,"hum":62,"batt":58,"volt":2.746,"mac":"A4:C1:38:0C:EC:EE"}
����������������������������������������������������������������vertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842251866bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%f��8��`�O� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-76}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842251c66bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%f��8��+7K 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-70}
Advertised Device: Name: ATC_3BC1CA, Address: a4:c1:38:3b:c1:ca
Service Data:
UUID: 0x181a, Data: ��8;�� 
TheengsDecoder found device: {"id":"A4:C1:38:3B:C1:CA","name":"ATC_3BC1CA","rssi":-96,"brand":"Xiaomi","model":"TH Sensor","model_id":"LYWSD03MMC/MJWSD05MMC_ATC","tempc":11.5,"tempf":52.7,"hum":73,"batt":22,"volt":2.434,"mac":"A4:C1:38:3B:C1:CA"}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842252a66bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%*�i�T� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-74}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842252c66bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%-f��8���޾w 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-72}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842253066bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%0b�UB�z 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-71}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842253666bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%6�f8h��� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-80}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842254266bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%B��t���� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-76}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842255266bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%R~���޵� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-75}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842255466bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%Uf��8��uo� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-73}
Advertised Device: Name: , Address: 56:6d:5d:7f:19:24, manufacturer data: 4c0002151ca92e23f0874df7b9a2fd4b716a4bf6004d000003 
TheengsDecoder found device: {"id":"56:6D:5D:7F:19:24","rssi":-74,"brand":"GENERIC","model":"iBeacon","model_id":"IBEACON","mfid":"4c00","uuid":"1ca92e23f0874df7b9a2fd4b716a4bf6","major":77,"minor":0,"volt":0.3}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842255666bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%Wf��8���Ѧ\ 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-73}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842255a66bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%Z��1�z� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-80}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842256466bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%dp��_N� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-68}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842256666bae938c1a4
Service Data:
UUID: 0xfe95, Data: HXB%f�ƴ�؆ 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-77}
Advertised Device: Name: , Address: a4:c1:38:e9:ba:66, manufacturer data: 8f03105842256866bae938c1a4
Service Data:
UUID: 0xfe95, Data: XXB%if��8����!� 
TheengsDecoder found device: {"id":"A4:C1:38:E9:BA:66","rssi":-68}
>
Wziąłem udział w Supla Offline Party 2024
User avatar
Robert Błaszczak
Posts: 4504
Joined: Sat Dec 22, 2018 8:55 pm
Location: Zielona Góra

Post

Proponowałbym poczekać na KPOP dla realizacji obsługi innych urządzeń niż termometr/higrometr.
Pozdrawiam
Robert Błaszczak


Moja prywatna strona: www.blaszczak.pl
lukasz06
Posts: 1270
Joined: Sun Jul 17, 2022 6:53 pm

Post

Rzeczywiście urządzeń jest sporo. Na razie mam tylko 2 termometry, trzeba się zaopatrzyć w jakiś czujnik i testować. Trzymam kciuki :)
lukasz06
Posts: 1270
Joined: Sun Jul 17, 2022 6:53 pm

Post

Wgrałem, ale z takimi błędami nic nie pokazuje na monitorze

C:\Users\Jacek\Documents\Arduino\Bramka_Ble_Test\Bramka_Ble_Test.ino:13:1: warning: 'template<unsigned int N> class ArduinoJson::V703PB2::StaticJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]
StaticJsonDocument<512> doc;
^~~~~~~~~~~~~~~~~~
In file included from c:\Users\Jacek\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:53,
from c:\Users\Jacek\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Jacek\Documents\Arduino\Bramka_Ble_Test\Bramka_Ble_Test.ino:4:
c:\Users\Jacek\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/compatibility.hpp:63:58: note: declared here
class ARDUINOJSON_DEPRECATED("use JsonDocument instead") StaticJsonDocument
^~~~~~~~~~~~~~~~~~
Szkic używa 693129 bajtów (35%) pamięci programu. Maksimum to 1966080 bajtów.
Zmienne globalne używają 36352 bajtów (11%) pamięci dynamicznej, pozostawiając 291328 bajtów dla zmiennych lokalnych. Maksimum to 327680 bajtów.
esptool.py v4.5.1
User avatar
veeroos
Posts: 651
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów

Post

Hej. Fajny pomysł, w wolnej chwili wrzucę Twój kawałek kodu do ESP i zobaczę co wypluwa na serialu. Jednakże testy można porobić, ale wz wypuszczeniem bramki bym poczekał tak jak kolega Robert napisał do opublikowania KPOP. Dobrze by było żeby wartości były wyświetlane w odpowiednich jednostkach.

Edit.


KPOP już jest 😉, kurde mam zaległości 😁
Zamel Mew-01, Wemos D1 mini Pro + Ikea vindriktning + BME280, 3x - SonOff mini, 3x - SonOff Basic, 3xGosund SP111, SonOff S55, 2x GOSUND WB4

https://github.com/v33r005
Yepestis
Posts: 773
Joined: Mon Sep 24, 2018 6:08 pm
Location: Wrocław

Post

veeroos wrote: Fri Feb 16, 2024 7:10 pm KPOP już jest 😉, kurde mam zaległości 😁
Obecnie tylko na beta serwerze ale na produkcji zapewne niedługo też zawita :D
lukasz06
Posts: 1270
Joined: Sun Jul 17, 2022 6:53 pm

Post

Cos się dzieje w tym temacie?
Adamus10
Posts: 22
Joined: Sat Oct 28, 2023 8:05 pm

Post

lukasz06 wrote: Tue Mar 19, 2024 5:53 pm Cos się dzieje w tym temacie?
W drugiej połowie kwietnia ruszam z tematem.
Git: https://github.com/ElPlecinio
Bartoni
Posts: 166
Joined: Sun Jul 18, 2021 6:48 pm

Post

Adamus10 wrote: Tue Mar 19, 2024 10:37 pm
W drugiej połowie kwietnia ruszam z tematem.
Wystartowały już prace nad tą bramka?

Return to “Zagadnienia ogólne”