Theengs Gateway (tgw) - stable
MQTT Discovery (MQTTDiscovery) - beta
Bonjour,
Je rencontre des problèmes avec une de mes antennes TGW installées sur un Rasberry 3. ID1491
Elle a subitement arrêtée de fonctionner.
0000|[2024-01-17 16:34:02]DEBUG : SSH exec:hcitool dev | grep hci => hci1 B8:27:EB:4D:56:CB hci0 00:01:95:5E:1A:D3
0001|[2024-01-17 16:34:02]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.15
0002|[2024-01-17 16:34:14]DEBUG : Listening to topic:'tgw'
0003|[2024-01-17 16:34:14]INFO : Configuration de l'antenne 'TGW RPI'
0004|[2024-01-17 16:34:14]DEBUG : Informations reçues de mqtt2: {"ip":"192.168.1.241","port":"1883","user":"","password":null}
0005|[2024-01-17 16:34:17]DEBUG : SSH exec:echo '{"adapter":"hci0","discovery_filter":["IBEACON","GAEN","MS-CDP","APPLE_CONT","APPLE_CONTAT"],"discovery_device_name":"TGW RPI","log_level":"DEBUG","host":"192.168.1.241","port":1883,"user":"","pass":null,"lwt_topic":"tgw\/1491\/LWT","publish_topic":"home\/TGW_1491\/BTtoMQTT"}' | sudo tee /root/theengsgw.conf => {"adapter":"hci0","discovery_filter":["IBEACON","GAEN","MS-CDP","APPLE_CONT","APPLE_CONTAT"],"discovery_device_name":"TGW RPI","log_level":"DEBUG","host":"192.168.1.241","port":1883,"user":"","pass":null,"lwt_topic":"tgw\/1491\/LWT","publish_topic":"home\/TGW_1491\/BTtoMQTT"}
0006|[2024-01-17 16:34:18]DEBUG : SSH exec:sudo systemctl stop TheengsGateway.service =>
0007|[2024-01-17 16:34:19]DEBUG : SSH exec:echo ' [Unit] Description=TheengsGateway Service After=network-online.target [Service] Type=simple ExecStart=/root/.local/bin/TheengsGateway Restart=always RestartSec=10 StandardOutput=append:/var/log/TheengsGateway.log StandardError=append:/var/log/TheengsGateway.log [Install] WantedBy=multi-user.target ' | sudo tee /etc/systemd/system/TheengsGateway.service => [Unit] Description=TheengsGateway Service After=network-online.target [Service] Type=simple ExecStart=/root/.local/bin/TheengsGateway Restart=always RestartSec=10 StandardOutput=append:/var/log/TheengsGateway.log StandardError=append:/var/log/TheengsGateway.log [Install] WantedBy=multi-user.target
0008|[2024-01-17 16:34:20]DEBUG : SSH exec:sudo systemctl daemon-reload =>
0009|[2024-01-17 16:34:21]DEBUG : SSH exec:sudo systemctl enable --now TheengsGateway.service =>
0010|[2024-01-17 16:34:23]DEBUG : SSH exec:echo ' /var/log/TheengsGateway.log { rotate 4 daily copytruncate size=100k maxsize=50M compress missingok notifempty } ' | sudo tee /etc/logrotate.d/TheengsGateway => /var/log/TheengsGateway.log { rotate 4 daily copytruncate size=100k maxsize=50M compress missingok notifempty }
0011|[2024-01-17 16:35:05]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.15
0012|[2024-01-17 16:36:02]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.15
0013|[2024-01-17 16:36:20]DEBUG : SSH exec:ls /tmp/ | grep -Ec tgw_install_in_progress => 0
0014|[2024-01-17 16:36:23]DEBUG : SSH exec:sudo /root/.local/bin/TheengsGateway -h | grep -Ecw "usage:" => 1
0015|[2024-01-17 16:37:03]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.15
0016|[2024-01-17 16:37:19]DEBUG : SSH exec:hcitool dev | grep hci => hci1 B8:27:EB:4D:56:CB hci0 00:01:95:5E:1A:D3
0017|[2024-01-17 16:37:23]DEBUG : SSH exec:ls /tmp/ | grep -Ec tgw_install_in_progress => 0
0018|[2024-01-17 16:37:26]DEBUG : SSH exec:sudo /root/.local/bin/TheengsGateway -h | grep -Ecw "usage:" => 1
0019|[2024-01-17 16:38:02]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.15
0020|[2024-01-17 16:38:15]DEBUG : SSH exec:hcitool dev | grep hci => hci1 B8:27:EB:4D:56:CB hci0 00:01:95:5E:1A:D3
0021|[2024-01-17 16:38:19]INFO : (Re)Démarrage de l'antenne 'TGW RPI'
0022|[2024-01-17 16:38:19]DEBUG : Listening to topic:'tgw'
0023|[2024-01-17 16:38:20]DEBUG : SSH exec:sudo systemctl restart TheengsGateway.service =>
0024|[2024-01-17 16:38:22]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.14
0025|[2024-01-17 16:39:03]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.15
0026|[2024-01-17 16:39:04]DEBUG : SSH exec:ls /tmp/ | grep -Ec tgw_install_in_progress => 0
0027|[2024-01-17 16:39:07]DEBUG : SSH exec:sudo /root/.local/bin/TheengsGateway -h | grep -Ecw "usage:" => 1
0028|[2024-01-17 16:39:24]DEBUG : SSH exec:ls /tmp/ | grep -Ec tgw_install_in_progress => 0
0029|[2024-01-17 16:39:27]DEBUG : SSH exec:sudo /root/.local/bin/TheengsGateway -h | grep -Ecw "usage:" => 1
0030|[2024-01-17 16:40:05]DEBUG : get file '/var/log/TheengsGateway.log' from 192.168.1.15
0000|"presence_topic": "home/TheengsGateway/presence",
0001|"publish_advdata": 0,
0002|"publish_all": 1,
0003|"publish_topic": "home/TGW_1491/BTtoMQTT",
0004|"scanning_mode": "active",
0005|"subscribe_topic": "home/+/BTtoMQTT/undecoded",
0006|"time_format": 0,
0007|"time_sync": [],
0008|"user": "***"
0009|}
0010|```
0011|## Bluetooth adapters
0012|Default adapter: hci0
0013|### hci0
0014|| Name | Value |
0015||--------------|-------------------------|
0016|| address | 00:01:95:XX:XX:XX |
0017|| sw_version | raspberrypi #1 |
0018|| hw_version | usb:v1D6Bp0246d0537 |
0019|| passive_scan | 0 |
0020|| manufacturer | Sena Technologies, Inc. |
0021|| product | 0001 |
0022|| vendor_id | 0a12 |
0023|| product_id | 0001 |
0024|### hci1
0025|| Name | Value |
0026||--------------|-------------------------|
0027|| address | B8:27:EB:XX:XX:XX |
0028|| sw_version | raspberrypi |
0029|| hw_version | usb:v1D6Bp0246d0537 |
0030|| passive_scan | 0 |
0031|| manufacturer | Raspberry Pi Foundation |
0032|Traceback (most recent call last):
0033|File "/root/.local/bin/TheengsGateway", line 4, in
0034|main()
0035|File "/root/.local/share/pipx/venvs/theengsgateway/lib/python3.9/site-packages/TheengsGateway/__init__.py", line 57, in main
0036|run(configuration, config_path)
0037|File "/root/.local/share/pipx/venvs/theengsgateway/lib/python3.9/site-packages/TheengsGateway/ble_gateway.py", line 591, in run
0038|asyncio.run(diagnostics(config_path))
0039|File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
0040|return loop.run_until_complete(main)
0041|File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
0042|return future.result()
0043|File "/root/.local/share/pipx/venvs/theengsgateway/lib/python3.9/site-packages/TheengsGateway/diagnose.py", line 172, in diagnostics
0044|await _adapters()
0045|File "/root/.local/share/pipx/venvs/theengsgateway/lib/python3.9/site-packages/TheengsGateway/diagnose.py", line 155, in _adapters
0046|_section(adapter, properties) # type: ignore[arg-type]
0047|File "/root/.local/share/pipx/venvs/theengsgateway/lib/python3.9/site-packages/TheengsGateway/diagnose.py", line 55, in _section
0048|print(f"| {name:{max_name}} | {value:{max_value}} |")
0049|TypeError: unsupported format string passed to NoneType.__format__
0050|# Theengs Gateway Diagnostics
0051|## Package Versions
0052|| Name | Value |
0053||--------------------|--------|
0054|| Theengs Gateway | 1.2.0 |
0055|| Theengs Decoder | 1.6.8 |
0056|| Bleak | 0.21.1 |
0057|| Bluetooth Clocks | 0.2.0 |
0058|| Bluetooth Numbers | 1.1.1 |
0059|| Paho MQTT | 1.6.1 |
0060|| Bluetooth Adapters | 0.17.0 |
0061|## Python
0062|| Name | Value |
0063||----------------|---------------------------------------------------------|
0064|| Version | 3.9.2 |
0065|| Implementation | CPython |
0066|| Compiler | GCC 10.2.1 20210110 |
0067|| Executable | /root/.local/share/pipx/venvs/theengsgateway/bin/python |
0068|## Operating System
0069|| Name | Value |
0070||--------------|---------------------------------------|
0071|| System | Linux |
0072|| Release | 5.15.76-v7+ |
0073|| Version | #1597 SMP Fri Nov 4 12:13:17 GMT 2022 |
0074|| Machine type | armv7l |
0075|## Configuration
0076|File: /root/theengsgw.conf
0077|```
0078|{
0079|"adapter": "hci0",
0080|"bindkeys": {},
0081|"ble_scan_time": 5,
0082|"ble_time_between_scans": 5,
0083|"discovery": 1,
0084|"discovery_device_name": "TGW RPI",
0085|"discovery_filter": [
0086|"IBEACON",
0087|"GAEN",
0088|"MS-CDP",
0089|"APPLE_CONT",
0090|"APPLE_CONTAT"
0091|],
0092|"discovery_topic": "homeassistant",
0093|"enable_tls": 0,
0094|"enable_websocket": 0,
0095|"hass_discovery": 1,
0096|"host": "192.168.1.241",
0097|"identities": {},
0098|"log_level": "DEBUG",
0099|"lwt_topic": "tgw/1491/LWT",
0100|"pass": "***",
0101|"port": 1883,
0102|"presence": 0,
0103|"presence_topic": "home/TheengsGateway/presence",
0104|"publish_advdata": 0,
0105|"publish_all": 1,
0106|"publish_topic": "home/TGW_1491/BTtoMQTT",
0107|"scanning_mode": "active",
0108|"subscribe_topic": "home/+/BTtoMQTT/undecoded",
0109|"time_format": 0,
0110|"time_sync": [],
0111|"user": "***"
0112|}
0113|
Pour ma deuxième antenne installée sur un PI Zéero ID1425 ; Aucun problème
0990|INFO:BLEGateway:Sent 10 messages to MQTT
0991|INFO:BLEGateway:Sent 9 messages to MQTT
0992|INFO:BLEGateway:Sent 10 messages to MQTT
0993|INFO:BLEGateway:Sent 10 messages to MQTT
0994|INFO:BLEGateway:Sent 7 messages to MQTT
0995|INFO:BLEGateway:Sent 11 messages to MQTT
0996|INFO:BLEGateway:Sent 9 messages to MQTT
0997|INFO:BLEGateway:Sent 14 messages to MQTT
0998|INFO:BLEGateway:Sent 10 messages to MQTT
0999|INFO:BLEGateway:Sent 9 messages to MQTT