Giter Club home page Giter Club logo

llearnd's Introduction

llearnd

laundry learn daemon

outline

This daemon is running on a laundry learn raspberry pi and acts as a whole management daemon. It handles GPIO, detects the state of the laundry machine and also posts live data to MQTT. It runs in as a finite statemachine to map the laundry machine states and it will handle the different machine learning scripts (python with scikit-learn) to determine a final approximation for the laundry machine runtime.

Install

Install wiringPi

Install Daemon

sudo cp llearnd.service /etc/systemd/system
sudo ./install.sh
systemctl enable llearnd.service
systemctl start llearnd.service

source description

llearnd.c / llearnd.h

This is the llearnd main program. It handles:

  • system functionality (daemon mode, syslog, error handling, signals)
  • machine state detection
  • intern statemachine handling
  • MQTT Broker connection

When started, the daemon handles typical system functionality like commandline arguments and init of syslog and hardware modules. After that it changes into statemachine mode. This statemachine has following states:

stmWait

This state is chosen, when the laundry machine is not running. This state has not further logging. It reports the machine state to the MQTT Broker every 30 seconds.

stmPreProcess

This state is called, when the machine started to wash. It's purpose is to create a logfile and start a machine learning script to approximate a machine runtime. It then automatically switches to stmRun mode.

stmRun

When the laundry machine is running, the statemachine is in stmRun mode. This state posts current machine stats to the MQTT broker and also logs all sensor data into a logfile every second.

stmPostProcess

When a laundry machine run has ended, the PostProcess state will be called. Postprocessing means, that the logfile will be closed, copied to a backup location, analyzed and used as training data for the machine learning function. After that, the state automatically switches to stmWait

mpu6050.c / mpu6050.h

These files handle the MPU6050 3-axis-accelerometer and gyrometer. This module is connected via I2C bus and used to determine a shakeValue (when machine is in spin-mode) and the state of the rotary switch, which sets the running mode of the laundry machine (Kochwäsche/Pflegestufe/Temperatur etc.).

sht21.c / sht21.h

This is a temperature and humidity sensor which is also connected via SPI. It has no special purpose besides detecting the room temperature and humidity.

called scripts

snu-log.sh

bash script to save and upload a logfile

Machine Learning .py

A python script which processes logfiles and tries to determine a remaining runtime for the laundry machine.

llearnd's People

Contributors

tsmt09 avatar

Watchers

 avatar

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.