-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working anymore #99
Comments
Do you see something odd in the logs with |
Nothing odd. I've changed the log and that's the first results : |
And what did you change between the working and not working state? Update Theengs Gateway? Update the operating system? |
Wait, so it does work? Did something else change so the BLE receivers are less receptive maybe? Antenna orientation, obstacles between the antenna and Mi Flora devices? Theengs Gateway doesn't connect to the Mi Floras, so that shouldn't be a difference, they just broadcast their data around so any device can receive it. |
Now that I'm looking at your
This means that your gateway is waiting for 100 seconds between every scan. I would drastically reduce this. The default value is 5 seconds. Note that for the publish topic, we're using by default:
|
Here's my new conf file : { |
Have you disconnected the app from the Mi Flora before using Theengs Gateway? Because as long as the app is connected to the device, the latter doesn't advertise, so Theengs Gateway can't detect its measurements. |
The app have been disconnected. It's seem is a bluetooth issue, how do I verify that the bluetooth is still scanning ? After a reboot the TheengsGateway work for a few hours. |
Maybe try setting the environment variable BLEAK_LOGGING to 1 to see what the underlying Bluetooth library is doing. You can do that in your systemd service unit file with the Environment key. |
I don't find a bleak.service to edit with an environnment variable. Do you mean I have to edit bluetooth.service ? |
No I meant in your
|
Thanks @koenvervloesem I have compiled Bluez 5.66 but it still failed after 2 days :( now I have added the environment to TheengsGateway.service. I'll be back in a few days with the result. |
last entries in the log with the environnment enabled :
|
If you run |
scan on stop finding new devices too, power off / power on / scan on doesn't work, only a restart of the bluetooth service works, how I can find why it stopped ? |
I don't know, this looks like a problem with Bluetooth on your device then, not a problem specific to Theengs Gateway. Do you see something suspicious in the output of |
I ran into the same with debian12 but was working on rpiOS 12 so if anyone is having issues with debian on rpi try rpiOS. |
Describe the bug
Status is offline in mqtt explorer, no more values are sent
To Reproduce
Don't know where to start it's suddenly stopped, I've restarted my broker but I get message from my tasmota devices, I've rebooted HA.
Screenshots
![Capture d’écran 2023-02-12 à 18 50 05](https://user-images.githubusercontent.com/10863269/218328069-cfa01a8b-be1c-4d21-89f5-2fd1ca6ce624.png)
![Capture d’écran 2023-02-12 à 18 49 08](https://user-images.githubusercontent.com/10863269/218328105-59e65122-f0fb-4de0-a898-69e38ee131e0.png)
From the mqtt view of HA
From MQTT Explorer
Environment (please complete the following information):
All 3 environnements are with a Sena UD100-G03 bluetooth dongle, all are well detected in hci0.
-1 raspberry pi 2
-1 VM with debian 11
-1 raspberry pi 4 with debian 11
They all have the same configuration file theengsgw.conf :
{
"adapter": "hci0",
"ble_scan_time": 1000,
"ble_time_between_scans": 100,
"discovery": 1,
"discovery_device_name": "TheengsGateway",
"discovery_filter": [
"IBEACON",
"GAEN",
"MS-CDP"
],
"discovery_topic": "homeassistant/sensor",
"hass_discovery": 0,
"host": "192.168.0.203",
"log_level": "WARNING",
"pass": "password",
"port": 1883,
"publish_topic": "home/TheengsGateway",
"scanning_mode": "active",
"subscribe_topic": "home/+/BTtoMQTT/undecoded",
"time_format": 0,
"time_sync": [],
"user": "mqtt-broker"
}
All 3 gateways are started via a service
![Capture d’écran 2023-02-12 à 19 00 30](https://user-images.githubusercontent.com/10863269/218328538-59eea10e-493e-46f0-b4c4-ae300894c4d5.png)
With nrf connect I see the devices so it's not a battery problem.
I've tried with only one antenna and only one TheengsGateway service still no value.
I will gladly accept any help
The text was updated successfully, but these errors were encountered: