Skip to content

Instantly share code, notes, and snippets.

[
{
"id":"64325772.978db8",
"type":"serial in",
"z":"18eb1548.cf005b",
"name":"",
"serial":"cd679ecd.7f72f",
"x":160,
"y":140,
"wires":[
# =========================================
# Makers! Implement your own actions here.
# =========================================
class playRadio(object):
def __init__(self, say, keyword):
self.say = say
self.keyword = keyword
#include "DHT.h"
#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup(void) {
Serial.begin(9600);
dht.begin();
class setTimer(object):
def __init__(self, say, keyword):
self.say = say
self.keyword = keyword
def to_number(self, number_string):
number = {'one':1,
'two':2,
'three':3,
@ktinkerer
ktinkerer / connect.lua
Created March 9, 2017 15:01
Connecting NodeMCU to wifi using enduser setup.
-- file: connect.lua
local module = {}
function module.start()
enduser_setup.start(
function()
print("Connected to wifi as: " .. wifi.sta.getip())
end,
function(err, str)
print("enduser_setup: Err #" .. err .. ": " .. str)
[
{
"id":"34541282.b27bae",
"type":"exec",
"z":"950c840e.c0af58",
"command":"sudo /home/pi/raspberry-strogonanoff/src/strogonanoff_sender.py --channel 1 --button 1 --gpio 0 on",
"addpay":false,
"append":"",
"useSpawn":"",
"timer":"",
@ktinkerer
ktinkerer / sunIFTTT.json
Created March 4, 2016 11:52
Sun events to IFTTT Node-RED example
[
{
"id":"988f87a9.677078",
"type":"sun events",
"z":"371c357.fc8e3ca",
"testmode":true,
"verbose":false,
"topic":"Sun",
"name":"Sun",
"x":114.21900939941406,