Skip to content

Instantly share code, notes, and snippets.

substitutions:
devicename: rollerblind-bedroom
devicestring: Rollerblind Bed
esphome:
name: $devicename
platform: ESP8266
board: nodemcuv2
esp8266_restore_from_flash: true
on_boot:
@nidayand
nidayand / es8266_mon_temp_pir.ino
Last active January 11, 2019 21:57
Arduino IDE code for esp8266 detecting 1-wire ds18b20 temperature and PIR-detector. Connects to wifi and MQTT broker and publishes temperature changes and PIR detections.
#include <OneWire.h>
#include <DallasTemperature.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
/*
* PIR must have 5V VCC. 3.3V is not enough. Using the USB power that is set to 5V to power it.
* PIR - VCC to 5V, Data to GPIO4
* Left trim is sensitivity and right is time
* 1wire - Pull up resistor on 2,2kOhm for the data. Data to GPIO_2
@nidayand
nidayand / Add Standalone client to Verse.user.js
Last active January 2, 2018 19:17
A Greasemonkey (Firefox) or Tampermonkey (Chrome or Safari) script that integrates IBM Verse to a standalone IBM Sametime client. It adds an additional icon/action to the profile badges in IBM Verse
// ==UserScript==
// @name Add Standalone client to Verse
// @namespace https://gist.github.com/nidayand/
// @version 0.7
// @description Integrate IBM Verse to standalone Sametime client (or IBM Notes client)
// @author nidayand
// @match https://mail.notes.na.collabserv.com/verse*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
// @grant GM_xmlhttpRequest
// @updateURL https://gist.github.com/nidayand/767796526ce4ae7af0c3/raw/Add%2520Standalone%2520client%2520to%2520Verse.user.js