1 of 51

MySensors meetup Breda

30 juli 2016 - CM Breda

Iedereen maakt.

2 of 51

Locatie

  • Konijnenberg 30�4825 BD�Breda�Netherlands��cm.nl
  • Link naar de locatie: Google maps

3 of 51

Deelname

  • Toegang voor de gehele dag is slechts € 12,50
  • Voor dit bedrag regelen wij lunch met broodjes & beleg, koffie, thee en frisdrank
  • Registreer jezelf hier door vooraf een ticket te kopen: https://shop.ticketflow.eu/mysensors/en/
  • Neem dit ticket mee naar de meetup (digitaal of geprint)!
  • Wees op tijd met registratie, want vol = vol!

4 of 51

Sponsors

  • Platina: CM

5 of 51

Topics of the day

  • 10:00 Welcome / Entree (koffie / thea)
  • 10:30 About CM (https://www.youtube.com/watch?v=Y19-h8dY4m0)
  • 10:45 Presentation sincze
  • 11:15 Short Break…
  • 11:30 Presentation Yveax
  • 12:00 Presentation Gert
  • 12:30 Lunch
  • 13:30 Presentation koresh & yury
  • 14:00 Presentation Bas (Expanding mysensors with I-Beacons?)
  • 14:30 Playtime
  • BBQ (depending on the weather??)

6 of 51

Layout

  • Presentatie hoek (4x schermen, wifi-guest, whiteboard+ markers)
  • Soldeer en knutsel hoek (weller station)
  • Koffie, thee en frisdrank hoek

7 of 51

Plugfest

  • Breng je eigen sensors & actuators mee
  • We hangen ze allemaal in 1 netwerk -- kijken hoe goed dat werkt!

  • nRF24 radio, MySensors library 1.5 of 2.0 beta
  • #define MY_RF24_CHANNEL 82
  • Rest default

8 of 51

Presentaties

  • Sincze: Domotica, controllers & MySensors
  • Yveaux: Hoe knoop je alles aan elkaar? MySensors - MQTT - Node-Red - InfluxDB - Grafana - ...
  • Gert: SMS capable sensornode
  • Esp8266: wie?
  • Signing / encryption: wie?

On display

  • Yveaux: SmartPlug, Ikea Molgan hack, nRF24 Sniffer,
  • OpenTherm - votes please!
  • Bouw een energie zuinige Sensor (battery packed), crash course ??

9 of 51

Domotica, controllers & MySensors

Sándor Incze

10 of 51

Why I started ?

+ =

11 of 51

Keeping Domotica affordable

12 of 51

Keeping Domotica affordable

13 of 51

And then it all started

  • Temperature and humidity sensors
  • Light sensors
  • Electric meters (voltage, current, power, energy)
  • Mailbox Sensor / Security
  • Visual Doorbell notifications
  • CH / DHW Thermostat
  • Weather sensors (temperature, humidity, pressure, wind, rain, UV, irradiation, air quality, etc.)
  • User variables
  • Pushover / Telegram / Whatsapp integrations
  • Motion Detection (IP-Cam, Syno, Kodi)
  • Etc.

14 of 51

Keeping Domotica affordable

15 of 51

Keeping Domotica affordable

16 of 51

Personal Goal

  • Keep investment as low as possible
  • Aliexpress & e-bay are your friend

17 of 51

Problems

  • Range
  • No 2 Way communication in protocol possible (433mhz, kaku / coco)

18 of 51

Solutions

  • Mesh Network (MySensors)

  • Even Cheaper Sensors < $5

19 of 51

Solutions

  • 433 mhz Gateway < € 30

  • Affordable Sensors < $5

20 of 51

Solutions

Simple Leakage Detector

21 of 51

Solutions

Watermeter

€ 82,50

22 of 51

Solutions

Watermeter

€ 5,-

23 of 51

Solutions

Watermeter

24 of 51

Solutions

Watermeter

25 of 51

Solutions

You have got mail Detector

26 of 51

Integration with existing Hardware

  • Even when KAKU says it is not possible

27 of 51

Sunscreen

28 of 51

Opentherm Gateway

29 of 51

Opentherm Gateway

30 of 51

Reading Solar Inverter values

31 of 51

Monitor your ISP

32 of 51

Thank you for your attention

Questions and Suggestions please ;-)

33 of 51

Connecting it all!

34 of 51

GertSanders

35 of 51

SMS capable sensor node

Why a node with SMS capability when a controller can do better?

  • Need to keep an eye on a house.
  • Some sensors need to be able to send an alarm, even if the internet connection is down.
  • I’m better reachable by SMS then by email or prowl when abroad.
  • Because it’s cool to control a pump by sending a SMS.
  • An Arduino library seemed to be available for the SMS800L.

How to make it work?

  • Trying to get the SIM800L module to work, no success until I found a photograph�showing how to insert the SIM card.
  • Trying to receive a SMS and make a LED blink (as you know I love blinky lights).
  • Devise a scheme to address nodes in my network.
  • Do some coding.
  • Make a board.

36 of 51

SMS capable sensor node

Hardware (minimum needed to make this work):

  • bare atmega328p with 8MHZ crystal, but a pro mini or arduino would work as well
  • DC-DC converter (6V/36V -> 4V), the SIM800L module needs 4V and has peak demands up to 2A (in very short bursts) !
  • a SIM800L module (several are available so go for simple and cheap).
  • my PCB (see openhardware.io: https://www.openhardware.io/view/11/ACDCBatteries-capable-atmega328p-board) or WYO (wire you own)

Software:

  • MySensors library
  • Adafruit FONA library

37 of 51

SMS capable sensor node

The SIM800L module and a 2G SIM card:

38 of 51

SMS capable sensor node - connection of SIM800L

  • D2 -> RXD
  • D3 <- TXD
  • D4 -> RESET

Vcc to your 4V power supply

GND to GND

Decouple power with as much capacitors as can fit on your node.�I’m using a minimum of 100uF, but added two more 100uF on my AC capable board just to be sure.

39 of 51

SMS capable sensor node

The setup of the pins is also defined in the sketch, so you can use any three digital pins as long as the two pins used for serial connection are supported by the SoftwareSerial library.

// All includes�#include <SPI.h>�#include <SoftwareSerial.h>�#include <Adafruit_FONA.h>�#include <MySensors.h>

// Pin definitions and other defines�#define FONA_RX 2�#define FONA_TX 3�#define FONA_RST 4

Pin setup is handled by the FONA library, so no need for a pinMode definition in setup().

40 of 51

SMS capable sensor node - Software

41 of 51

SMS capable sensor node - Software

The SMS node has an “owner”. This is any GSM number registered to it via SMS containing a password (is defined as a string in the sketch). Once an owner is defined, no second owner will be accepted until the node is released by the owner. The release string is also defined in the sketch.

The node also sends all received V_TEXT and all received SMS to the controller (as V_TEXT).

An owner can adres a node in the network via the following format:

Nxyz:<some_text>

The character N plus three digits and a colon mark a node address.

42 of 51

SMS capable sensor node - Software

Nxyz:<some_text>

xyz must be a number between 1 and highest node number (255)

<some_text> can be any MySensors V_TEXT payload, so maximum 25 chars.

What you send to a node in the network needs to be treated by that node, the SMS node does NO checking on it.

The receiving node will only get the <some_text>. This means it needs to handle a V_TEXT in the receive() function.

43 of 51

SMS capable sensor node - Software

The simplest receive() function:

char msgbuffer[25 + 1] = "";�MyMessage door1msg(DOORSWITCH1, V_TRIPPED)

void receive(const MyMessage & message)

{

if (message.type == V_TEXT)

{

strcpy(msgbuffer, message.getString());

if (strcmp(msgbuffer, "on") == 0)

{

InvertLED = true;

}

if (strcmp(msgbuffer, "off") == 0)

{

InvertLED = false;

}

send(door1msg.set(InvertLED));

strcpy(msgbuffer, "");

}

44 of 51

Insertable Node and Battery Button combo

Koresh & Yury

Presentation

45 of 51

Ibeacons

Bas van den Heuvel

Presentation

46 of 51

What happened and what did you miss

Pictures of the DAY

47 of 51

48 of 51

49 of 51

50 of 51

51 of 51