Creating a Home Assistant Web Scraper Sensor

Here is a demonstration of using lxml for scraping a website to extract essential HTML data and pass the data as sensor to Home Assistant. GitHub: debsahu/lxmlWebScraper Here is a demonstration of using lxml for scraping a website to extract essential HTML data and pass the data as sensor to Home Assistant. Overview Installing lxml If working in virtual environment, install lxml using pip $ pip3 install lxml If working on python installation installed globally...

December 1, 2018 · Debashish Sahu

Using ESP8266 to Call RESTful API From TheRide to Get Real-Time BUS Data

Here is a tutorial on how to call RESTful API on ESP8266 and process the data using ArduinoJSON. This data is visually represented in a NeoPixel ring for easy tracking of 3 buses approaching a certain stop. This code also sends MQTT messages with the received data. debsahu/RESTful-Ride Using ESP8266 to call RESTful API from http://TheRide.org to get real-time BUS data Features: Easy to read interface Fast and Responsive Portable, i....

October 27, 2018 · Debashish Sahu

Hacking an Automatic Trash Can to Listen to You

Idea To convert an automatic trash can into a smart one. Hardware Automatic Trash Can Wemos D1 mini (ESP8266) 2N2222 transistor Implementation Here we use an ESP8266 to tap into the pins and emulate a physical button press. The ESP8266 uses a code as described in https://github.com/debsahu/SmartTrashCan to emulate a Wemo Switch, which is detected by Alexa/Echo device as a switch. GitHub: debsahu/SmartTrashCan Dependencies Library Link Use Wemo Switch Emulator Library https://github....

October 22, 2018 · Debashish Sahu

Using Gestures to Control Lights on Home-Assistant

Getting one’s hands on APDS9960 is very easy, that can be used to detect hand gestures. Here we use this sensor to control lights on Home Assistant based on a gesture observed on sensor. Software Libraries used: HARestAPI GitHub: debsahu/HARestAPI APDS9960 GitHub: SteveQuinn1/SparkFun_APDS-9960_Sensor_Arduino_Library SSD1306 OLED I2C GitHub: ThingPulse/esp8266-oled-ssd1306

July 21, 2018 · Debashish Sahu

ESP32 Communicating With Xiaomi Flora Plant Sensor Using BLE

Using ESP32 to communicate with Xiaomi flora (miflora) plant sensor using BLE and posting the values on MQTT server. I also demonstrate the use of Home Assistant miflora sensor component. Change ESP32 Partition: https://desire.giesecke.tk/index.php/2018/04/20/change-partition-size-arduino-ide/ Home Assistant miflora sensor: https://www.home-assistant.io/components/sensor.miflora/ GitHub: sidddy/flora Archived code from https://github.com/sidddy/flora below config.h // array of different xiaomi flora MAC addresses char* FLORA_DEVICES[] = { "C4:7C:8D:67:11:11", "C4:7C:8D:67:22:22", "C4:7C:8D:67:33:33" }; // sleep between to runs in seconds #define SLEEP_DURATION 30 * 60 // emergency hibernate countdown in seconds #define EMERGENCY_HIBERNATE 3 * 60 // how often should the battery be read - in run count #define BATTERY_INTERVAL 6 // how often should a device be retried in a run when something fails #define RETRY 3 const char* WIFI_SSID = "ssid"; const char* WIFI_PASSWORD = "password"; // MQTT topic gets defined by "<MQTT_BASE_TOPIC>/<MAC_ADDRESS>/<property>" // where MAC_ADDRESS is one of the values from FLORA_DEVICES array // property is either temperature, moisture, conductivity, light or battery const char* MQTT_HOST = "10....

June 29, 2018 · Debashish Sahu

Image Recognition Using Movidius Neural Compute Stick on a RPi0W

Let’s build a security camera using Raspberry Pi Zero W and Movidius Neural Compute Stick to recognize a “person” on the video stream GitHub: debsahu/PiCamMovidius Set up NCSDK API Install required packages on Pi sudo apt-get install -y libusb-1.0-0-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev git automake byacc lsb-release cmake libgflags-dev libgoogle-glog-dev liblmdb-dev swig3.0 graphviz libxslt-dev libxml2-dev gfortran python3-dev python-pip python3-pip python3-setuptools python3-markdown python3-pillow python3-yaml python3-pygraphviz python3-h5py python3-nose python3-lxml python3-matplotlib python3-numpy python3-protobuf python3-dateutil python3-skimage python3-scipy python3-six python3-networkx python3-tk libboost-python-dev Clone NCSDK cd ~ git clone https://github....

May 27, 2018 · Debashish Sahu

MeshyMcLighting: NeoPixels Lighting Solution Using Mesh Network

Wouldn’t be cool for many McLighting (RGB LED lighting using NeoPixels) to talk to each other and synchronize? Here is my naive attempt at this, which requires McLighting to be served as stand-alone web-client. MeshyMcLighting What is this? Wouldn’t be cool for many McLighting to talk to each other and synchronize? Here is my naive attempt at this, which requires McLighting to be served as stand-alone webclient. Features Uses painlessMesh to create mesh network and broadcasts state to every node Does not need WiFi connection to internet, standalone mode + mesh Web interface is borrowed from “WS2812FX esp8266” example, completely served on ESP8266 Can do minimal file upload to SPIFFs Completely Async!...

May 16, 2018 · Debashish Sahu

Using RTL-SDR to Read Values From Wireless Electric/Gas/Water Meters

An attempt to use RTL-SDR to read values from wireless electric/gas/water meters and visualize these values on Home Assistant. Software Based on bemasher/RTLAMR Project: https://github.com/bemasher/rtlamr

May 5, 2018 · Debashish Sahu

HARestAPI: Control Home Assistant Directly Using ESP8266

Control components on Home Assistant directly from ESP8266. This is an Arduino Library that can be used in various projects without the requirement of setup of a MQTT sensor + automation on HA. This uses RESTful API commands. Idea Control components on Home Assistant directly from ESP8266. Implementation Develop an Arduino Library that can be used in various projects without the requirement of setup of a MQTT sensor + automation on HA....

April 14, 2018 · Debashish Sahu

ESP8266 Based Color Sensor Talking to Home Assistant via RestAPI

Did you ever want to use ESP8266 to communicate to Home Assistant directly? Here we use a TCS34725 color sensor to read colors and change a RGB light in Home Assistant to the color observed. Hardware TCS34725 color sensor SSD 1306 OLED Wemos D1 mini (ESP8266) Software RGB Lights connected to Home Assistant toblum/McLighting Aircoookie/WLED

April 7, 2018 · Debashish Sahu