Comments (5)
Did you also try to set the mac in uppercase in config file?
The comparison in the find_device
method is case sensitive and it depends if the btle scanner delivers the found macs in uppercase or in lowercase.
However for me the scanner delivers all macs in lowercase and when I set the macs in uppercase I also get null values.
Tested with: pvvx v4.0 firmware on LYWSD03MMC HW 2.0
Configured advertising format: atc1441
from bt-mqtt-gateway.
Hi I have the same problems with zero values coming from my LYWSD03MMC B1.6, I have flashed them with fimware v4.0
Environment:
- OS: Linux
- Distro: Raspbian
- Version: bullseye
- Device: Raspberry Pi 4
- Docker Container Image
I have setup the confg for one devive in uppercase and for one device in lower case. hcitool lescan shows all MAC in upercase
I have also tested the interface with some other script which generates outputs
from bt-mqtt-gateway.
@piatho Did you also checked the debug output? Are there also these "no data received" messages?
What is your Config? Do you run the worker in passive mode?
How are your programming skills?
I think the easiest way to get around is to place your own debug commands _LOGGER.debug
in workers/lywsd03mmc.py
and run the gateway in debug mode.
Maybe you can place a log-command in line 35 to write out all addresses res.addr
find by the scanner.
If your device address is not returned by the scanner, than there may be a problem with bluez or your bluetooth driver.
When your device is found you can place another command in line 38 to check the raw data value
revived from your device.
from bt-mqtt-gateway.
Hi @jewelooper ,
the logs give me indeed no-data received.
Passive mode: both tried, usually passive should be the preferred option
I would rather not think of an issue with the bluetooth driver, since the same device to provide an output and updated values when running openmqttgatway/Theengs. (Theengs is a bit to resource heavy, thats why i want to replace it)
I am running your and theengs in a container - obviously not at the same time.
On your suggestion to implement some debugs comments in the worker, i am not sure if can adjust the docker container in a way you describe. I am rather new to docker :-)
from bt-mqtt-gateway.
Update:
I have now managed to add the loggers. I have added:
_LOGGER.debug("Scanned device: %s", res)
in row 35 and _LOGGER.debug("Scan data received: %s", value)
.
The logs showed that devices are scanned but now raw data been recorded.
That helped me to become clear that the error was about case sensitivity. "res" contains the MAC in lower cases and thus did not find a match. After changing the config file to lowercase, gateway finds values and updates perfectly.
Thanks for the help @jewelooper
from bt-mqtt-gateway.
Related Issues (20)
- node_id = mac.replace(":", "-") = AttributeError: 'dict' object has no attribute 'replace' HOT 1
- Does it work with ESPHome?
- Problem with negative temperature / signed values HOT 1
- Gateway not starting as systemctl service HOT 2
- solved: Type error HOT 1
- hardware compatibility HOT 13
- Clarify why this needs to be run in a virtual environment HOT 1
- blescanmulti worker not publishing to MQTT
- Systemd Installation like in README does not work, service.sh might have superfluous sudo
- Error message if bt-mqtt-gateway is started as home assistant addon HOT 8
- Support for MQTT climate hold and away modes has been removed in HA. HOT 2
- Missing MQTT messages HOT 2
- Anyway to setup on qnap?
- Docker configure.yaml HOT 1
- maybe use eq3btsmart to modernize eq3 thermostat handling? HOT 2
- 100% cpu load from bluepy-helper HOT 2
- Linak Desk Set commands
- Please, Delete this issue
- README venv installation instructions are incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bt-mqtt-gateway.