meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| homeautomation2017:group3:start [2017/03/03 02:32] – suganmira | homeautomation2017:group3:start [2017/03/11 01:11] (current) – suganmira | ||
|---|---|---|---|
| Line 26: | Line 26: | ||
| ===== Our Idea ===== | ===== Our Idea ===== | ||
| - | We have implemented a system with DHS HomeManager, | + | We have implemented a system with DHS HomeManager, |
| {{: | {{: | ||
| Line 40: | Line 40: | ||
| ===== System Architecture===== | ===== System Architecture===== | ||
| {{ : | {{ : | ||
| + | |||
| + | ===== Cognitive Prediction (Code Snippet) ===== | ||
| + | This is the Predition service code sample to train the neural network model with collected home data | ||
| + | < | ||
| + | var brain = require(' | ||
| + | var fs = require(' | ||
| + | |||
| + | // Training data for temperature, | ||
| + | var training_data = JSON.parse(fs.readFileSync(' | ||
| + | var net = new brain.NeuralNetwork(); | ||
| + | |||
| + | // Training the neural network | ||
| + | net.train(training_data); | ||
| + | |||
| + | // Predict a switch response based on a temperature and humidity input | ||
| + | var output = net.run([0.22, | ||
| + | </ | ||
| + | |||
| + | ===== FHEM Definitions (Code Snippet) ===== | ||
| + | Normal Mode | ||
| + | < | ||
| + | define NormalMode notify DoorWindowSensor { | ||
| + | if (($EVENT eq " | ||
| + | fhem "set Switch on" | ||
| + | } | ||
| + | else { | ||
| + | fhem "set Switch off" | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Shield Mode | ||
| + | < | ||
| + | define ShieldMode notify MotionSensor { | ||
| + | if (($EVENT eq " | ||
| + | fhem "set Switch off" | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Child Mode | ||
| + | < | ||
| + | define ChildMode notify DoorWindowSensor { | ||
| + | if (($EVENT eq " | ||
| + | fhem "set Switch on" | ||
| + | } | ||
| + | else { | ||
| + | fhem "set Switch off" | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| ===== It Works!===== | ===== It Works!===== | ||
| Line 94: | Line 146: | ||
| * Poster : {{ : | * Poster : {{ : | ||
| * Mode Configuration in FHEM (example) : {{ : | * Mode Configuration in FHEM (example) : {{ : | ||
| - | * Code Package : {{ : | + | * Code Package : {{ : |
| * Presentation Slides : {{ : | * Presentation Slides : {{ : | ||
| + | * Report : {{ : | ||
| * Energy Analysis : {{ : | * Energy Analysis : {{ : | ||