Commit Graph

1089 Commits

Author SHA1 Message Date
buxtronix
148f5d9418
ESP32: Conditionally log on services to avoid OOM crashes (#1098)
Also removed new line formatting tidy as it requires a bit of memory which might not be available.


* Use suitably scoped char for log newline stripping

* fix formatting

* Better fix for OOM logging crash

* Limit to ESP32 only

* format changes
2020-06-26 19:13:23 -03:00
square99
82d5d50d61
Add LG Climate IR (#1097)
* Add LG Climate ir

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

Co-authored-by: Sangheon Heo <square99@SangHeonui-Macmini.local>
2020-06-21 22:29:43 -03:00
Alex Mekkering
ecb1c77f8b
Add support for command-line substitutions (#1014)
* Add support for command-line substitutions

* Fix flake8

* pylint fixes
2020-06-21 15:33:01 -03:00
Samuel Sieb
f9a8629157
fix percentage handling (#1094)
* fix percentage handling

* add test

* fix lint errors

Co-authored-by: Samuel Sieb <samuel@sieb.net>
2020-06-19 20:59:19 -03:00
Gavin Mogan
e2b655a6cc
Add huzzah gpio pins (#1096) 2020-06-19 13:02:59 -03:00
Lukas Klass
04e6f475b4
Fix decode and encode for RC5-protocol (#1047)
* Fix receive and transmit for RC5-protocol

Receive did not work as a sequence of two high or low puleses are detected as one long pulse. Transmit was extended to respect the field bit in order to enable codes up to 127.

* Fix code formatting
2020-06-18 19:50:58 -03:00
Keith Burzinski
0082c5b459
Climate bang bang enhancements (#1061)
* Add fan support to bang bang controller

* Fix heat-only and cool-only modes

* Added support for all climate actions and modes

* Fix up some comments

* Fan_only mode behavior tweak

* Updated test

* Updated test, take 2

* Add accessor methods for easier use in lambadas

* Revert "Add accessor methods for easier use in lambadas"

This reverts commit f15713129cd5587242a08ad1e2ee37cbf075aa03.

Don't code late at night when sleepy.

* Fix single/dual setpoint support

* Linted

* Properly implement single-point, validation improvements

* Another quick fix...sigh

* Update tests

* Update tests, take 2

* Revert "Update tests, take 2"

This reverts commit 71bb7fccc53d95a7d221e80ea0a931fb3cfd9a0c.

Nope.

* Revert "Update tests"

This reverts commit 42044291efaaf09858f29ab27bbc3aa9e8b80ee9.

Nope 2.

* Updated/fixed tests

* Revert "Updated/fixed tests"

This reverts commit a1a5b1c7db9a240b9da668b6e48abe1dd7910777.

Taking a different approach.

* Revert "Another quick fix...sigh"

This reverts commit 6b1955724a2de3c2d1534ec206dd5794bbb5f568.

Taking a different approach.

* Revert "Properly implement single-point, validation improvements"

This reverts commit f5bfff099e1dc58edd3898da8655c147adde2301.

Taking a different approach.

* Single/dual set point fixes, full validation

* Fix test

* Fix restore-on-boot, clean up comments

* Decouple two-point/auto operation, more polish

* One last away mode tweak

* Added set point validation

* Clean up over-publishing, always call action after boot

* Add fan support to bang bang controller

* Fix heat-only and cool-only modes

* Added support for all climate actions and modes

* Fix up some comments

* Fan_only mode behavior tweak

* Updated test

* Updated test, take 2

* Add accessor methods for easier use in lambadas

* Revert "Add accessor methods for easier use in lambadas"

This reverts commit f15713129cd5587242a08ad1e2ee37cbf075aa03.

Don't code late at night when sleepy.

* Fix single/dual setpoint support

* Linted

* Properly implement single-point, validation improvements

* Another quick fix...sigh

* Update tests

* Update tests, take 2

* Revert "Update tests, take 2"

This reverts commit 71bb7fccc53d95a7d221e80ea0a931fb3cfd9a0c.

Nope.

* Revert "Update tests"

This reverts commit 42044291efaaf09858f29ab27bbc3aa9e8b80ee9.

Nope 2.

* Updated/fixed tests

* Revert "Updated/fixed tests"

This reverts commit a1a5b1c7db9a240b9da668b6e48abe1dd7910777.

Taking a different approach.

* Revert "Another quick fix...sigh"

This reverts commit 6b1955724a2de3c2d1534ec206dd5794bbb5f568.

Taking a different approach.

* Revert "Properly implement single-point, validation improvements"

This reverts commit f5bfff099e1dc58edd3898da8655c147adde2301.

Taking a different approach.

* Single/dual set point fixes, full validation

* Fix test

* Fix restore-on-boot, clean up comments

* Decouple two-point/auto operation, more polish

* One last away mode tweak

* Added set point validation

* Clean up over-publishing, always call action after boot

* Added refresh() function to allow easy on-device state refreshing
2020-06-17 20:16:42 -03:00
MasterTim17
3fd130869e
fix for ESP32 'Association Leave' (#1081) 2020-06-15 21:52:47 -03:00
korellas
d000440927
sgp30 baseline write bug (#1157) (#1078) 2020-06-15 00:41:17 -03:00
rnauber
4fb750de43
ADE7953: Fix dereferencing of a null pointer (#1086)
* ADE7953: Fix dereferencing of a null pointer

The ade7953 driver dereferences a null pointer, when not all of
its sensors are used. This gives an exception like:

Fatal exception:29 flag:2 (EXCEPTION) epc1:0x4020c241 epc2:0x00000000 epc3:0x00000000 excvaddr:0x00000018 depc:0x00000000

* Fix formatting

Co-authored-by: olg <x>
2020-06-15 00:37:15 -03:00
SenexCrenshaw
9632ac0e02
Add MCP3008 I/O Expander (#1057)
* Add MCP3008

* Fixed Travis build issues

* Travis Build Fix

* Fix Travis foramt issues

* Travis fixes

* Code review changes

* Fix bit shift. off by one and selecting wrong pin

* general fixes

* lint

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-14 22:42:46 -03:00
Jeff Rescignano
35078fd52f
Add API component to logging error message (#1062)
* Add API component to logging error message

* lint

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-14 22:41:02 -03:00
Jim Persson
0bb81e5b2d
Add support for controlling fan direction (#1051)
* Fix fan oscillation trait not being used

* Add fan direction support to SpeedFan

* Add fan direction to API

* Add fan direction support to BinaryFan

* Fix CI errors

* Fix python format

* Change some ordering to trigger CI

* Add test for the configuration
2020-06-14 16:54:31 -03:00
Christian Ferbar
35a2258f12
SenseAir: flush input buffer on read error (#1017)
* SenseAir: flush input buffer on read error

* SenseAir: flush input buffer on read error - fix typo

* SenseAir: flush input buffer on read error - fix formating

* SenseAir: flush input buffer on read error - fix formating2

* SenseAir: flush input buffer on read error - fix formating3

* SenseAir: flush input buffer on read error - fix formating4

* Update esphome/components/senseair/senseair.cpp

* Update esphome/components/senseair/senseair.cpp

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-13 20:26:41 -03:00
Niklas Wagner
b650704877
Update docker base image (#1093)
* Upgrade docker base image to 2.1.0

* Upgrade docker base image to 2.1.1

Co-authored-by: Otto Winter <otto@otto-winter.com>
2020-06-13 19:51:43 -03:00
Kamil Trzciński
0c0dec2534
Add WLED support (#1092)
A component to support [WLED](https://github.com/Aircoookie/WLED/wiki/UDP-Realtime-Control).
This allows to control addressable LEDs over WiFi/UDP, by pushing data right into LEDs.

The most useful to use [Prismatik](https://github.com/psieg/Lightpack) to create
an immersive effect on PC.

It supports all WLED protocols:
- WARLS
- DRGB
- DRGBW
- DNRGB
- WLED Notifier

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-12 20:50:09 -03:00
Kamil Trzciński
d1b051a6bd
Add Adalight support (#956)
A component to support [Adalight](https://learn.adafruit.com/adalight-diy-ambient-tv-lighting).
This allows to control addressable LEDs over UART, by pushing data right into LEDs.

The most useful to use [Prismatik](https://github.com/psieg/Lightpack) to create
an immersive effect on PC.

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-12 20:34:38 -03:00
Kamil Trzciński
27204aa53c
Add E1.31 support (#950)
This adds a `e131` component that allows
to register `e131` addressable light effect.

This uses an internal implementation that
is thread-safe instead of using external libraries.
2020-06-12 20:17:13 -03:00
Niklas Wagner
8aedac81a5
RGBWW/CCT Lights: Fix gamma_correct when using constant_brightness (#1043) 2020-06-12 15:17:46 -03:00
Evgeny
42007d03d4
AQI calculator for HM3301 (#1011)
* HM3301 AQI calculator

* remove logs

* fixed after lint

* fixed after lint

* fixed after lint

* check NP for AQI sensor

* validation for AQI sensor
2020-06-11 23:14:54 -03:00
igg
821c1a8bbd
making SPI CS optional (#988)
* making SPI CS optional

* CS pin should be declared as optional or required in CONFIG_SCHEMA

* changed SPI_DEVICE_SCHEMA to a function, like i2c

* added spi_device_schema() to pcd8544, lint fixes

* updated max31856 with new spi_device_schema()

* cleanup imports

Co-authored-by: Ilya Goldberg <iggie@mac.com>
2020-06-10 17:03:11 -03:00
Adriaan Peeters
bab562dc3a
Turn off PN532 RF field when not expecting a tag (#1046)
* Turn off PN532 RF field when not expecting a tag

Avoids interference with Wifi connectivity of nearby devices.

* Rename turn_off_rf_ method

* documented off command bytes

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-09 23:23:25 -03:00
Marvin Gaube
f63fd9696f
Add Webserver Prometheus support for sensor, binary sensor, fan, light, cover and switch (#1032) 2020-06-09 22:00:12 -03:00
Kamil Trzciński
cd7af19e7c
Extend uart: with rx_buffer_size: (#1006)
* Extend `uart:` with `rx_buffer_size:`

This allows to configure `rx_buffer_size:`
to efficiently receive big payloads over UART

* lint

* remove old default value

* add test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-09 21:22:06 -03:00
Ivan Shvedunov
64bd33a94e
Sort keys in dicts in output yaml for 'config' command (#1049)
Having different output each time due to random key order makes some
tasks harder (such as CI scripts).
2020-06-09 00:10:49 -03:00
rradar
d1f4c2ab57
BH1750 Measurement time (#997)
* BH1750 Measurement time

Fixes https://github.com/esphome/feature-requests/issues/148

* lint

* add test

Co-authored-by: Otto Winter <otto@otto-winter.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-28 23:10:34 -03:00
Adrian Cuzman
7e4d12f880
added energy reading for pzem004 (#1022) 2020-05-28 19:54:00 -03:00
igg
ecd65003d4
Added support for ssd1327 (#985)
Co-authored-by: Ilya Goldberg <iggie@mac.com>
2020-05-28 19:11:25 -03:00
gitolicious
fed37b48a1
Explicitly set language to English (#1073) 2020-05-26 19:47:35 -03:00
Alexander Pohl
3fba3a5e2e
Add support for additional Xiaomi BLE sensors (#1027) (#1027) 2020-05-26 19:33:28 -03:00
declanshanaghy
e64246f642
Adding support for MAX31856 Thermocouple Temperature Sensor (feature #700) (#1039) 2020-05-24 19:33:59 -03:00
0hax
fb2b7ade41
Uart improvments (#1024)
* uart: Add support for specifying the number of bits and parity.

ESP8266SwSerial doesn't really check parity but just read the parity bit
and ignore it when receiving data.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: support begin and end methods.

A component may need to reset uart buffer/status by using begin() and
end() methods. This is useful for example when a component needs to be
sure it is not reading garbage from previously received data over uart.
For end() methods with software serial, disabling interrupt is
currently impossible because of a bug in esp8266 Core:
https://github.com/esp8266/Arduino/issues/6049

Signed-off-by: 0hax <0hax@protonmail.com>

* esphal: add support for detaching an interrupt.

That's needed when a component needs to enable/disable interrupt on a
gpio.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use static const uint32_t instead of #define.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use an enum to handle parity.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: split between esp32 and esp8266.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: check_uart_settings for parity and number of data bits.

Signed-off-by: 0hax <0hax@protonmail.com>

* name param data_bits

* add new params to test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-24 18:59:07 -03:00
Oskar Napieraj
4de44a99eb
Add support for ESP32 DAC (#1071)
* Add support for ESP32 onboard DAC

* Newlines

* Tests
2020-05-24 00:06:55 -03:00
Chris Talkington
39fbf9c56f
expose mac address via discovery (#1038) 2020-05-23 22:53:15 -03:00
krahabb
021055f0b8
Added auto discovery and setup to Dallas Platform (#1028)
* Added auto discovery and setup to Dallas Platform

* Added auto discovery and setup to Dallas Platform

* Added auto discovery and setup to Dallas Platform

* Added auto discovery and setup to Dallas Platform

* Added auto discovery and setup to Dallas Platform
2020-05-23 21:52:29 -03:00
Niklas Wagner
c2e0ea97d8
Upgrade dependencies 2020-05-23 20:33:58 -03:00
Jozef Zuzelka
153aadadae
Ble scanner (#976)
* Added ble_scanner component

* ble_scanner: time.h changed to ctime

* ble_scanner: Test added.

* ble_scanner: fixed code formatting.

* Removed duplicate binary sensor tests from test2 and test3 to decrease memory requirements.

* Removed another duplicate test from test2.yaml and moved stepper test to yaml3.yaml to reduce memory requirements of test2.yaml.

* Reverted the last stepper test change

* Moved some sensor tests from test2.yaml to test3.yaml to save memory.

* Moved ruuvitag back to test2.yaml as it requires component esp32_ble_tracker.

* removed apds9960 as it is duplicated

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-19 21:13:50 -03:00
Jesse Hills
1319ff1129
Add lambda to devcontainer config (#1059) 2020-05-19 21:02:10 -03:00
Robin Smidsrød
7df72ddb96
dht: Fix sensor reading from DHT22 (#926)
* dht: Fix sensor reading from DHT22 (#239)

Looking at the datasheet for DHT22, it claims to need a delay of 18ms, not
800us. Change to use the same delay as DHT11. Tested working with NodeMCUv3
and DHT22 sensor with board with built-in resistor.

* dht: Add model DHT22_TYPE2 with 2ms delay instead of 0.8ms

The model DHT22_TYPE2 is exactly the same as DHT22, but uses a different
delay.

* dht: Fix bogus negative temperature reading on DHT22_TYPE2

The workaround for negative numbers associated with DHT22s can be skipped
on these sensors.
2020-05-18 20:24:13 -03:00
nepozs
1d9ce2afc5
Update tm1637.cpp (#1044)
* Update tm1637.cpp

Defined degree symbol.

* remove fixed array size

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-18 20:10:03 -03:00
Jim Persson
53986279d7
Fix fan oscillation trait not being used (#1048) 2020-05-18 19:14:20 -03:00
Jesse Hills
26d6738abb
Allow tm1637 to use pins from IO expanders (#1058)
* Allow tm1637 to use pins from IO expanders

* Add test for io expander pins
2020-05-18 19:13:29 -03:00
sredfern
7fa5cab8e3
Extending Support to 5.83in Waveshare eink B/W displays (#1009)
* Extending Support to 5.83in Waveshare eink B/W displays

* Fixed lint issues
2020-05-01 21:30:52 -03:00
buxtronix
4f2e2fa297
Some max7219 updates. (#1021)
* Some max7219 updates. Disable test mode on startup and allow dynamic brightness

* fix formatting
2020-05-01 20:05:09 -03:00
Team Super Panda
0473c4c79f
Update __init__.py (#1020) 2020-05-01 18:53:41 -03:00
Nikolay Vasilchuk
8b92456ded
http_request ESP32 insecure requests fix (#1041)
* Fixed #1175

* CI

Co-authored-by: Nikolay Vasilchuk <nikolay.vasilchuk@corp.mail.ru>
2020-04-30 23:05:11 -03:00
Guillermo Ruffino
14e9375262
test disable no delay (#1026)
* test disable no delay

* removed set_nodelay code
2020-04-30 23:00:57 -03:00
puuu
d49ee47018
esp32 remote: make RMT memory blocks configureable (#1002) 2020-04-30 22:59:51 -03:00
Jonathan Adams
af66753c1b
Dashboard Updates (#1025)
* Restructuring of static files directory

* Update jQuery to v3.5.0

* Update jQuery UI to v1.12.1

* Update jQuery Validate to v1.19.1

* Improve login page layout and color scheme

* Updated header & footer colour scheme & added ESPHome logo

* Restructuring of fonts directory

* Restructuring of fonts directory

* Corrected icon reference error

* Update node layout and styling

* Update Ace to v1.4.10

* JS file reorganisation

* Rewrite of LogModal class including refactorization of js & html

* Updated delete node function

* Rewrite of editor modal

* Update Materialize Stepper to v3.1.0

* Updates to the wizard modal

* Added wizard validators back in and removed comments

* Merge old stylesheet into new

* Linting errors

* Fixed dashboard layout issue when no nodes present

* Introduced dynamic 3 column layout for large screens

* Removed unnecessary code

* Update data attribute names

* Added loading indicator to editor

* Open validator websocket on document ready

* Automatically restart validator websocket if it closes

* Minor styling updates

* Improvements to on boarding process

* Node display filename and then path on hover

* Removing console.logs

* Minor styling revisions

* Added toast on begin

* Fix lint

Co-authored-by: Sergio Mayoral Martinez <sergiomayoralmartinez@gmail.com>
2020-04-29 10:04:05 -03:00
Niklas Wagner
39b35b79ba
Make initial run variable available to addressable_lambda (#1035)
* Make initial run variable available to addressable_lambda

* Fix linting

* Remove if clause
2020-04-28 19:24:06 -03:00