Skip to content

Instantly share code, notes, and snippets.

@gartdan
gartdan / esp8266_blog_post.ino
Created June 22, 2015 18:42
Sample code to post temp, humidity and light data
#include <ESP8266WiFi.h>
#include <DHT.h>
#define DHTPIN 2
#define DHTTYPE DHT11
const char* ssid = "<YOURSSID>";
const char* password = "<YOURPASSWORD>";
String KEY = "<YOUTTHINGSPEAKKEY>";
@whatnick
whatnick / Energy_Monitor_Real.ino
Last active October 1, 2022 20:10
ESP8266 Energy Monitor Real Power
/*
* This sketch sends ads1115 current sensor data via HTTP POST request to thingspeak server.
* It needs the following libraries to work (besides the esp8266 standard libraries supplied with the IDE):
*
* - https://github.com/adafruit/Adafruit_ADS1X15
*
* designed to run directly on esp8266-01 module, to where it can be uploaded using this marvelous piece of software:
*
* https://github.com/esp8266/Arduino
*
@magsol
magsol / aws-dash.md
Last active January 29, 2019 08:47
Attempts to get the Amazon Dash button working with Hue lights.
@Grayda
Grayda / kepler.md
Last active June 11, 2019 13:20
Information about the Orvibo Kepler

These are some rough notes regarding the Orvibo Kepler

The Kepler uses a different protocol to the previous devices (S20, AllOne etc.), but once you get past the changes in protocol, the commands are very much the same.

The Kepler uses UDP on port 9999. The header of the packet is the same (e.g. 646400 ..., but the body is now encrypted JSON. The encryption is AES ECB and the decryption key is stored in the app. Simply decompile the app and look in com\orvibo\lib\kepler\core\AESCoder.java. Use something like http://aes.online-domain-tools.com/ to quickly decrypt and check data. The start of the encrypted data is denoted by 0x09 and runs right to the end of the packet (?).

As mentioned above, the protocol is rather similar to the other devices. Here's a sample packet from the Kepler app, showing discovery:

6864004a706be1d7b623202020202020202020202020202020202020202020202020202020202020202009411a140e9dc338948829f770b2e65d3f9c5e7eedfcb9e552aff1a74e7c6ca6

@yosemitebandit
yosemitebandit / pwm_stepper_control.ino
Last active November 23, 2023 19:00
controlling a stepper motor with PWM
/* Teensy LC sketch for controlling a stepper motor.
Reads comma-separate commands over serial. Sends back number of steps taken.
Commands are of the form:
step,300,800 -> stepper should move 300 sixteenth-steps forward at 800 steps per second
step,-124,100 -> stepper should move 124 sixteenth-steps backward at 100 steps per second
*/
@anoochit
anoochit / mqtt-telegraf.conf
Created January 24, 2017 10:32
mqtt-telegraf.conf
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
#
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.
@Grayda
Grayda / getKey.sh
Last active June 11, 2019 13:23
Extract the Kepler key
# This downloads kepler.apk from orvibo.com and uses strings and grep with regex to find the line that contains the key.
echo Downloading the Kepler APK from www.orvibo.com..
wget http://www.orvibo.com/software/android/kepler.apk -qO /tmp/kepler.apk
echo Download complete. Extracting and searching for the key. The key should be displayed below.
echo
unzip -p /tmp/kepler.apk classes.dex | strings | grep -e '^[A-Za-n1-9]\{16\}$'
echo
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active June 24, 2024 19:44
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@xxlukas42
xxlukas42 / philips_hue_ir.ino
Created April 14, 2019 09:28
ESP32 and ESP8266 communication with Philips Hue bridge
/*************************************************************
Hue @ D1 mini Pro (ESP8266)
Basic demo of switch based on IR sensor to demonstrate
communication between ESP and Hue gateway
Version: 1.00
by Petr Lukas
Functionality:
Identify IR signal and switch light on and off using IR remote control.
*************************************************************/
@urish
urish / circuitpython-mouse-hid-hello.py
Last active June 12, 2024 17:16
Open "MSPaint", set the foreground color to black, background color to red, and then run this script. Enjoy!
import time
import board
import digitalio
from adafruit_hid.mouse import Mouse
print("Hello!")
led = digitalio.DigitalInOut(board.LED1)
led.direction = digitalio.Direction.OUTPUT
led.value = False