Hallo,
ich wollte meinen allpowers S2000 Akku per ESPhome zugaenglich machen.
Dazu habe ich folgende esphome config geschrieben
1 | esphome:
|
2 | name: allpowers
|
3 | platformio_options:
|
4 | board_build.flash_mode: dio
|
5 |
|
6 | esp32:
|
7 | board: seeed_xiao_esp32c3
|
8 | variant: esp32c3
|
9 | framework:
|
10 | type: arduino
|
11 | platform_version: 5.4.0
|
12 |
|
13 | wifi:
|
14 | ssid: "xxxx"
|
15 | password: "xxxxxxx"
|
16 |
|
17 | # Enable logging
|
18 | logger:
|
19 | level: DEBUG # Adjust the level to show more details in the logs
|
20 |
|
21 | # Enable Bluetooth Low Energy Client
|
22 | esp32_ble_tracker:
|
23 |
|
24 | # Define the BLE client
|
25 | ble_client:
|
26 | - mac_address: "xxxxxx" # Replace with the MAC address of your BLE device
|
27 | id: my_ble_device
|
28 |
|
29 | # Define the BLE service and characteristic
|
30 | sensor:
|
31 | - platform: ble_client
|
32 | ble_client_id: my_ble_device
|
33 | name: "BLE Characteristic FFF1"
|
34 | service_uuid: "0000FFF0-0000-1000-8000-00805F9B34FB" # Replace if needed
|
35 | characteristic_uuid: "FFF1"
|
36 | id: ble_characteristic_fff1
|
37 | icon: "mdi:bluetooth"
|
38 | notify: true
|
39 | update_interval: 60s
|
40 | type: characteristic
|
41 | - platform: ble_client
|
42 | ble_client_id: my_ble_device
|
43 | name: "BLE Characteristic AE02"
|
44 | service_uuid: "0000AE00-0000-1000-8000-00805F9B34FB" # Replace if needed
|
45 | characteristic_uuid: "AE01"
|
46 | id: ble_characteristic_ae02
|
47 | icon: "mdi:bluetooth"
|
48 | notify: true
|
49 | update_interval: 60s
|
50 | type: characteristic
|
51 | - platform: ble_client
|
52 | ble_client_id: my_ble_device
|
53 | id: device_name
|
54 | service_uuid: '1800' # Generic Access Profile
|
55 | characteristic_uuid: '2a00' # Device Name
|
56 | lambda: |-
|
57 | std::string data_string(x.begin(), x.end());
|
58 | id(allpowers_devicname).publish_state(data_string.c_str());
|
59 | return (float)x.size();
|
60 | type: characteristic
|
61 |
|
62 | text_sensor:
|
63 | - platform: template
|
64 | name: "Allpowers name"
|
65 | id: allpowers_devicname
|
66 |
|
67 | # Enable web server
|
68 | web_server:
|
69 | port: 80
|
Der name wird mir auf meiner website die ich erstellt habe erfolgreich
angezeigt allerdings bei den notify bekomme ich ich bei der id FFF1
immer nur 165 angezeigt egal was ich ein oder auschlate.
Ich habe mal anbei noch screenshots von der APP BLE_SCANNER angehaengt
fuer mehr infos.
Evtl. kann mr jdm helfen?
Habe auch dieses pythonscript gefunden aber es funktioniert bei mir
nicht
https://github.com/madninjaskillz/allpowers-ble/blob/main/src/allpowers_ble/allpowers_ble.py