Interfaces the AWS Dash button with the Hue lights.
#include <ESP8266WiFi.h> | |
#include <DHT.h> | |
#define DHTPIN 2 | |
#define DHTTYPE DHT11 | |
const char* ssid = "<YOURSSID>"; | |
const char* password = "<YOURPASSWORD>"; | |
String KEY = "<YOUTTHINGSPEAKKEY>"; |
/* | |
* 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 | |
* |
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
/* 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 | |
*/ |
# 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. |
# 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 |
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
Starts Youtube App
entity_id: media_player.shield
command: >-
/************************************************************* | |
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. | |
*************************************************************/ |
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 |