Comments (8)
You are right. I will include a parameter with default value 1013.25hPa.
You can however quick fix this by removing the 0 parameter in this line manually.
node-red-contrib-bme280/bme280.js
Line 59 in 5b3199b
from node-red-contrib-bme280.
Updated in master branch the correction
from node-red-contrib-bme280.
The correct solution is to query for the correct data from one of the many weather sites, using a geo location site to get the global coordinates then the actual sea level pressure for the given time and location. The 1013.25 value is a common estimate, but it is not truly accurate. When I wrote my python script to support BME280 sensors, I do get the longitude and altitude, and the valid sea level pressure for the actual location of the sensor, thus I get the most accurate altitude measurement. It is a bit of work, but to get the most accurate result, required. This is one of situations where a GPS reading is of benefit, versus having the user provide the location before sensor sampling.
from node-red-contrib-bme280.
GPS or query to external service is beyond the scope of this custom node. Nodered have tons of tools to design your own flows with this logic point out. Now the nodes has a configuration option so you can tune this with your value. But make a modificaiton to allow dynamic change of the value using the trigger input.
from node-red-contrib-bme280.
Yes, I just thought it should be noted what the real, true, methodology is to get the altitude correct. Given that you can inject the correct sea-level value, as noted above, into the node, that is reasonable and appropriate.
from node-red-contrib-bme280.
Unfortunately, using 1013.25 as an estimated value of pressure at sea level is still not very accurate. I live about 40 m above sea level but the current code, works the elevation out to be over 90 m.
from node-red-contrib-bme280.
Maybe it should be a parameter we can pass in so we can change that.
from node-red-contrib-bme280.
It is, you can feed the correct value to the node module. The trick is how you get it, you need the GPS coordinates then query a weather site for the sea level pressure value base on the GPS coordinates, if you do this, this will significantly improve the resulting value from the bme280 chip. For example, using 1013.25 at my location, as the 'estimated' seal level pressure, the bme280 reports my location is about 93m elevation. If I use 1004, which for yesterday was the official sea level pressure at my location, bme280 reports the elevation at about 43m. As validation, the official reported elevation for the city I live in, is 41m. So, 43m is reasonable and comparable to the official value. Whereas, 93m, using the estimated sea level value, is just not even remotely accurate.
from node-red-contrib-bme280.
Related Issues (9)
- this node does lose any message properties of the received message. HOT 8
- Address validation error HOT 17
- Parameter error I2C-Address HOT 1
- does not compile on buster with node.js 13.3.0 and node-red 1.0.3 HOT 4
- Your module apparently causes the i2c scan to slow down signficantly if the sensor disappears or another sensor is added after the bme280 sensor disappears? HOT 2
- Is payload empty or null or never sent on error?
- Request that node test for presence of sensor before attempt to initialize same HOT 2
- Connection BME280 to PC(Windows) HOT 2
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 node-red-contrib-bme280.