User:Martinus/NodoSmallRevival

From Let's Control It
Jump to navigation Jump to search
Nodo Small Revival

Introduction

User-Martinus-ESPRFLinkSmall.JPG

Still have some old Nodo Small hardware laying around? And would like to integrate with more future proof communication and/or controllers?

I have converted my old Nodo Arduino board to a new controller that can still control several KAKU lights in a similar way that the Nodo used to do.

Hardware

  • Nodo Arduino 1.6/1.7 or Nodo Small board like this:

User-Martinus-NSM.jpg

  • ESP8266 module

The ESP module is connected to the Nodo Arduino board using Serial RX/TX. A simple levelshifter is being used.

Software

Configuration

The ESP Easy module has only the Serial Server configure to listen to the serial output from the RFLink module. While another server could connect to the Serial Server, it is not in use. User-Martinus SerialRFLinkConfig.png

The Serial Server creates events that can be handled within the rule engine. The SerialSend command from the plugin can control the RFLink module.

Incoming events are to be treated as literal strings so these events are preceded with the '!' symbol. This means that the '=' symbol is ignored and the entire event can be used as a trigger.

This node mainly listens to Kaku transmitters (hand remote as well as PIR devices) and controls other Kaku receivers. Another ESP node outside sends data on outside lightstrength using global sync.

ESP Easy rules sample

// Control hallway lights, using Kaku PIR switch
on !RFLink#NewKaku;ID=01234567;SWITCH=a;CMD=ON; do
  if [Lights#Hal]=1
    timerSet 1,1
    timerSet 2,600
    timerSet 3,630
    timerSet 4,660
  endif
endon

on !RFLink#NewKaku;ID=01234567;SWITCH=a;CMD=OFF; do
  if [Lights#Hal]=1
    timerSet 2,60
    timerSet 3,90
    timerSet 4,120
  endif
endon

// Using timers, gradually dim down the lights
on Rules#Timer=1 do
  SerialSend 10;NewKaku;12345;2;8;
  delay 500
  SerialSend 10;NewKaku;12345;2;8;
  delay 500
  SerialSend 10;NewKaku;12345;2;8;
endon
on Rules#Timer=2 do SerialSend 10;NewKaku;12345;2;5;
on Rules#Timer=3 do SerialSend 10;NewKaku;12345;2;3;
on Rules#Timer=4 do SerialSend 10;NewKaku;12345;2;OFF;

// control outside lights based on ouside lights (global sync from another node)
on OutsideLDR#Lux<150 do // 800
  if [Lights#Hal]=0
    SerialSend 10;NewKaku;12344;2;ON;
    SerialSend 10;NewKaku;12346;2;ON;
    TaskValueSet 3,1,1
  endif
endon

on OutsideLDR#Lux>200 do // 900
  if [Lights#Hal]=1
    SerialSend 10;NewKaku;12344;2;OFF;
    SerialSend 10;NewKaku;12346;2;OFF;
    TaskValueSet 3,1,0
  endif
endon

on !RFLink#NewKaku;ID=01234568;SWITCH=2;CMD=ON; do
  SerialSend 10;NewKaku;12347;2;ON;
  SerialSend 10;NewKaku;12348;2;ON;
endon

on !RFLink#NewKaku;ID=01234568;SWITCH=2;CMD=OFF; do
  SerialSend 10;NewKaku;12347;2;OFF;
  SerialSend 10;NewKaku;12348;2;OFF;
endon