Giter VIP home page Giter VIP logo

open-home-automation's Introduction

Open Home Automation

THIS REPOSITORY IS NOT MAINTAINED ANYMORE, SEE ESPHome AS AN ALTERNATIVE.

Introduction

Nowadays everything becomes connected to the Internet and gives us a glimpse of many new possibilities. Home automation is part of it and offers many advantages for their users. This repository is dedicated to Home Assistant, an open source project with an amazing community, ESP8266 and ESP32 modules, the MQTT protocol and much more [...].

Home Assistant

Home Assistant is a home automation platform running on Python 3. The goal of Home Assistant is to be able to track and control all devices at home and offer a platform for automating control [Home-Assistant].

MQTT

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium [mqtt.org].

Home-Assistant

Content

Requirements

Most of the examples below are using the MQTT protocol and so require to integrate MQTT into Home Assistant by defining a MQTT broker. More information can be found at the MQTT component's page.

Stock Home Assistant

configuration.yaml :

mqtt:
  broker: 127.0.0.1
  port: 1883                      
  username: '[Redacted]'
  password: '[Redacted]'
  discovery: true                 # optional
  discovery_prefix: homeassistant # optional

Hass.io

configuration.yaml :

mqtt:
  broker: core-mosquitto
  username: '[Redacted]'
  password: '[Redacted]'
  discovery: true                 # optional
  discovery_prefix: homeassistant # optional

More options to connect the broker are available and described here.

Sketches for ESP8266/ESP32 modules

Lights, sensors, switches and more can be built on top of MQTT. This section contains a few examples based on MQTT and on a NodeMCU board (ESP8266/ESP32).

Title / link Description
Light A simple example to control a led
Light A simple example to control a led and its brightness
Light A simple example to control a RGB led
Light A simple example to control a RGB led (with OTA and mDNS)
Light An alternative firmware for the Arilux AL-LC0X LED controller
Light An alternative firmware for the Arilux AL-LC0X LED controller with multiple effects from the WS2812FX
Light A simple example to control a RGBW led, based on the MQTT JSON Light component (brightness, rgb, white, color temperature and effects) and including the MQTT Discovery
Light An alternative firmware for AI-Thinker RGBW bulbs, based on the MQTT JSON Light component and including the MQTT Discovery functionality
Switch A simple example to control a switch
Switch An alternative firmware for the Sonoff Basic switches
Switch An alternative firmware for the Sonoff TH switches, including the MQTT Discovery functionality
Sensor A simple example to measure the temperature and the humidity (DHT22 sensor)
Sensor A simple example to measure the brightness (photocell)
Binary Sensor A simple example to detect motions (PIR motion sensor)
Binary Sensor A simple example to monitor the state of a window/door
Binary Sensor A full example describing how to monitor your environment with different sensors (SHT3X, DHT22, TEMT6000, etc.)
Binary Sensor An example describing how to trigger an action when a specific BLE device is detected (ESP32)
Binary Sensor An example describing how to trigger an action when a specific NFC tag is detected

Configuration examples for Home Assistant

This section contains a few configuration examples dedicated to Home Assistant.

Title / link Description
Alarm Clock An example describing how to create an alarm clock with the components provided by HA
openhome A school project based on Home Assistant and using only open source HW and SW
Zigate & ZigBee devices An example describing how to add and control ZigBee devices paired to a Zigate

OpenHome with Home Assistant and MQTT

Miscelleneous

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

If you like the content of this repo, please add a star! Thank you!

open-home-automation's People

Contributors

landrash avatar maxr1998 avatar smrtnt avatar syssi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-home-automation's Issues

Great Job...You Made my new year

Thank You Very Much for all your sources. I was looking this stuff all over internet but did not get this kind.

I need one help if you have time.

I'm using you sonoff.ino where we can manage one relay is there way we can add few more relay? cause I'm using this for something else where I have 8ch relay so want to add that on it. with web configuration with mitt port, server, and topic for each 8relay?

Sorry, me again with another question

After getting your assistance with the upload to my NodeMCU, I am very appreciative.

However, it seems I'm not getting any output to my MQTT broker from the setup. The only difference between mine and yours is I'm using a DHT11 sensor not a DHT22.

Other then the one place you directly mention it (and which I amended it to 11 from 22) is there anything else I might need to change to make this work or do you think I might have issues with the DB or sensor themselves.

Jonathan

Controlling 4 lights

how can i control many lights using mqtt light.ino file, ive tried many ways of modifying the code but it didnt work... please help me to fix..

7 bytes NFC tag problem

I run the whole time against the problem that my 7 bytes NFC tags are not recognized, I do not know better than that I have correctly noted the UID in the config file.

problem I have with all my mifare ultralight tags

How you do it that nodemcu (esp8266) appears on homekit with HA?

Hi,

First of all thanks, about this so detail manual about how to begin from 0 to install and configuring all in raspberry pi.

After reading and watching video, i have a doubt about the nodemcu and how you put in homekit, because in my case i also have few nodemcus on my network, but well i intall on configure homebridge for home assistant, my nodemcu not apprears on homekit.

How did you configure this nodemcu on HA? like sensors? like binary sensor? and only you installed homebridge-home-assistant package? and after all then appeared automatically on homekit?

I think, that also is possible to do it with sonoff or wemos (both are esp8266), really?

thanks

Feature request

couldn't find an alternative way to contact you.

Love all your examples. I was wondering if there was a way to add more LEDs to the same file? I have tried altering your files but to no avail

any help you can give would be appreciated
thanks
Sam

DHT22 MQTT

Hi,

i flashed your Sketch, and it seems to work.

After my setup in Home Assistant, humidity keeps saying unknow.

Heres the Output from the IDE-Serial Monitor:

.........
INFO: WiFi connected
INFO: IP address: 
192.168.0.59
INFO: Attempting MQTT connection...INFO: connected
{
  "temperature": "22.80",
  "humidity": "34.10"
}
INFO: Closing the MQTT connection
INFO: Closing the Wifi connection

Temperature works fine.

Thanks for help

BR

Lukas

How to change RESET Pin?

Hello! Thank you for your work! Could you ask me, how to change D0 pin to other?
D0/GPIO16 - RST (wake-up purpose)
I cant find in sketch...

Are you help me with project ha_mqtt_light please

Thanks a lot for such great Open-Home-Automation projects. But I ran into such a problem: I have 4 motion sensors from which the signal comes to Home Assistant and after creating automation with Home Assistant they control one ESP8266 module and from this module to 4 relays. Those. 1 motion sensor controls one relay, but there are 4 relays on one ESP8266 module. I'm still just learning. Thank you very much for your understanding and help.

Help: binary sensor door/button VS multi sensor door/button

Hello,

i just switched over from using the binary sensor door (ha_mqtt_binary_sensor_door) over to use the multisensor (ha_mqtt_multisensor) for the same propose plus more (pir sensor)

I found some difference:

magnet/reed/door sensor with the same wiring (d1 and ground) results:

  • binary sensor: works like a charm
  • multi sensor: also works but open/closed is now vice versa?

button with same wiring (wemos button shield on d3 and ground) without any resistor:

  • binary sensor: button press forces reboot of the esp board
  • multi sensor: works like a charm here

And the pir/motion sensor on the multi sensor sketch also works like a charm.

Beside that I like the "online" state information from the multi sensor! Very nice feature!

Would be awesome to "tune" the multisensor sketch that it's possible to use more/different types of sensor. For example:

  • light sensor TEMT6000 #31
  • temperature DS18B20 #34
  • temperature and humidity SHT30 #32
  • temperature, humidity and pressure BME280 #33
  • and maybe even an actor like a RGB LED #30

Any idea how I can correct my open/closed problem with the my door sensor? Thank's!

Help with ha_mqtt_sensor_dht22

Hi,

I managed to run your script dht22 with success, however, im confused with the following line:

ESP.deepSleep(SLEEPING_TIME_IN_SECONDS * 1000000, WAKE_RF_DEFAULT);

Sorry if this is a dumb question but how many time i will sleep before running all over again? I see you define a default value of 600 seconds as sleeping time, so the final time ESP will sleep it is really 600 (seconds) *(times) 1000000 (hardcoded value) = 600000000 (seconds)?

NFC scanner question

I see in your table that you have not appointed the IRQ and RSTO, from the PN532. But on your photo I see that you have connected to (presumed) D3 and D4.

How is this exactly?

Multiple tags error

Hi

First i want to say , that im new to this , so please be patient with me :)

I want to make a nfc scanner and have bought :
PN532 NFC RFID (Elechouse module v3)
ESP8266 (NodeMCU v3.0)
https://www.ebay.com/itm/NodeMcu-Lua-WIFI-Internet-Things-development-board-based-ESP8266-CP2102-module/201542946669?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

and have printed the case in 3D.

Soo my issue is that i have 3 tags i want to play aroung with :
#define NUM_ACCEPTED_UIDS 3 //<-----------------CHANGE THIS IF ADDING CARDS!!
NFCTag NFCTags[NUM_ACCEPTED_UIDS] = {
// It is neccessary to account for UID length since a 7 byte ID could contain a 4 byte ID, which would cause a misfire
// #0 #1 #2 #3 #4 #5 #6 #Tagname
// {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, "Tag1", false, 0, false, {0}},
{{0xA, 0xE0, 0x39, 0x16}, "ChipO", false, 0, false, {0}},
{{0xAB, 0x55, 0xE, 0x1C}, "CardO", false, 0, false, {0}},
{{0x4, 0x4A, 0xCD, 0xB2, 0x2F, 0x66, 0x81}, "TAGO", false, 0, false, {0}},
};

BUT it seems no matter what i do , its only the first one that will be recognise?
any idea why?

thanks in advise

Can't compile the newest version from multisensor

I'm using Arduino 1.8.2

and get the following output (did already a second git clone and a manual grab just to be sure no files were corrupted over the air)

Error text is the following one (files untouched just renamed the example to config.h)

In file included from sketch/MultiSensor.h:5:0,
                 from sketch/MultiSensor.cpp:2:
sketch/MultiSensor.cpp: In member function 'void MultiSensor::init()':
sketch/config.h:5:41: error: 'D3' was not declared in this scope
 #define DOOR_SENSOR                     D3
                                         ^
sketch/MultiSensor.cpp:55:11: note: in expansion of macro 'DOOR_SENSOR'
   pinMode(DOOR_SENSOR, INPUT_PULLUP);
           ^
sketch/config.h:16:44: error: 'D7' was not declared in this scope
 #define MOTION_SENSOR_PIN                  D7
                                            ^
sketch/MultiSensor.cpp:60:11: note: in expansion of macro 'MOTION_SENSOR_PIN'
   pinMode(MOTION_SENSOR_PIN, INPUT_PULLUP);
           ^
sketch/config.h:56:39: error: 'D2' was not declared in this scope
 #define SHT_SCL_PIN                   D2
                                       ^
sketch/MultiSensor.cpp:75:14: note: in expansion of macro 'SHT_SCL_PIN'
   Wire.begin(SHT_SCL_PIN, SHT_SDA_PIN);
              ^
sketch/config.h:60:41: error: 'D1' was not declared in this scope
 #define BUTTON_SENSOR                   D1
                                         ^
sketch/MultiSensor.cpp:82:11: note: in expansion of macro 'BUTTON_SENSOR'
   pinMode(BUTTON_SENSOR, INPUT);
           ^
sketch/MultiSensor.cpp: In member function 'void MultiSensor::handleEvt()':
sketch/config.h:16:44: error: 'D7' was not declared in this scope
 #define MOTION_SENSOR_PIN                  D7
                                            ^
sketch/MultiSensor.cpp:102:23: note: in expansion of macro 'MOTION_SENSOR_PIN'
       if (digitalRead(MOTION_SENSOR_PIN) != this->_motionState) {
                       ^
sketch/MultiSensor.cpp: In member function 'bool MultiSensor::_readDoorState()':
sketch/config.h:5:41: error: 'D3' was not declared in this scope
 #define DOOR_SENSOR                     D3
                                         ^
sketch/MultiSensor.cpp:223:22: note: in expansion of macro 'DOOR_SENSOR'
   return digitalRead(DOOR_SENSOR);
                      ^
exit status 1

An older version worked with my setup out of the box?

Help with ha_mqtt_binary_sensor_ble_scanner

First I would like to thank you for this sketch, just what I been looking for.

  1. Can you help me understand how to use "MAX_NON_ADV_PERIOD"?
    (Edit.: I think I understand it but anything over 5000 (5 secs) doesn't seem to work.)
  2. How best to implement a feature to only publish to mqtt when (RSSI() > -##)?
    "##" being any number enter by the user, like (65,75, or 80). This way I can kinda limit the area it can see
    the ble device.
    I have no Arduino sketching experience, so I wouldn't dare mess with a sketch that was written so beautifully. So your help would be much appreciated. Thanks in advanced

Multiple lights on same board

I wish to control multiple lights on the same board. Could someone give me an example of the edits for this sketch (mostly how to set topics for publish and subscribe). I am very new to mqtt and hassio so any help would be greatly appreciated. I was able to get this example working for the single control and have tried to edit sketch for two lights. Thanks in advance..

PIR help

Hi Sam,
as always i still love what you've done. it basically all runs my house. i was wondering whether you could point me in the right direction with altering the PIR file?

  1. House alarms do the opposite of the pir sensors you have made the code for. house alarms are normally closed going open on movement so it actually breaks the 5v instead of sending 5v. how would i accommodate this in the .ino file?
  2. How can i scale up the file? simply duplicating everything and allocating a number to it i.e. pirstate1 pirstate2 etc doesnt work. im assuming because of the loop. could you advise me how to go about doing this?

any little bit of help would be greatly appreciated
Thanks,
Sam

going GREEN

hey first nice code
my problem is as soon as I switch on from my Home assistant the led is normal an after 3 sec. it turn green (also disconecting from the pc) somtimes I can turn it on and of but after a smale time it is Green again

LG Simon

Can the brightness be increased from 255 to 1023?

I have your sketch running to power some white led strips. When I plug them directly in the power source they are much brighter then when they run through the PWM of the NodeMCU.

I found here that the brightness level should be adjusted from 255 to 1023 for the ESP8266. Read about it in his Update here:
https://eryk.io/2015/10/esp8266-based-wifi-rgb-controller-h801/

Can you tell me if that is possible with this Sketch. I tried but it does not work.

Arduino ethernet

I new in arduino world. It's possible to change yours lib/programs from ESP8266 to Arduino with ethernet shield ? I'm very interested update the firmware over-the-air.

Issues with uploading sketch for ha_mqtt_sensor_dht22.ino

This is my first go at using MQTT in HA and trying to upload the sketch to the ESP8266 so please be understanding of my ignorance.

Made the minor adjustments to your ino file for my wifi network and MQTT details. Plus the topic name and the sketch verifies perfectly.

When I hook up the NodeMCU board to the pc to upload I get a rather long error file (below). Any advice would be greatly appreciated.

Arduino: 1.8.4 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 1M (144K SPIFFS), ck, Disabled, None"

Archiving built core (caching) in: C:\Users\ADMINI1.ASU\AppData\Local\Temp\arduino_cache_134493\core\core_esp8266_esp8266_generic_CpuFrequency_80,FlashFreq_40,FlashMode_dio,UploadSpeed_115200,FlashSize_1M144,ResetMethod_ck,Debug_Disabled,DebugLevel_None_____7246470ddf479558ce5125d1daf92f35.a
Sketch uses 240089 bytes (27%) of program storage space. Maximum is 876528 bytes.
Global variables use 33296 bytes (40%) of dynamic memory, leaving 48624 bytes for local variables. Maximum is 81920 bytes.
C:\Users\Administrator.ASU-HP7900-DS\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.9/esptool.exe -vv -cd ck -cb 115200 -cp COM3 -ca 0x00000 -cf C:\Users\ADMINI
1.ASU\AppData\Local\Temp\arduino_build_821035/sketch_sep07a.ino.bin
esptool v0.4.9 - (c) 2014 Ch. Klippel [email protected]
setting board to ck
setting baudrate from 115200 to 115200
setting port from COM1 to COM3
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2013 bytes of data
read 0, requested 1
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

PIR sensor with battery power

Love the PIR setup. I got mine up and running without a hitch in under 5 minutes. Thanks for the sketch (as well as all the others).

I'm trying to position this one in a place I cannot easily access mains power or the sensor itself for obvious reasons. Tried running it through a powerbank but only got 3 days before that went flat. It's in a high traffic area for my family's normal day to day movements.

Any suggestions on how to either reduce power consumption or extend battery life?

Conversely, is there a way HA could tell the sensor, through MQTT, when to be actively working or not?

Cheers,
Jonathan

Great examples…one issue though

I'm finding these examples very helpful. However, I did run into one issue that I believe I solved.

In the setup() {} function I believe you need to include WiFi.mode(WIFI_STA) to prevent the ESP from broadcasting an SSID. I believe this was causing my 2.4 GHz network from having poor performance.

For example:

void setup() {
...
WiFi.mode(WIFI_STA);
...
}

Problem flashing Arilux with ESP8285

I tried flashing an Arilux led controller with this firmware and it set the wifi ssid and pwd in the config.h, but it does not connect to my wifi. The flashing completed without any problems. There is an ESP8285 on my controller instead of an ESP8266, can that have anything to do with it not connecting?

Also are there any certain versions of the libraries i should use or just use the newest available?

Support for inexpensive (US$ 0.5) radar sensor RCWL 0516

Hello everybody!

Would be awesome if the radar sensor RCWL 0516 could be supported. It can detect human bodies in 360° within 5 meters. It can also sense thru thin walls, plastic, wood etc. It's a nice motion sensor but cheaper and more capable.

Looking forward to test it 👍

Problem with brightness

I believe line 95 should read:

uint8_t brightness = map(m_rgb_brightness, 0, 100, 0, 255);

i.e. the 1023 should be 255. I correct this and it made the brightness function correctly.

Many thanks for a great project.

Matt.

esp8266 LED not working

Hi
I am new on github and with home assistant. I was trying your led example. I was not able to turn on led with the provided code. Esp8266 is working properly i checked serial monitor wifi and mqtt connection was successful. Just to ensure my esp8266 works properly i have tried some other examples from github with dht22 sensor that was successful.
I have checked mqtt log file in raspberry pi. I can see successful connections with esp6288.
Adding to that when i turn on led button from home-assistant screen it turns off by itself after 1 sec.
Am i missing something ?
Thanks

Flashing Effect

Hey mertenats,

Is it possible to make this code present the "Flashing" effect in HomeAssistant?
I saw somewhere that off-the-shelf rgb lights that are connected to HomeAssistant can show "Effects" drop-down menu where you can choose effects like Flash, Fader, etc. and I was thinking if it could be possible to do something like that with your code and ESP8266? I'm inexperienced with Arduino/ESP8266 programming, but I'd be willing to help you as much as I possibly can to make this happen.

P.S. I've been using those shitty IR remote RGB LED controllers from eBay. I then discovered your code and decided to get a few ESP8266s and upload your code to it. God damn if this isn't the best thing ever. Thank you so much for this, seriously.

ha_mqtt_sensor_dht22.ino ArduinoJson 5 to ArduinoJson 6 upgrade

compiling ha_mqtt_sensor_dht22.ino lately gives an error saying the code needs to be migrated from ArduinoJson 5 to ArduinoJson 6.

the following link to a website is given, and i could solve the topic by watching just the video at second example given, see https://arduinojson.org/v6/doc/upgrade/
In short:

  • change 'StaticJsonBuffer' to 'StaticJsonDocument' to become > StaticJsonDocument<200> doc;
  • remove line > JsonObject& root = jsonBuffer.createObject();
  • replace the 'root' object with 'doc' subsequently
  • replace root.prettyPrintTo(Serial); with serializeJsonPretty(doc, Serial);
  • replace root.printTo(data, root.measureLength() + 1); with serializeJson(doc, data);
    (this latest line i don't understand why the measureLenght paramter can be omitted, but seems to work)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.