Comments (9)
It may be a bit hard to tell what's wrong based on that. One interesting thing is that my own code's debug says that it last got data at 2019-02-11 08:38:31,679
. I don't know what has been done for 6 hours. :)
I also intermittently get these:
2019-02-11 15:14:15,695 WARNING - type_converters.py:193 - from_hcipayload(): TODO: Unhandled GAP type, pos=35 type=0x0a len=2
2019-02-11 15:14:15,696 WARNING - type_converters.py:194 - from_hcipayload(): Data: 01 00 00 e2 e7 86 a1 41 2c 1c 02 01 19 07 03 be fe 26 fe 03 fe 0d ff 01 09 51 12 d7 13 ae bb 24 8c c2 bf 02 0a f6
2019-02-11 15:14:15,697 WARNING - type_converters.py:195 - from_hcipayload(): POS : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
2019-02-11 15:14:17,339 WARNING - type_converters.py:193 - from_hcipayload(): TODO: Unhandled GAP type, pos=35 type=0x0a len=2
2019-02-11 15:14:17,340 WARNING - type_converters.py:194 - from_hcipayload(): Data: 01 00 00 e2 e7 86 a1 41 2c 1c 02 01 19 07 03 be fe 26 fe 03 fe 0d ff 01 09 51 12 d7 13 ae bb 24 8c c2 bf 02 0a f6
I'm not sure if they are related.
from ruuvitag-sensor.
I've noticed that running 2 BLE programs at the same time can cause corrupted data, for example if I run Noble (NodeJS BLE) and ruuvitag-sensor at the same time there's a load of hard-to-replicate bugs on both programs. Might be related?
from ruuvitag-sensor.
In my case, ruuvitag-sensor is the only BLE application running. However, I'm using the ruuvi_rx reactive wrapper implementation.
From the lack of data, looks like it has died again in the night. I'll take a look at it when I get back home and try to wrap things in a way that it doesn't stop completely or restarts when bad things happen.
from ruuvitag-sensor.
I was checking the code and when there is something wrong with the decoding it should stop handling next datas.
On error decode return none
https://github.com/ttu/ruuvitag-sensor/blob/master/ruuvitag_sensor/decoder.py#L162
And it is just then ignored
https://github.com/ttu/ruuvitag-sensor/blob/master/ruuvitag_sensor/ruuvi.py#L167
I'll try to update a new version of ruuvitag package this weekend and also merge changes to bleson branch and update it to use the latest version of Bleson and do related code changes.
from ruuvitag-sensor.
Version 0.12.0 released, code merged to bleson branch and bleson updated from 0.0.13 to version 0.0.15
@quulah Have you tried with "normal" Bluez version?
from ruuvitag-sensor.
Yes, I started with that, but had trouble with it since I run this in a Docker container. I think it was related to the usage of sudo
with the hcitool
commands. I could've probably put sudo in the container, but I tested the bleson branch and it worked, so I haven't looked back since. :)
from ruuvitag-sensor.
@quulah Thats nice. I really hope that Python will eventually get some working cross platform bluetooth solution (and will be extra happy if it will be Bleson).
Little bit off topic, but could also add Dockerfile to the repository. Did you have some extra settings for the image, or just some basic like this?
FROM python:3
ADD . /ruuvi
WORKDIR /ruuvi
RUN pip install -e .
CMD [ "python", "ruuvitag_sensor", "-s" ]
NOTE: I updated setup.py as process-dependecy-links was removed from pip
from ruuvitag-sensor.
I can try to whip up a Dockerfile in a pull request for this repository. And yeah, basically that's it for the Docker image. I'm putting in my own code too and ruuvitag-sensor is in a requirements.txt that gets read by pip.
I'm using arm32v7/ubuntu:bionic
as the base, as Ubuntu happened to have a version of Python compiled with socket.AF_BLUETOOTH
support for bleson.
I took a look at the code, as well as the changes, and looks like the merge didn't really change anything in the decoder.py. And as you said, that exception should have been grabbed.
I'm currently running the newer version, and there hasn't been any problems yet so I'll close this.
from ruuvitag-sensor.
@quulah great if you have time to do the Dockerfile
I should also gather some feedback how this Bleson version is working and if there is no complains I could release a new version to pypi from this branch. Will open a new issue for that.
from ruuvitag-sensor.
Related Issues (20)
- Ruuvitags and InfluxDB 2 HOT 6
- README.md has broken link to Setup guide HOT 1
- Updated install instructions ffor Rasperry Pi HOT 1
- Latest firmware using data format 2 HOT 1
- Can't get device info: No such device HOT 1
- Stuck after "Invalid advertisement data" error. HOT 5
- High CPU usage with Bleson backend HOT 1
- "Cannot read %d bytes, data too short" error causes ruuvitag-sensors to stop working HOT 1
- Cross-platform BLE communicaton with Bleak
- Changing the spelling of datas to data HOT 9
- find_ruuvitags_async payload contains non-parsed data HOT 1
- ruuvi_rx should support Bleak-adapter HOT 3
- Add tests for find_ruuvitags_async HOT 1
- Use typing in examples HOT 3
- BleCommunicationBleak doesn't work with asyncio.run() HOT 3
- Docs request: Pull Request Templates HOT 1
- Data Format Mismatch HOT 2
- Get sensor data with callback stopped working after new firmware HOT 3
- Bleak Async call failing ... no attribute HOT 1
- Development install fails HOT 3
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 ruuvitag-sensor.