Giter Club home page Giter Club logo

fijnstof's People

Contributors

jkransen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fijnstof's Issues

Streams not running in parallel

Main:88 runs the flows sequentially
branch: master

Background info: SDS011 is PM measurements, MHZ19 is CO2 measurements.

Reproduce:
first run docker-compose up -d domoticz

run Main with program argument "test"
You will see a PM2.5 and a PM10 measurement submitted to Domoticz
After that, a CO2 measurement is also submitted to Domoticz.
This is expected.

run Main again, without arguments, it will now run infinitely
You will see only PM2.5 and PM10 measurements repeatedly, no CO2 anymore, because apparently these will come after the infinite stream of SDS011.

Expected:
CO2 measurements will come every 4 measurements of PM2.5 and PM10

Tried:
Make an explicit evalOn on Main:88:
_ <- configs.foldMap(conf => contextShift.evalOn(ec)(runFlow(isTest)(conf)))

Allow for fault recovery

Disconnecting and reconnecting physical sensor should allow for a restart of the stream. While disconnected, polling may be done with increasing intervals.

GPIO output

Treshold values should result in GPIO outputs being low or high. This way, connected LEDs can light up green/yellow/red to reflect the air quality. Mock devices should be added to allow testing on environments without GPIO.

The GPIO output will be a separate target, with configuration items setting the GPIO pins and treshold values.

Use and improve jkransen/framboos module for this.

Restructure documentation

Landing page should only contain high-level information and a quick HOWTO. Technical details should be split off into separate files.

Test mode does not return

When run with the "test" parameter, only one measurement is collected and submitted. However, the program does not return after that. Expected: after the measurement, exit code 0 is returned.

API for latest measurement values

A Target should be added to return the latest measurement. At first this can be a simple GET endpoint. A simple HTTP client should be able to fetch and display the measurements.

Use Cats IO and STTP, and target the ZIO branch.

IO Based backend for STTP

HTTP requests to Domoticz and Luftdten should use AsyncHttpClientCatsBackend or AsyncHttpClientFs2Backend instead of the current side effectful HttpURLConnectionBackend.

Domoticz:25
Luftdaten:19

Add Fibaro

Similar to Domoticz, measurements should be sent to a Fibaro system. Included is a mock Fibaro system to test the functionality without an actual Fibaro. Consider the automatic creation of a "virtual sensor" in Fibaro. Not sure if Fibaro supports this.

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.