Giter Site home page Giter Site logo

canairio_backend's People

Contributors

dependabot[bot] avatar gaguevaras avatar hpsaturn avatar ikks avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ikks sonimik13

canairio_backend's Issues

Traducción del Readme.md a inglés para universalizar el acceso

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.

Validate all numeric values in received JSON and cast them to float

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"}

Creación de pruebas de integración de la API

  • Configuración de set de datos inicial para usarlo como semilla para pruebas y desarrollo local.
  • Prueba de endpoint para obtener últimas medidas del grupo de sensores.
  • Prueba de endpoint para obtener un CSV export de un track.
  • Prueba de endpoint para obtener el NowCast de las últimas horas.

Post error: ALLOWED_HOSTS from local device

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.

Formato de hora que lo lea un humano

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.

JSON endpoint for all public data

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.