balena-labs-projects / balena-sense Goto Github PK
View Code? Open in Web Editor NEWTake readings from a BME680 or similar sensor on a Raspberry Pi, store with InfluxDB and view with Grafana
License: MIT License
Take readings from a BME680 or similar sensor on a Raspberry Pi, store with InfluxDB and view with Grafana
License: MIT License
Hi
I wanted to run the Balena Sense project from my Pi Zero W but noticed there was not an option for selecting Pi Zero W in the device list.
Can you please add this option?
If not, I'm assuming I can download the Balena OS for the Pi Zero W from here (https://www.balena.io/os/#downloads-raspberrypi). However, I am not sure how to connect to my wifi once I download the image.
Thank you.
Update the balenaSense documentation to recommend OS versions >= 2.54.2+rev1 for PiZero devices to enable ZRAM. This is mitigate the failure to start as documented here:
Step 1/4 : FROM balenalib/raspberry-pi-alpine
---> f4298b47cf62
Step 2/4 : RUN apk add influxdb
---> Running in 5b66ead16ab7
Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/):
Architecture: ARM v6
OS: Alpine Linux 3.12
Variant: run variant
Default variable(s): UDEV=off
Extra features:
- Easy way to install packages with `install_packages <package-name>` command
- Run anywhere with cross-build feature (for ARM only)
- Keep the container idling with `balena-idle` command
- Show base image details with `balena-info` command
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/armhf/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
influxdb (missing):
required by: world[influxdb]
Removing intermediate container 5b66ead16ab7
The command '/bin/sh -c apk add influxdb' returned a non-zero code: 1
I just updated my device to the latest version and found that all historical data was lost and the graph starts again from fresh. This shouldn't be happening, and needs investigation.
This project is almost perfect for my use. For my purpose it makes sense to have multiple sensors attached to one device (One in water temp sensor and one air temp sensor). Is this possible to use multiple sensors like this? Ideally they could be different devices as well, (IE: BME680 + DS18B20 or any number of these in combination to monitor different metrics).
Correct me if i'm wrong but it looks like when multiple devices are referenced in config doc it's referencing multiple different devices each with one sensor attached when centrally aggregating this data? If this is not the case then I would happily take any documentation or examples that would clarify this. If so, then is this possible from within this or am I going to hax it together?
I'm having the following issue, multiple BME680 sensors are failing to work with v2 out of the box -- sensors that were (and are) working with v1. I'm using devices that are being migrated from a v1 project, so this could be the issue. Any help on how to do this properly is appreciated.
Looks like sensor script is failing and hanging:
Starting mqtt client, publishing to mqtt:1883
Using MQTT publish interval: 8.0 sec(s)
Initializing sensors...
======== Searching i2c bus for devices... ========
Found device at 0x77
======== Removing existing devices from the i2c bus... ========
Deleting device found at 0x77.
======== Unloading any existing modules... ========
New active: [119]
======== Loading devices found... ========
modprobe: FATAL: Module bme680-i2c not found in directory /lib/modules/4.19.75
Loading device bme680-i2c (chip ID 97) on address 0x77.
Loaded 1 of 1 device(s) found
initializing reading
IIO context created: local
Backend version: 0.16 (git tag: v0.16)
Backend description string: Linux 1b23cdd24eb2 4.19.75 #1 SMP Mon Mar 23 10:27:22 UTC 2020 armv7l
IIO context has 1 attributes:
local,kernel: 4.19.75
IIO context has 0 devices:
I will stress that it's working on V1 so I don't think hardware is the issue. As well, I have updated to SUPERVISOR VERSION
12.8.8 from 10.x and have the issue on both.
V1 Output from Sensor:
root@fec2c46:/# curl sensor
{"temperature": 22.62, "pressure": 974.29, "humidity": 46.82, "air_quality_score": 25.0, "air_quality_score_accuracy": 0, "eco2_ppm": 0.0, "bvoce_ppm": 0.0}
Hi
I am total newbie but would love to run this project in my new raspberry 4. Do you have any plans to update it?
Thank you,
v.
Regression bug (working fine on tag v1.8.3)
This repo tag v1.9.2 + Unbranded BME680 breakout (CJMCU-680) as sensor.
fail with error in terminal
08.05.20 03:19:30 (+0200) sensor ----------------------------------------
08.05.20 03:19:32 (+0200) sensor user_i2c_write: Remote I/O error
08.05.20 03:19:34 (+0200) sensor Capture thread exited; restarting
08.05.20 03:19:39 (+0200) sensor user_i2c_write: Remote I/O error
08.05.20 03:19:40 (+0200) sensor 172.18.0.4 - - [08/May/2020 01:19:40] "GET / HTTP/1.1" 200 -
08.05.20 03:19:40 (+0200) sensor ----------------------------------------
08.05.20 03:19:40 (+0200) sensor Exception happened during processing of request from ('172.18.0.4', 47992)
08.05.20 03:19:40 (+0200) sensor Traceback (most recent call last):
08.05.20 03:19:40 (+0200) sensor File "/usr/local/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
08.05.20 03:19:40 (+0200) sensor self.process_request(request, client_address)
08.05.20 03:19:40 (+0200) sensor File "/usr/local/lib/python3.5/socketserver.py", line 341, in process_request
08.05.20 03:19:40 (+0200) sensor self.finish_request(request, client_address)
08.05.20 03:19:40 (+0200) sensor File "/usr/local/lib/python3.5/socketserver.py", line 354, in finish_request
08.05.20 03:19:40 (+0200) sensor self.RequestHandlerClass(request, client_address, self)
08.05.20 03:19:40 (+0200) sensor File "/usr/local/lib/python3.5/socketserver.py", line 681, in __init__
08.05.20 03:19:40 (+0200) sensor self.handle()
08.05.20 03:19:40 (+0200) sensor File "/usr/local/lib/python3.5/http/server.py", line 422, in handle
08.05.20 03:19:40 (+0200) sensor self.handle_one_request()
08.05.20 03:19:40 (+0200) sensor File "/usr/local/lib/python3.5/http/server.py", line 410, in handle_one_request
08.05.20 03:19:40 (+0200) sensor method()
08.05.20 03:19:40 (+0200) sensor File "/usr/src/app/scripts/sensor.py", line 123, in do_GET
08.05.20 03:19:40 (+0200) sensor measurements = balenasense.sample()
08.05.20 03:19:40 (+0200) sensor File "/usr/src/app/scripts/sensor.py", line 95, in sample
08.05.20 03:19:40 (+0200) sensor return self.apply_offsets(self.sensor.get_readings(self.sensor))
08.05.20 03:19:40 (+0200) sensor File "/usr/src/app/scripts/bme680.py", line 45, in get_readings
08.05.20 03:19:40 (+0200) sensor 'temperature': float(self.data['temperature']),
08.05.20 03:19:40 (+0200) sensor TypeError: 'NoneType' object is not subscriptable
08.05.20 03:19:40 (+0200) sensor ----------------------------------------
08.05.20 03:19:41 (+0200) sensor Capture thread exited; restarting
08.05.20 03:19:46 (+0200) sensor user_i2c_write: Remote I/O error
08.05.20 03:19:48 (+0200) sensor Capture thread exited; restarting
08.05.20 03:19:50 (+0200) sensor 172.18.0.4 - - [08/May/2020 01:19:50] "GET / HTTP/1.1" 200 -
08.05.20 03:19:50 (+0200) sensor ----------------------------------------
This should be displayed in millibar (mbar), i.e. 1025 mbar, not 1.025 bar
Hi,
i have implemented the Project on a Raspberry Zero/W
https://www.balena.io/blog/build-an-environment-and-air-quality-monitor-with-raspberry-pi/
Now my Rasp is constantly crashing after few days of working perfect
Got this error:
19.02.20 13:14:22 (+0100) sensor ---------------------------------------- 19.02.20 13:14:22 (+0100) sensor Exception happened during processing of request from ('172.17.0.4', 50622) 19.02.20 13:14:22 (+0100) sensor Traceback (most recent call last): 19.02.20 13:14:22 (+0100) sensor File "/usr/local/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock 19.02.20 13:14:22 (+0100) sensor self.process_request(request, client_address) 19.02.20 13:14:22 (+0100) sensor File "/usr/local/lib/python3.5/socketserver.py", line 341, in process_request 19.02.20 13:14:22 (+0100) sensor self.finish_request(request, client_address) 19.02.20 13:14:22 (+0100) sensor File "/usr/local/lib/python3.5/socketserver.py", line 354, in finish_request 19.02.20 13:14:22 (+0100) sensor self.RequestHandlerClass(request, client_address, self) 19.02.20 13:14:22 (+0100) sensor File "/usr/local/lib/python3.5/socketserver.py", line 681, in __init__ 19.02.20 13:14:22 (+0100) sensor self.handle() 19.02.20 13:14:22 (+0100) sensor File "/usr/local/lib/python3.5/http/server.py", line 422, in handle 19.02.20 13:14:22 (+0100) sensor self.handle_one_request() 19.02.20 13:14:22 (+0100) sensor File "/usr/local/lib/python3.5/http/server.py", line 410, in handle_one_request 19.02.20 13:14:22 (+0100) sensor method() 19.02.20 13:14:22 (+0100) sensor File "/usr/src/app/scripts/sensor.py", line 112, in do_GET 19.02.20 13:14:22 (+0100) sensor self.wfile.write(json.dumps(measurements[0]['fields']).encode('UTF-8')) 19.02.20 13:14:22 (+0100) sensor File "/usr/local/lib/python3.5/socket.py", line 594, in write 19.02.20 13:14:22 (+0100) sensor return self._sock.send(b) 19.02.20 13:14:22 (+0100) sensor BrokenPipeError: [Errno 32] Broken pipe 19.02.20 13:14:22 (+0100) sensor ----------------------------------------
It would increase the build speed quiet a bit (on local push mostly) if we installed from
https://www.piwheels.org/project/RTIMULib/ or via apt-get install python3-rtimulib
[rahul-thakoor] As of version v1.1.0 the project does not include pressure sensor value when sense-hat is being used. We should probably add a note regarding this until we support this or decide otherwise with respect to sense-hat pressure sensor.
this does not make sense for primary nor for secondary
should be vice versa
balena-sense/sensor/scripts/sensor.py
40 self.sensor = BME680(self.readfrom)
41 self.readfrom = 'bme680primary'
40 self.readfrom = 'bme680primary'
41 self.sensor = BME680(self.readfrom)
50 self.readfrom = 'bme680secondary'
51 self.sensor = BME680(self.readfrom)
please help
Error in plugin: [url=http://sensor:7575]: Get "http://sensor:7575": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
sensor_bitter-resonance-06.06.21_17_14_43_(+0400).txt
C:\Users\lasur\Downloads\balena-sense-2.0.0\balena-sense-2.0.0>balena push g_laska/sensor
[Info] Starting build for sensor, user g_laska
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1834675/devices
[connector] [=========================================================] 100%
[sensor] [=========================================================] 100%
[dashboard] [=========================================================] 100%
[Info] Uploading images
[Success] Successfully uploaded images
[Info] Built on arm02
[Success] Release successfully created!
[Info] Release: f286d4819eb0e6a6be56996fcb6e0c6a (id: 1822551)
[Info] ┌───────────┬────────────┬────────────┐
[Info] │ Service │ Image Size │ Build Time │
[Info] ├───────────┼────────────┼────────────┤
[Info] │ influxdb │ 252.34 MB │ 21 seconds │
[Info] ├───────────┼────────────┼────────────┤
[Info] │ dashboard │ 205.47 MB │ 19 seconds │
[Info] ├───────────┼────────────┼────────────┤
[Info] │ sensor │ 278.12 MB │ 25 seconds │
[Info] ├───────────┼────────────┼────────────┤
[Info] │ connector │ 278.84 MB │ 28 seconds │
[Info] └───────────┴────────────┴────────────┘
[Info] Build finished in 1 minute, 39 seconds
\
\
>/7
.-(6'
(=./\ ) \ | / / | / > / j < _\ _.-' : ``. \ r=._\
.
<\\_ \ .
-.
\ r-7 -. ._ ' .
`, -.
7 7) )
/ | ' / `-.
|| .'
\ (
>\ >
,.-' >.'
<.'_.''
<'
::::::::::::::::::sensr error
File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner
sensor self.run()
sensor File "/usr/local/lib/python3.9/threading.py", line 892, in run
sensor self._target(*self._args, **self._kwargs)
sensor File "/usr/src/app/sensor.py", line 64, in background_web
sensor balenasense = balenaSense()
sensor File "/usr/src/app/sensor.py", line 30, in init
sensor self.device_count = idetect.detect_iio_sensors()
sensor File "/usr/src/app/idetect.py", line 81, in detect_iio_sensors
sensor bus = SMBus(bus_number)
sensor File "/usr/local/lib/python3.9/site-packages/smbus2/smbus2.py", line 280, in init
sensor self.open(bus)
sensor File "/usr/local/lib/python3.9/site-packages/smbus2/smbus2.py", line 310, in open
sensor self.fd = os.open(filepath, os.O_RDWR)
sensor FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'
Hi
I have encountered a strange error this last week. I am unable to visualize and retrieve (download) data from Grafana if I extend the period for longer than 7 days. I have tried this several times for different time intervals but it seems to break after 7 days (+- 1 or days).
Do you know what may be causing this? Do you think this can be fixed or the data accessed in some other way?
I am attaching a screenshot of what my Grafana dashboard looks like if I change the query to 30 days.
Thank you,
Victor
Hi Chris
I'm trying to change the security settings in Grafana so I can embed my dashboard as an iframe in my website. I was able to locate and edit the grafana.ini file in the etc/grafana folder but it seems to revert back to default after I change it. Is this the correct file to be editing or is there another "default.ini" file?
Specifically (see attached) I would like to change the security settings:
allow_embedding | false
cookie_samesite | lax
to
allow_embedding | true
cookie_samesite | none
Can you please let me know how to do this or if there is another way to embed the dashboard into a website.
Thank you,
Victor
Support for https://www.waveshare.com/wiki/Sense_HAT_(B)
The container "sensors" aborts with the error:
...
15.03.20 15:27:30 (+0100) sensor File "/usr/src/app/scripts/sensor.py", line 118, in do_GET
15.03.20 15:27:30 (+0100) sensor measurements = balenasense.sample()
15.03.20 15:27:30 (+0100) sensor File "/usr/src/app/scripts/sensor.py", line 90, in sample
15.03.20 15:27:30 (+0100) sensor return self.apply_offsets(self.sensor.get_readings(self.sensor))
15.03.20 15:27:30 (+0100) sensor AttributeError: 'balenaSense' object has no attribute 'sensor'
15.03.20 15:27:30 (+0100) sensor ----------------------------------------
Look for and rename any references of balenaCloud application to fleet
Hi,
Having an issue deploying this project to a Pi0.
Upon pushing the project to my device running BalenaOS the "Sensor" container that is created is in a constant boot loop and the logs are showing the below error
26.06.19 14:39:22 (+0800) sensor /bin/sh: 1: ./entry.sh: Permission denied
When trying to SSH into the device via the WebUI being told the Container is restarting and when trying to SSH via the BalenaCLI exec failed: cannot exec a container that has stopped: unknown
Have tried both Production and Development environments.
HostOS: balenaOS 2.32.0+rev1
Supervisor: 9.14.0
Build in the cloud fails with:
Error: The command /bin/sh -c chmod +x /usr/src/app/download.sh && /usr/src/app/download.sh "raspberry-pi"' returned a non-zero code: 127
during build of Grafana container.
Full output:
[Info] Starting build for , user
[Info] Dashboard link:
[Info] Building on arm03
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[sensor] Step 1/15 : FROM balenalib/raspberry-pi-python:3-build
[grafana] Step 1/8 : FROM balenalib/raspberry-pi
[influxdb] Step 1/4 : FROM balenalib/raspberry-pi-alpine
[sensor] ---> 8595e33cdc2a
[sensor] Step 2/15 : ARG BSEC_FILENAME=BSEC_1.4.7.3_Generic_Release_20190410.zip
[sensor] Using cache
[sensor] ---> 28d43827882a
[sensor] Step 3/15 : RUN install_packages unzip
[influxdb] ---> f866fa8dd7ac
[influxdb] Step 2/4 : RUN apk add influxdb
[grafana] ---> 4bb7091e74b2
[grafana] Step 2/8 : COPY ./grafana.ini /usr/share/grafana/conf/custom.ini
[influxdb] Using cache
[influxdb] ---> 7bf2de7eb747
[influxdb] Step 3/4 : RUN sed -i 's|/var/lib/influxdb|/data/influxdb|g' /etc/influxdb/influxdb.conf
[sensor] Using cache
[sensor] ---> af0318773c6b
[sensor] Step 4/15 : WORKDIR /usr/src/app
[grafana] Using cache
[grafana] ---> 435598cc0362
[grafana] Step 3/8 : COPY ./provisioning /usr/src/app/provisioning
[influxdb] Using cache
[influxdb] ---> fdf2a313887c
[influxdb] Step 4/4 : CMD influxd
[influxdb] Using cache
[influxdb] ---> e13be6a335f4
[influxdb] Successfully built e13be6a335f4
[grafana] Using cache
[grafana] ---> 0c7dbc1a4e81
[grafana] Step 4/8 : COPY ./.sh /usr/src/app/
[sensor] Using cache
[sensor] ---> 71105379fe8d
[sensor] Step 5/15 : RUN git clone https://github.com/balena-io-playground/bsec_bme680_linux.git
[grafana] Using cache
[grafana] ---> 7d4e3f7d1720
[grafana] Step 5/8 : RUN install_packages fontconfig-config fonts-dejavu-core libfontconfig1 ucf jq
[sensor] Using cache
[sensor] ---> be271b689614
[sensor] Step 6/15 : RUN wget https://ae-bst.resource.bosch.com/media/_tech/media/bsec/$BSEC_FILENAME
[grafana] Using cache
[grafana] ---> 71da0f44defe
[grafana] Step 6/8 : RUN chmod +x /usr/src/app/download.sh && /usr/src/app/download.sh "raspberry-pi"
[sensor] Using cache
[sensor] ---> 717b9b1a95b7
[sensor] Step 7/15 : RUN unzip -d bsec_bme680_linux/src $BSEC_FILENAME
[sensor] Using cache
[sensor] ---> 26d79507d394
[sensor] Step 8/15 : WORKDIR /usr/src/app/bsec_bme680_linux
[sensor] Using cache
[sensor] ---> 88b9c09c9ba1
[sensor] Step 9/15 : RUN chmod +x make.sh
[sensor] Using cache
[sensor] ---> ce6067dd04ac
[sensor] Step 10/15 : RUN ./make.sh
[sensor] Using cache
[sensor] ---> 58e276b39280
[sensor] Step 11/15 : RUN pip install smbus influxdb
[sensor] Using cache
[sensor] ---> a98b3d5bb160
[sensor] Step 12/15 : WORKDIR /usr/src/app
[sensor] Using cache
[sensor] ---> 39ea3e0241ef
[sensor] Step 13/15 : COPY ./scripts ./scripts
[sensor] Using cache
[sensor] ---> 76547e86f886
[sensor] Step 14/15 : COPY ./.sh /usr/src/app/
[grafana] ---> Running in d46e27d8c8cc
[sensor] Using cache
[sensor] ---> ca94ddaace40
[sensor] Step 15/15 : CMD ./entry.sh
[sensor] Using cache
[sensor] ---> 4cd668b12347
[sensor] Successfully built 4cd668b12347
[grafana] /bin/sh: 1: /usr/src/app/download.sh: not found
[grafana]
[grafana] Removing intermediate container d46e27d8c8cc
[Info] Uploading images
[grafana] The command '/bin/sh -c chmod +x /usr/src/app/download.sh && /usr/src/app/download.sh "raspberry-pi"' returned a non-zero code: 127
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: undefined
[Error] Error: Information not available
[Error] Service: grafana
[Error] Error: The command '/bin/sh -c chmod +x /usr/src/app/download.sh && /usr/src/app/download.sh "raspberry-pi"' returned a non-zero code: 127
[Error] Service: undefined
[Error] Error: Information not available
[Error] Not deploying release.
Remote build failedAdditional information may be available by setting a DEBUG=1 environment
variable: "set DEBUG=1" on a Windows command prompt, or "export DEBUG=1"
on Linux or macOS.If you need help, don't hesitate in contacting our support forums at
https://forums.balena.ioFor bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/
Hi
sorry if I put an issue but I'm gniubbo here... :) I've one idea, for future Balena-Sense releases I wonder that it should mesure CO2 (with another sensor of course) and It will good if the device can make a simple interlock e.g. if iAQ rise above one value it close gpio for manage one heat reclaim ventilation device
What do you think ?
Thank you and regards
Luca
<Hi Ive received the sensor, and would install Balena Sense on my P0 W and P3 b+
all tests goes in the error below:
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: undefined
[Error] Error: Information not available
[Error] Service: grafana
[Error] Error: The command '/bin/sh -c chmod +x /usr/src/app/download.sh && /usr/src/app/download.sh "raspberrypi3"' returned a non-zero code: 60
[Error] Service: undefined
[Error] Error: Information not available
[Error] Service: telegraf
[Error] Error: The command '/bin/sh -c curl -o /tmp/telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.11.0-1_armhf.deb' returned a non-zero code: 60
[Error] Not deploying release.
Remote build failed
Additional information may be available by setting a DEBUG=1 environment
variable: "set DEBUG=1" on a Windows command prompt, or "export DEBUG=1"
on Linux or macOS.
If you need help, don't hesitate in contacting our support forums at
https://forums.balena.io
For bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/
coul you elp me please?
thank you
Luca
Hi,
is there a option to Implement this Sensor?
https://github.com/pimoroni/sgp30-python
Is has also Co2, i think this would be a good thing.
https://shop.pimoroni.com/products/sgp30-air-quality-sensor-breakout
Add support for miflora plant sensor. This would allow one to sense Temperature, Light level and moisture level. This sensor operates over BLE and could be put outside as well. Python lib here: https://github.com/open-homeautomation/miflora
Would like to get a py script for 1-wire sensors DS18B20 for example
[georgiats] This file needs to be updated https://github.com/balenalabs/balena-sense/blob/master/sensor/Dockerfile.template
After an upgrade of an existing device to v1.5.6 the compiled BSEC binary no longer works and does not produce any output which causes the below errors.
Mentioned here: https://forums.balena.io/t/balenasense-stopped-working-after-update-to-v1-5-6/18071
09.07.19 11:17:10 (+0000) Exception happened during processing of request from (‘removed’, removed)
09.07.19 11:17:10 (+0000) Traceback (most recent call last):
09.07.19 11:17:10 (+0000) File “/usr/local/lib/python3.5/socketserver.py”, line 313, in _handle_request_noblock
09.07.19 11:17:10 (+0000) self.process_request(request, client_address)
09.07.19 11:17:10 (+0000) File “/usr/local/lib/python3.5/socketserver.py”, line 341, in process_request
09.07.19 11:17:10 (+0000) self.finish_request(request, client_address)
09.07.19 11:17:10 (+0000) File “/usr/local/lib/python3.5/socketserver.py”, line 354, in finish_request
09.07.19 11:17:10 (+0000) self.RequestHandlerClass(request, client_address, self)
09.07.19 11:17:10 (+0000) File “/usr/local/lib/python3.5/socketserver.py”, line 681, in init
09.07.19 11:17:10 (+0000) self.handle()
09.07.19 11:17:10 (+0000) File “/usr/local/lib/python3.5/http/server.py”, line 422, in handle
09.07.19 11:17:10 (+0000) self.handle_one_request()
09.07.19 11:17:10 (+0000) File “/usr/local/lib/python3.5/http/server.py”, line 410, in handle_one_request
09.07.19 11:17:10 (+0000) method()
09.07.19 11:17:10 (+0000) File “/usr/src/app/scripts/sensor.py”, line 96, in do_GET
09.07.19 11:17:10 (+0000) measurements = balenasense.sample()
09.07.19 11:17:10 (+0000) File “/usr/src/app/scripts/sensor.py”, line 68, in sample
09.07.19 11:17:10 (+0000) return self.apply_offsets(self.sensor.get_readings(self.sensor))
09.07.19 11:17:10 (+0000) File “/usr/src/app/scripts/bme680.py”, line 45, in get_readings
09.07.19 11:17:10 (+0000) ‘temperature’: float(self.data[‘temperature’]),
09.07.19 11:17:10 (+0000) TypeError: ‘NoneType’ object is not subscriptable
09.07.19 11:17:10 (+0000) ----------------------------------------
09.07.19 11:17:11 (+0000) Capture thread exited; restarting
@alanb128 the guys mentioned this to me in the hardware call but I've not tested yet, so just logging it here.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --
/usr/src/app/bsec_bme680_linux/bsec_bme680
Returns Nothing.
Also tried ungrounding Addr and using 'secondary' to no avail.
Add support for the Gravity Analog Infrared CO2 Sensor . This should be easy to couple with the enviro+ hat that has an onboard ADC. It seems to be the cheapest true CO2 sensor I can find.
So it looks like Bosch have wiped the v1.4.8.0 release from their site again, even the official download behind an email activation states 1.4.8.0 but actually provides bsec_2.0.6.1…
This change would need to be made to the balena-sense/Dockerfile.template with a fresh link.
Otherwise the project will not work.
Raspberry PI devices use I2C-1 but other devices do not - we should make this configurable to start to broaden the range of devices supported here.
The URL of the Influx cloud AWS instance is currently hard-coded in telegraf.conf. Needs to be configurable, since there is more than one instance (now).
Currently the pressure sensor on the Sense-HAT is unsupported. We may be able to add it with this library: https://github.com/youkidearitai/rpi-sensors
Items that would need to be addressed:
Currently the sensor and connector blocks do not have an ARMv6 version.
In addition, Influx does not have an official image for ARMv6.
The latest build of the balena-sense application seems to fail due to an issue with influxdb:
[Error] Some services failed to build:
[Error] Service: influxdb
[Error] Error: The command '/bin/sh -c apk add influxdb' returned a non-zero code: 1
More detailed error trace:
[grafana] Step 4/9 : COPY ./*.sh /usr/src/app/
[influxdb] ERROR: unsatisfiable constraints:
[influxdb]
[influxdb] influxdb (missing):
[influxdb] required by: world[influxdb]
[sensor] ---> 70ea381efee1
[sensor] Step 16/17 : RUN chmod +x /usr/src/app/entry.sh
[sensor] ---> Running in a427006209d7
[telegraf] Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/):
[telegraf] Architecture: ARM v6
[telegraf] OS: Debian Buster
[telegraf] Variant: run variant
[telegraf] Default variable(s): UDEV=off
[telegraf] Extra features:
[telegraf] - Easy way to install packages with `install_packages <package-name>` command
[telegraf] - Run anywhere with cross-build feature (for ARM only)
[telegraf] - Keep the container idling with `balena-idle` command
[telegraf] - Show base image details with `balena-info` command
[influxdb] Removing intermediate container 4831c589fadb
[influxdb] The command '/bin/sh -c apk add influxdb' returned a non-zero code: 1
Hi, thanks for your cool project. I got that little dude up and running.
Sadly the temperature is about 2-15°C too high and the humidity is 10% too low
compared to a synthetic hygro- and thermometer. The Air quality is always around 50%
doesn't matter if the window is open or not.
I ordered that sensor: https://www.aliexpress.com/item/BME680-Digital-Temperature-Humidity-Pressure-Sensor-CJMCU-680-High-Altitude-Sensor-Module-Development-Board/32961416338.html?spm=a2g0s.9042311.0.0.7e364c4dss6GLZ
and soldered 3.3V, ground, scl and sda properly to the pi zero w.
I left SD0 and CS out at the breakout - just 4 connected like described here:https://www.balena.io/blog/build-an-environment-and-air-quality-monitor-with-raspberry-pi/?utm_source=efp&utm_medium=etcher&utm_campaign=balena-sense&utm_content=v3
Did I do something wrong or is the breakout sensor defect or is there some adjustment needed and if yes, where?
Thanks in advance,
Jack
I think it'd be best to move that example project (https://github.com/balenalabs/balena-sense/blob/master/sensor/Dockerfile.aarch64#L9 and https://github.com/balenalabs/balena-sense/blob/master/sensor/Dockerfile.template#L9) to either -examples
or balenalabs
. cc @balenalabs/hardware-hackers
When I run balena push <name>
it errors when it tries to access this URL that seems to be unavailable https://ae-bst.resource.bosch.com/media/_tech/media/bsec/BSEC_1.4.7.3_Generic_Release_20190410.zip
[Info] Building on arm01
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[sensor] Step 1/16 : FROM balenalib/raspberrypi3-python:3-build
[telegraf] Step 1/7 : FROM balenalib/raspberrypi3
[influxdb] Step 1/4 : FROM balenalib/raspberrypi3-alpine
[grafana] Step 1/8 : FROM balenalib/raspberrypi3
[influxdb] ---> e76d3be3914b
[influxdb] Step 2/4 : RUN apk add influxdb
[influxdb] Using cache
[influxdb] ---> 91bbe9d0b526
[influxdb] Step 3/4 : RUN sed -i 's|/var/lib/influxdb|/data/influxdb|g' /etc/influxdb/influxdb.conf
[grafana] ---> 9a857048cc34
[grafana] Step 2/8 : COPY ./grafana.ini /usr/share/grafana/conf/custom.ini
[telegraf] ---> 9a857048cc34
[telegraf] Step 2/7 : RUN curl -o /tmp/telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.11.0-1_armhf.deb
[influxdb] Using cache
[influxdb] ---> 78d1fb50cdef
[influxdb] Step 4/4 : CMD influxd
[influxdb] Using cache
[influxdb] ---> af0d701ab067
[influxdb] Successfully built af0d701ab067
[telegraf] Using cache
[telegraf] ---> 71d494b966b0
[telegraf] Step 3/7 : RUN dpkg -i /tmp/telegraf.deb && rm /tmp/telegraf.deb
[grafana] Using cache
[grafana] ---> f482ae92f502
[grafana] Step 3/8 : COPY ./provisioning /usr/src/app/provisioning
[telegraf] Using cache
[telegraf] ---> ed2ad71de8e8
[telegraf] Step 4/7 : COPY telegraf.conf /etc/telegraf/telegraf.conf
[grafana] Using cache
[grafana] ---> f5058d98df9c
[grafana] Step 4/8 : COPY ./*.sh /usr/src/app/
[telegraf] Using cache
[telegraf] ---> 5eda8aee0cf2
[telegraf] Step 5/7 : COPY entry.sh /entry.sh
[grafana] Using cache
[grafana] ---> b00cb8dce5dd
[grafana] Step 5/8 : RUN install_packages fontconfig-config fonts-dejavu-core libfontconfig1 ucf jq
[grafana] Using cache
[grafana] ---> 4cfdcde487c7
[grafana] Step 6/8 : RUN chmod +x /usr/src/app/download.sh && /usr/src/app/download.sh "raspberrypi3"
[telegraf] Using cache
[telegraf] ---> 77fa467a394f
[telegraf] Step 6/7 : RUN chmod +x /entry.sh
[telegraf] Using cache
[telegraf] ---> 2d21161e1e95
[telegraf] Step 7/7 : CMD /entry.sh
[grafana] Using cache
[grafana] ---> 491fb63afc58
[grafana] Step 7/8 : RUN dpkg -i /tmp/grafana.deb && rm /tmp/grafana.deb
[telegraf] Using cache
[telegraf] ---> c3ce6ce36529
[telegraf] Successfully built c3ce6ce36529
[grafana] Using cache
[grafana] ---> d8d83533b2df
[grafana] Step 8/8 : CMD /bin/sh /usr/src/app/entry.sh
[grafana] Using cache
[grafana] ---> baad4c6c2003
[grafana] Successfully built baad4c6c2003
[sensor] ---> 8789c9fc4e70
[sensor] Step 2/16 : ARG BSEC_FILENAME=BSEC_1.4.7.3_Generic_Release_20190410.zip
[sensor] Using cache
[sensor] ---> d23c4f4af4f4
[sensor] Step 3/16 : RUN install_packages unzip
[sensor] Using cache
[sensor] ---> 06120d0a0717
[sensor] Step 4/16 : WORKDIR /usr/src/app
[sensor] Using cache
[sensor] ---> 3d6b073f0c90
[sensor] Step 5/16 : RUN git clone https://github.com/balena-io-playground/bsec_bme680_linux.git
[sensor] Using cache
[sensor] ---> dacda4ca8b34
[sensor] Step 6/16 : RUN wget https://ae-bst.resource.bosch.com/media/_tech/media/bsec/$BSEC_FILENAME
[sensor] ---> Running in cc87a55fd188
[sensor] --2019-07-04 22:34:50-- https://ae-bst.resource.bosch.com/media/_tech/media/bsec/BSEC_1.4.7.3_Generic_Release_20190410.zip
[sensor]
[sensor] Resolving ae-bst.resource.bosch.com (ae-bst.resource.bosch.com)...
[sensor] 139.15.248.75
[sensor] Connecting to ae-bst.resource.bosch.com (ae-bst.resource.bosch.com)|139.15.248.75|:443...
[sensor] connected.
[sensor]
[sensor] HTTP request sent, awaiting response...
[sensor] 404 Not Found
[sensor] 2019-07-04 22:34:51 ERROR 404: Not Found.
[sensor]
[sensor] Removing intermediate container cc87a55fd188
[Info] Uploading images
[sensor] The command '/bin/sh -c wget https://ae-bst.resource.bosch.com/media/_tech/media/bsec/$BSEC_FILENAME' returned a non-zero code: 8
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: undefined
[Error] Error: Information not available
[Error] Service: undefined
[Error] Error: Information not available
[Error] Service: sensor
[Error] Error: The command '/bin/sh -c wget https://ae-bst.resource.bosch.com/media/_tech/media/bsec/$BSEC_FILENAME' returned a non-zero code: 8
[Error] Service: undefined
[Error] Error: Information not available
[Error] Not deploying release.
Remote build failed
Error when building with balena push my-app
:
[influxdb] sed: /etc/influxdb/influxdb.conf: No such file or directory
Upon inspecting the container it looks like influxdb.conf
was moved from /etc/influxdb/influxdb.conf
to /etc/influxdb.conf
:
bash-5.0# ls -al /etc/influxdb/influxdb.conf
ls: /etc/influxdb/influxdb.conf: No such file or directory
bash-5.0# ls -al /etc/influxdb.conf
-rw-r--r-- 1 root root 20855 Jan 27 13:47 /etc/influxdb.conf
Useful for instance to add video streams or any other iframe to the dashboard.
Maybe make it optional since it requires security features to be disabled.
Hi,
I noticed that after a few weeks the sensor starts to give wrong data.
You can tell by the fact that the air is suddenly extremely bad from one moment to the next.
When I delete all data on the Raspberry and put the containers back on, the air quality is suddenly completely fine again. I guess there is a bug here?
It would be helpful if the sense module BME280 was included within balena-sense for those not interested in having VOC gas sensing provided for in the BME680. They are both compatible in all other respects as far as I can see. My log for using the BME280 produced:
This is the log:
16.05.20 20:11:36 (+0000) sensor Enviro Plus hat not found
16.05.20 20:11:36 (+0000) sensor BME680 not found on 0x76, trying 0x77
16.05.20 20:11:36 (+0000) sensor BME680 not found on 0x77
16.05.20 20:11:36 (+0000) sensor Sense HAT not found
16.05.20 20:11:37 (+0000) sensor 1-wire sensor not found
16.05.20 20:11:37 (+0000) sensor No suitable sensors found! Exiting.
16.05.20 20:11:40 (+0000) telegraf 2020-05-16T20:11:40Z E! [inputs.http] Error in plugin: [url=http://sensor]: Get http://sensor: dial tcp 172.17.0.5:80: connect: connection refused
16.05.20 20:11:42 (+0000) Service exited ‘sensor sha256:1e449bd09f641af109eef47e0a13763614650d81934ed05365a328acac3150e9’
17.05.20 16:52:26 (+0000) Supervisor starting
Any thoughts/solutions please?
Hi
Thank you for this fantastic project!
I am wondering if you have tested or have plans to integrate it with the Pimoroni Enviro+ sensor for Raspberry Pi. I am considering getting this sensor but also windering if the Pimoroni BME 680 is the smarter choice.
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.