Showing posts with label domoticz. Show all posts
Showing posts with label domoticz. Show all posts

1/12/19

Week #2's Wednesday Evening Training: an IoT "Klusavond" on Domoticz, interrupts and a great brainstorm

This week, we had our first Wednesday Evening Training of 2019! We started with a good old IoT "klusavond" in which we discussed several topics:

  • Domoticz home automation
  • Implementing interrupts with the Arduino
  • Brainstorm on this years IoT topics in the Wednesday Evening Training


Domoticz home automation


Luc Slutter, on of our IoT experts, gave us an excellent introduction into home automation with Domoticz. Domoticz is a compact home automation system that allows you to operate a multitude of devices, sensors and smart devices. You can control Domoticz via various devices, such as your laptop, tablet and smartphone. The user environment is web-based, and can be installed on different devices.

Luc showed us the features, technology and gave us a demonstration and technology walkthrough of his own home built automation solution.

Great stuff! We will definitely continue with Domoticz (and similar platforms) this year.



Implementing interrupts with the Arduino


Reading values from sensors in your IoT device (like the Raspberry Pi of Arduino) can be done by, roughly speaking, constantly interrogating them or reacting on changed measured values. The first approach requires a program loop in which all sensors are queried. This is rather inefficient and, depending on the implementation, can also give untimely measurements. The program may not react fast enough to changes in measurements. An alternative to this approach is an interrupt implementation in which the hardware detects voltage changes in the hardware pins (to which the sensors are linked), stops processing the main program and runs a specially created interrupt routine. This is a more efficient and accurate approach which also yields neater code.












This evening I gave an introduction and demo of an interrupt implementation using the Arduino. The demo consisted of a button being pressed, generating a value change on one on the Arduino pins, causing an interrupt routine to be fired in my C program loaded in the Arduino. The interrupt routine then activates another pin which turns on a LED. My C program kept the status of the LED (on/off) and, dependent of this status, could switch the LED on and off. A very simple example, clearly demonstrating the interrupt approach.






Brainstorm on this years IoT topics in the Wednesday Evening Training


We also had an inspiring brainstorm on IoT topics we should address in 2019, led by our IoT champion (and Young professional of 2018!) Aishwarya Dhall. In 2019 there is still a lot to experiment and learn in the field of IoT. Here we are thinking of experimenting with various new sensors, home automation, integration of IoT devices and (cloud) platforms and experimenting with new applications.

We'll continue our IoT workshop on January 23th. Make sure you don't miss my posts on this!



Further reading

Do you want to read more on the topics in this post or play around with the technology? Here are some links…

On Arduino:
Arduino Interrupts Tutorial (explanations, 2 demo's/labs): https://www.youtube.com/watch?v=QtyOiTw0oQc
My YouTube playlist on Arduino: https://www.youtube.com/playlist?list=PLSiMhBs48YvV86iiXFJY-BRxOsP2A2pnH
10 Awesome Beginner Arduino Projects: https://create.arduino.cc/projecthub/RoyTobby/10-awesome-beginner-arduino-projects-78a6a6
Arduino project - Adaptive LED Morse Code Decoder and Timer Interrupt: https://create.arduino.cc/projecthub/shjin/adaptive-led-morse-code-decoder-and-timer-interrupt-8d18a7
Arduino - Multitasking (e.g. interrupts): https://learn.adafruit.com/multi-tasking-the-arduino-part-2/overview
Arduino Playgrounds - Interrupts: http://playground.arduino.cc/code/interrupts

On Domoticz:
Domoticz official site: http://www.domoticz.com
My YouTube playlist on Domoticz: https://www.youtube.com/playlist?list=PLSiMhBs48YvWmAEqHS_w_l9Suj4lT05VX
(Dutch) Controle over je apparaten met Domoticz en Raspberry Pi: https://computertotaal.nl/artikelen/internet-thuis/controle-over-je-apparaten-met-domoticz-en-raspberry-pi

Past Wednesday Evening Trainings on all topics

You 'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining


4/26/18

This week's Wednesday Evening Training: Domoticz, Blockly and the digital Rube Goldberg machine

This week's Wednesday Evening Training was organized as a "klusavond"; an evening in which everyone is working on his own projects and demo's, walkthroughs and explanations are on an ad hoc basis.

Luc Slutter demonstrated us his Domoticz project in which he connected wifi switches operated using Node-RED messaging and Witty Cloud. Domoticz is a Home Automation System that lets you monitor and configure various devices like lights, switches, various sensors/meters like temperature, rain, wind, uv, electra, gas, water and much more. Notifications/Alerts can be sent to any mobile device. Interesting stuff. When his project is finished he will organize a workshop on this topic.


Also, we've taken a look at Blockley. Blockly is a client-side JavaScript library for creating visual block programming languages and editors. Using Blockly, we'll be able to define, e.g. a language for describing User Stories and, based on that language definition, be able to "drag and click"-assemble a User Story. As a next step we would be able to generate some kind of prototype code based on this digitized User Story. I've shown some demo's and have given a code & tool walkthrough on how to create a language using Blockly and how to generate code from this. There is a neat handson lab available on the web, please see the links below.

In our continuing quest for the ultimate IoT killer application we came to the conclusion that we really shouldn't continue this quest but rather concentrate on playing with technology. Inspired by artists' slogan: "l'art pour 'l art" (Art for art's sake, see: https://en.wikipedia.org/wiki/Art_for_art%27s_sake) we should have our own slogan: "Technology for technology's sake". Experimenting, learning and having a lot of fun is a goal on it's own. So building some kind of a digital Rube Goldberg machine seems a nice practical common goal for us. For those who wonder what a Rube Goldberg machine is, it's a "deliberately complex contraption in which a series of devices that perform simple tasks are linked together to produce a domino effect in which activating one device triggers the next device in the sequence" (see: https://en.wikipedia.org/wiki/Rube_Goldberg_machine). Therefore, we decided to define a message format describing some sort of "digital train" that will be able to travel across our various IoT devices and applications.

Each device/application will determine it's own way in which the digital train look like. For example: on a laptop it could look like a normal train, but on the next device on the virtual track, it could look like a procession of elephants and in a Unity3d scenery it would be possible to present it as a row of rolling balls. The first two railway stations: a Java program (thanks Bart van Beek) and a Node-RED flow, have been created in this evenings' session. Trains started at Bart's station, drove to my Pi and drove back to the station, all in one piece and all the digital wagons in the correct order. We will see where all this is going to lead!

Next week's Wednesday Evening Training

In next week's Wednesday Evening Training, we'll get a nice electronics 101 session and we'll be starting a handson lab on creating a programmable LED cube (for a demo, see: https://www.youtube.com/watch?v=S6P3jcxKh-k). Thanks in advance, Aishwarya Dhall and Harrie van der Plas, for preparing this!

Further reading

Want to read more or try yourself? Here are some links...
Get started with Blockly: https://developers.google.com/blockly/
Blockly GitHub sources and some great examples & labs: https://github.com/google/blockly
Blockly demo: https://blockly-demo.appspot.com/static/demos/fixed/index.html
A neat Blockly codelab: https://codelabs.developers.google.com/codelabs/blockly-web/index.html
An intro to Rube Goldberg's machines: https://www.youtube.com/watch?v=__mId8huz1Q
Domoticz home automation: https://domoticz.com/
Domoticz source code: https://github.com/domoticz/domoticz
Using Domoticz with Raspberry Pi: https://www.domoticz.com/wiki/Raspberry_Pi

#capgemini #werkenbijcapgemini #lifeatcapgemini #wednesdayeveningtraining #iot #nodered #raspberrypi #blockly #domoticz #rubegoldbergmachine #nodered #wittycloud