Salut,
je sais pas , c’est de la doc esphome. Mais je pense qu’avec bluetooth scanner sur mobile, tu dois trouver ces infos.
Pour la configue sur esphome, ces tags on besoin d’une connexion permanente, je sais pas comment ca peut fonctionner avec des Bluetooth proxy.
J’utilise l’intégration Bluetooth LE de HA et une clé Bluetooth. J’ai utiliser l’application Bluetooth scanner sur mobile pour trouver le MAC du iTAG , pour éviter de scanner tout les appareils Bluetooth sur HA.
dans mon know-devices.yaml:
itag_white:
name: 'iTAG White'
mac: BLE_FF:22:07:xx:xx:xx
icon: mdi:tag
picture:
track: true
itag_black:
name: 'iTAG Black'
mac: BLE_FF:22:07:xx:xx:xx
icon: mdi:tag
picture:
track: true
Pour esphome, j’ai tester c’est configue pour utiliser le bouton ( 2 click ) , ta peut faire sonner le itag. Ta le niveau de batterie et le rssi. Faut ajouter le tracker.
esp32_ble_tracker:
scan_parameters:
active: true
bluetooth_proxy:
active: true
ble_client:
- mac_address: FF:22:07:xx:xx:xx
id: itag_white
sensor:
- platform: ble_client
id: itag_white_ble_button_logic
type: characteristic
ble_client_id: itag_white
service_uuid: "ffe0"
characteristic_uuid: "ffe1"
notify: true
update_interval: never
on_notify:
then:
- if:
condition:
lambda: 'return !id(itag_button_state_helper).state;'
then:
- binary_sensor.template.publish:
id: itag_button_state_helper
state: ON
- binary_sensor.template.publish:
id: itag_button_state_helper
state: OFF
else:
- binary_sensor.template.publish:
id: itag_white_button_doubleclick
state: ON
- binary_sensor.template.publish:
id: itag_white_button_doubleclick
state: OFF
- platform: ble_client
type: characteristic
ble_client_id: itag_white
name: "iTag white Battery"
service_uuid: "180f"
characteristic_uuid: "2a19"
icon: "mdi:battery"
unit_of_measurement: "%"
- platform: ble_client
type: rssi
ble_client_id: itag_white
name: "iTag white RSSI"
switch:
- platform: ble_client
ble_client_id: itag_white
name: "Connect iTag white"
- platform: template
id: itag_button_state_helper
filters:
delayed_off: 500ms
on_release:
then:
- if:
condition:
lambda: 'return !id(itag_white_button_doubleclick).state;'
then:
- logger.log: "Single button press detected!"
- binary_sensor.template.publish:
id: itag_white_button
state: ON
- binary_sensor.template.publish:
id: itag_white_button
state: OFF
- platform: template
id: itag_white_button
name: "iTag white button"
filters:
delayed_off: 200ms
- platform: template
id: itag_white_button_doubleclick
name: "iTag white button doubleclick"
filters:
delayed_off: 1000ms
button:
- platform: template
name: "iTag white alert"
on_press:
- ble_client.ble_write:
id: itag_white
service_uuid: "1802"
characteristic_uuid: "2a06"
value: [0x01]
- delay: 10s
- ble_client.ble_write:
id: itag_white
service_uuid: "1802"
characteristic_uuid: "2a06"
value: [0x00]
Pas contre, la pile a pas l’air de tenir longtemps. 1 mois, voir un peu plus
Je ferais un retour, ca fais que 2 semaine que j’en utilise.
edit:
regarde ce sujet BLE Proxy détection adresse MAC