kike-canaries / canairio_backend Goto Github PK
View Code? Open in Web Editor NEWWebapp for CanAirIO
License: GNU General Public License v3.0
Webapp for CanAirIO
License: GNU General Public License v3.0
Algunos de los grants a los que queremos aplicar para obtener financiación requieren que la documentación del proyecto también esté escrita en Inglés. Por esto, necesitamos traducirla y hacerla asequible. Puede estar en el mismo archivo y hacemos una tabla de contenidos con idiomas y anchors que lleven al idioma seleccionado, siendo el principal y primer idioma el Español.
We're experiencing some issues with certain data payloads which are being interpreted as integers when they are in fact float values without decimals. Somewhere along the pipeline in the reporting device the decimals are being dropped and the serialization system interprets them as integers.
We're solving this the quick and dirty way by casting all values in the request.data
as floats until we can come up with a cleaner solution on the device firmware.
This is a great first issue and the related code is here:
https://github.com/kike-canaries/canairio_backend/blob/develop/points/views.py#L30
As a related note, we may need to recreate existing measurements from a backup and that will require a script or some fancy influxQL. We'll deal with that separately.
See the associated stack trace for details:
2019-08-05T19:08:37.449971+00:00 app[web.1]: 10.33.169.142 - canairio [05/Aug/2019:19:08:37 +0000] "POST /points/save/ HTTP/1.1" 201 15 "-" "ESP32HTTPClient"
2019-08-05T19:08:37.619957+00:00 app[web.1]: Error while saving points.
2019-08-05T19:08:37.619966+00:00 app[web.1]: Traceback (most recent call last):
2019-08-05T19:08:37.619968+00:00 app[web.1]: File "/app/points/views.py", line 32, in save_points
2019-08-05T19:08:37.619970+00:00 app[web.1]: is_success = influx_client.write_points(point_data)
2019-08-05T19:08:37.619973+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/influxdb/client.py", line 490, in write_points
2019-08-05T19:08:37.619975+00:00 app[web.1]: tags=tags, protocol=protocol)
2019-08-05T19:08:37.619977+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/influxdb/client.py", line 551, in _write_points
2019-08-05T19:08:37.619979+00:00 app[web.1]: protocol=protocol
2019-08-05T19:08:37.619981+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/influxdb/client.py", line 327, in write
2019-08-05T19:08:37.619983+00:00 app[web.1]: headers=headers
2019-08-05T19:08:37.619985+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/influxdb/client.py", line 286, in request
2019-08-05T19:08:37.619987+00:00 app[web.1]: raise InfluxDBClientError(response.content, response.status_code)
2019-08-05T19:08:37.619990+00:00 app[web.1]: influxdb.exceptions.InfluxDBClientError: 400: {"error":"partial write: field type conflict: input field \"hum\" on measurement \"PM2.5_BOG_USM_VirreySur_E01\" is type integer, already exists as type float dropped=1"}
Maybe we need add documentation for add a local network or IP devices on ALLOWED_HOSTS
. With the current documentation, we get the next error from a local device:
[06/Aug/2019 09:19:22] "POST /points/save/ HTTP/1.1" 400 60060
Invalid HTTP_HOST header: '192.168.178.37:8000'. You may need to add '192.168.178.37' to ALLOWED_HOSTS.
Estoy haciendo mediciones a 600 metros de una estacion de la RMCAB, quiero comparar los promedios de PM que mido con los que reporta la estacion, pero el formato del CSV no me facilita la tarea.
Hi,
I would like to have something like https://website/json/datapoints
to get all public data collected by this project in a JSON array. At least something like latitude, longitud and data (amount of particulate material, hour, etc), could be a good start. Even if the interface is not stable, having this to start experiments from different languages to build data and visualizations could be a good starting point.
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.