salut et bonne année également.
Effectivement si ca marchera pas si le LWT n’est pas sous le meme topic que BTtoMQTT.
Je n’ai pas testé le plugin-theengs depuis longtemps donc si pas moyen de changer ca va être un probleme…
je te suggère 3 autres solutions que j’utilise selon le contexte:
- installer l’image docker theengs
voici mon docker-compose.yml (sur mon Pi3B+):
# docker-compose.yml
services:
theengs:
container_name: theengs
image: theengs/gateway
network_mode: host
privileged: true
restart: unless-stopped
environment:
MQTT_HOST: localhost
MQTT_USERNAME: xxxx
MQTT_PASSWORD: yyyy
MQTT_PUB_TOPIC: theengs/tgw_local/BTtoMQTT
MQTT_SUB_TOPIC: theengs/tgw_local/commands
LWT_TOPIC: theengs/tgw_local/LWT
BLE_TIME_BETWEEN_SCANS: 60
SCAN_TIME: 4
LOG_LEVEL: WARNING
DISCOVERY_DEVICE_NAME: tgw_local
DISCOVERY_FILTER: "[IBEACON,GAEN,MS-CDP]"
ADAPTER: hci0
volumes:
- /var/run/dbus:/var/run/dbus
healthcheck:
test: 'hciconfig|awk "/hci0/{ print $0 }" || exit 1'
interval: 1m
timeout: 1s
start_period: 5s
retries: 3
- directement en python (ex sur mon PiZero). voici mon fichier theengs.conf:
{
"adapter": "",
"bindkeys": {},
"blacklist": [],
"ble": 1,
"ble_scan_time": 5,
"ble_time_between_scans": 60,
"discovery": 1,
"discovery_device_name": "tgw_remote",
"discovery_filter": [
"IBEACON"
],
"discovery_name": "tgw_remote",
"discovery_topic": "homeassistant",
"enable_tls": 0,
"enable_websocket": 0,
"general_presence": 0,
"hass_discovery": 1,
"host": "192.168.1.94",
"identities": {},
"log_level": "WARNING",
"lwt_topic": "theengs/tgw_remote/LWT",
"pass": "yyyy",
"port": 1883,
"presence": 0,
"presence_topic": "home/TheengsGateway/presence",
"publish_advdata": 0,
"publish_all": 1,
"publish_topic": "theengs/tgw_remote/BTtoMQTT",
"scan_duration": 60,
"scanning_mode": "active",
"subscribe_topic": "theengs/tgw_remote/commands",
"time_between": 60,
"time_format": 0,
"time_sync": [],
"tls_insecure": 0,
"tracker_timeout": 120,
"user": "jeedom",
"whitelist": []
}
tu peux aussi regarder ce tuto qui explique tout
- un ESP32