Comments (5)
I don't have V2 so not sure. Never heard of anyone reported that V2 works with this code. So probably not ?
from bt-mqtt-gateway.
I would like to try and get it to work, maybe that would help others as well.
Just not sure how exactly I would start with that???
I did have a look into the worker file of the xiaomi scale and saw that you are looking for a specific value and then do some math with that.
EDIT: this here is what I was looking at:
https://github.com/zewelor/bt-mqtt-gateway/blob/master/workers/miscale.py#L43-L44
Would you be able to help me with this? Maybe I can find out the bluetooth messages from the scale and maybe you could do the code for it, since I am not good at programing?
Is there a good program or app to capture all the bluetooth content that the scale is sending so I could give that content to you?
Thanks a lot
from bt-mqtt-gateway.
Hi
I think there is good chance that someone already reversed v2 and protocol is described somewhere. Here is good explaination of reverse process for V1, you can try to recreate that. https://github.com/oliexdev/openScale/wiki/Xiaomi-Bluetooth-Mi-Scale
Code in miscale worker is just copied from some exmplaes, available on the internet. You can take this worker and play with it to get correct weight retrieving procedure for V2.
from bt-mqtt-gateway.
This repository has been updated with support for the v2 scale. Please update and let us know how it works for you. Closing for now.
from bt-mqtt-gateway.
Hi,
@bbbenji , thanks for letting me know about the update.
I just tested it (complete new install) and I seem to have a few issues...
EDIT: My old problem with the mqtt not working correctly, it was because the service was still present and active on the raspberry it started the gateway in the background. And me starting it with the normal command made it run twice and that fucked everything up big time.... my bad.
Now I did find a real problem (I think). When you use the scale and either wear socks/shoes (basically anything else apart from bare feet) or you step off the scale after you see the weight before the body measurements, you get the following error from the gateway and it stops!
("Impedance is too high (limit >3000ohm)")
Traceback (most recent call last):
File "./gateway.py", line 73, in <module>
mqtt.publish(_WORKERS_QUEUE.get(timeout=10).execute())
File "/home/pi/bt-mqtt-gateway/workers_manager.py", line 58, in execute
messages = self._callback(*self._args)
File "/home/pi/bt-mqtt-gateway/workers/miscale.py", line 72, in status_update
results.weight, height, age, sex, int(results.impedance)
File "/home/pi/bt-mqtt-gateway/workers/miscale.py", line 263, in __init__
raise Exception("Impedance is too high (limit >3000ohm)")
Exception: Impedance is too high (limit >3000ohm)
Traceback (most recent call last):
File "./gateway.py", line 91, in <module>
raise e
File "./gateway.py", line 73, in <module>
mqtt.publish(_WORKERS_QUEUE.get(timeout=10).execute())
File "/home/pi/bt-mqtt-gateway/workers_manager.py", line 58, in execute
messages = self._callback(*self._args)
File "/home/pi/bt-mqtt-gateway/workers/miscale.py", line 72, in status_update
results.weight, height, age, sex, int(results.impedance)
File "/home/pi/bt-mqtt-gateway/workers/miscale.py", line 263, in __init__
raise Exception("Impedance is too high (limit >3000ohm)")
Exception: Impedance is too high (limit >3000ohm)
Could this be caught somehow and maybe if someone just steps on the scale for the weight but does not wait for the body measurements, just send out the mqtt messages containing the weight and nothing else.
from bt-mqtt-gateway.
Related Issues (20)
- Possibly the installation instructions are not correct (SUDO is not used consistently) HOT 3
- Docker images Exited (139) HOT 2
- 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
- null values from LYWSD03MMC HOT 5
- 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
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.