Commit graph

7611 commits

Author SHA1 Message Date
Otto Winter
706dc6d116
Fix MQTT logs Int or String expected Python 3 (#898)
Fixes https://github.com/esphome/issues/issues/850
2020-06-05 12:52:04 +02:00
Guillermo Ruffino
84accb6df6
fix climate_ir on receive optional (#897)
* fix climate on receive optional

* add climate tests
2020-06-05 12:52:04 +02:00
warpzone
8421570b18
fix the problem of missing part of advertising packet when activ… (#868)
* fix the problem of missing part of advertising packet when active scan is enabled.

* fix for ci-suggest-changes
2020-06-05 12:52:04 +02:00
Otto Winter
d355543ac9
Merge branch '1.14.4' 2020-06-05 12:42:56 +02:00
Otto Winter
3a597c5aa6
Fix gitignore intellij idea 2020-06-05 12:38:05 +02:00
Otto Winter
c7dddaded4
Upgrade docker base image to 2.1.1 2020-06-05 12:28:37 +02:00
Otto Winter
aae4b2ea5d
Upgrade docker base image to 2.1.0 2020-06-05 12:27:26 +02:00
Otto Winter
310e2a0b20
Fix build 2020-06-05 12:25:29 +02:00
Niklas Wagner
0b04d143ac
Upgrade dependencies 2020-06-05 12:00:20 +02: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
Guillermo Ruffino
9e7e8ab116 format 2020-05-24 23:45:15 -03:00
Guillermo Ruffino
1bec1faf6d lint 2020-05-24 23:27: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
Andrew Zaborowski
a62b6548d2 Make some Action methods protected
Apparently play()/stop() etc. are not meant to be called directly by
users of the class and if they're called directly that would not give
the expected result for the classes that have an empty play().

Make all methods except play_complex, stop_comples and is_running
protected.  While there also make RemoteTransmitterActionBase::encode
protected.
2020-05-01 12:44:30 +02:00
Andrew Zaborowski
da390d32f8 Move stop/is_running implementation to Action base class
Try to fix issue #1105.  Until now if an UpdateComponentAction, a
LambdaAction, or any action that can contain those inside their
"else" or "then" action lists, resulted in a call to script.stop on
the script that contains them, the script would continue running,
because they didn't implement a stop() method.  Basically only
the asynchronous ones did: DelayAction, WaitUntilAction and
ScriptWaitAction.

With this change num_running_ in Action replaces
DelayAction::num_running_ and WaitUntilAction::triggered_ to provide
the same is_running logic to other actions.
2020-05-01 12:44:30 +02: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
C W
a2a83c5004
Fix missing yield in uart causing watchdog timer resets in esp32 when blocking waiting on serial responses. (#1016) 2020-04-28 12:22:33 -03:00
puuu
ba1222eae4
Bluetooth advertising automation (#995)
* esp32_ble_tracker: introduce UUID comparison function

* ble_presence, ble_rssi: use new UUID comparison function

* esp32_ble_tracker: introduce automation on BLE advertising

* test2.yaml: remove deep_sleep due to firmware size restrictions
2020-04-27 20:57:02 -03:00
Guillermo Ruffino
31ae337931
add lights on off triggers (#1037)
* add lights on off triggers

* add test
2020-04-25 15:39:34 -03:00
ukewea
bab0ba9c0f
Change buffer sending process for waveshare_epaper (2.70in) (#1031)
* Change buffer sending process for waveshare_epaper (2.70in)

The current way ESPhome sending buffer to WaveshareEPaper2P7In does not show the expected content on the display, this commit is changing the data transferring process so the content is showing as expected.

The process is adapted from the demo code provided by Waveshare, manufacturer of the E-paper display.

* Fix linting eror
2020-04-25 11:00:52 -03:00
Derek Hageman
c9e224e999
SHTC3: Wake up the sensor during setup (#993)
Since we put the sensor to sleep when not measuring, make sure to wake
it up during setup.  It does not respond to any other I2C commands
(including reset) while asleep, so if we've done a soft reboot while
it was sleeping then setup() would fail since it wouldn't respond to
anything.
2020-04-24 22:10:41 -03:00
Guillermo Ruffino
6123cb7c69
add mac address to wifi info (#1030)
* add mac address to wifi info

* add test

* lint
2020-04-24 20:58:32 -03:00
Guillermo Ruffino
8040e3cf95
Climate whirlpool (#1029)
* wip

* transmitter ready

* climate.whirlpool receiver implemented (#971)

* receiver implemented

* Support for two models of temp ranges

* temperature type and lint

* more lint

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>

* add test

* not mess line endings

Co-authored-by: mmanza <40872469+mmanza@users.noreply.github.com>
2020-04-21 22:53:14 -03:00
Tim Savage
d447548893
Tests for CPP Code generation and some Python3 improvements (#961)
* Basic pytest configuration

* Added unit_test script that triggers pytest

* Changed "fixtures" to fixture_path

This is consistent with pytest's tmp_path

* Initial unit tests for esphome.helpers

* Disabled coverage reporting for esphome/components.

Focus initial unittest efforts on the core code.

* Migrated some ip_address to hypothesis

* Added a hypothesis MAC address strategy

* Initial tests for core

* Added hypothesis to requirements

* Added tests for core classes

TestTimePeriod
Lambda
ID
DocumentLocation
DocumentRange
Define
Library

* Updated test config so package root is discovered

* Setup fixtures and inital tests for pins

* Added tests for validate GPIO

* Added tests for pin type

* Added initial config_validation tests

* Added more tests for config_validation

* Added comparison unit tests

* Added repr to core.TimePeriod. Simplified identifying faults in tests

* Fixed inverted gt/lt tests

* Some tests for Espcore

* Updated syntax for Python3

* Removed usage of kwarg that isn't required

* Started writing test cases

* Started writing test cases for cpp_generator

* Additional docs and more Python3 releated improvements

* More test cases for cpp_generator.

* Fixed linter errors

* Add codegen tests to ensure file API remains stable

* Add test cases for cpp_helpers
2020-04-19 21:05:58 -03:00
puuu
269812e781
Daikin climate receiver support (#1001)
* climate.daikin: implement remote receive

* climate.daikin: fix temperature value in special modes

* climate.daikin: tweak timing to fit better to ir-remote signal
2020-04-16 18:58:42 -03:00
puuu
65f4d30fd0
Daikin climate receiver support (#1001)
* climate.daikin: implement remote receive

* climate.daikin: fix temperature value in special modes

* climate.daikin: tweak timing to fit better to ir-remote signal
2020-04-16 18:57:58 -03:00
Alex Reid
c1dfed5c08
feat: Add support for MCP23016 IO Expander (#1012)
* feat: Add support for MCP23016 IO extander

* fix: Fix style
2020-04-12 16:07:10 -03:00
Otto Winter
835079ad43
Add AC Dimmer support (#880)
* Add AC Dimmer support

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

* fixes

basically missed the output pin setup and in the switching was switching true true true :P

* Format

* Enable ESP32

* Also setup ZC pin

* Support multiple dimmers sharing ZC pin

* Fix ESP32

* Lint

* off gate on zc detect

* tests pins validation

* Climate Mitsubishi (#725)

* add climate

* Mitsubishi updates

* refactor mitsubishi to use climate_ir

* lint

* fix: only decode when not str already (#923)

Signed-off-by: wilmardo <info@wilmardenouden.nl>

* fix climate-ir bad merge (#935)

* fix climate-ir bad merge

* add mitshubishi test

* http_request: fix memory allocation (#916)

* http_request version fix (#917)

* PID Climate (#885)

* PID Climate

* Add sensor for debugging PID output value

* Add dump_config, use percent

* Add more observable values

* Update

* Set target temperature

* Add autotuner

* Add algorithm explanation

* Add autotuner action, update controller

* Add simulator

* Format

* Change defaults

* Updates

* Use b''.decode() instead of str(b'') (#941)

Handling of request arguments in WizardRequestHandler is not decoding
bytes and rather just doing a str conversion resulting in a value of
"b''" being supplied to the wizard code.

* Adding the espressif 2.6.3 (#944)

* extract and use current version of python 3 (#938)

* Inverted output in neopixelbus (#895)

* Added inverted output

* Added support for inverted output in neopixelbus

* Update esphome/components/neopixelbus/light.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update light.py

* corrected lint errors

Co-authored-by: Otto Winter <otto@otto-winter.com>

* Added degree symbol for MAX7219 7-segment display. (#764)

The ascii char to use it is "~" (0x7E).

Disclaimer: I didn't test this yet.

* Fix dump/tx of 64 bit codes (#940)

* Fix dump/tx of 64 bit codes

* fixed source format

* Update hdc1080.cpp (#887)

* Update hdc1080.cpp

increase waittime, to fix reading errors

* Fix: Update HDC1080.cpp

i fixed the my change on write_bytes

* add tcl112 support for dry, fan and swing (#939)

* Fix SGP30 incorrect baseline reading/writing (#936)

* Split the SGP30 baseline into 2 values

- According to the SGP30 datasheet, each eCO2 and TVOC baseline is a 2-byte value (MSB first)
- The current implementation ignores the MSB of each of the value
- Update the schema to allow 2 different baseline values (optional, but both need to be specified for the baseline to apply)

* Make both eCO2 and TVOC required if the optional baseline is defined

* Make dump_config() looks better

* Add register_*_effect to allow registering custom effects (#947)

This allows to register custom effect from user components,
allowing for bigger composability of source.

* Bugfix/normalize core comparisons (and Python 3 update fixes) (#952)

* Correct implementation of comparisons to be Pythonic

If a comparison cannot be made return NotImplemented, this allows the
Python interpreter to try other comparisons (eg __ieq__) and either
return False (in the case of __eq__) or raise a TypeError
exception (eg in the case of __lt__).

* Python 3 updates

* Add a more helpful message in exception if platform is not defined

* Added a basic pre-commit check

* Add transmit pioneer (#922)

* Added pioneer_protocol to support transmit_pioneer

* Display tm1637 (#946)

* add TM1637 support

* Support a further variant of Xiaomi CGG1 (#930)

* Daikin climate ir component (#964)

* Daikin ARC43XXX IR remote controller support

* Format and lint fixes

* Check temperature values against allowed min/max

* fix tm1637 missing __init__.py (#975)

* Add AC Dimmer support

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

* fixes

basically missed the output pin setup and in the switching was switching true true true :P

* Format

* Enable ESP32

* Also setup ZC pin

* Support multiple dimmers sharing ZC pin

* Fix ESP32

* Lint

* off gate on zc detect

* tests pins validation

* fix esp8266 many dimmers, changed timing

* Increased value resolution, added min power

* use min_power from base class

* fix min_power. add init with half cycle

* added method for trailing pulse, trailing and leading

* fix method name. try filter invalid falling pulse

* renamed to ac_dimmer

* fix ESP32 not configuring zero cross twice

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
Co-authored-by: Wilmar den Ouden <wilmardo@users.noreply.github.com>
Co-authored-by: Nikolay Vasilchuk <Anonym.tsk@gmail.com>
Co-authored-by: Tim Savage <tim@savage.company>
Co-authored-by: Vc <37367415+Valcob@users.noreply.github.com>
Co-authored-by: gitolicious <mrjchn@gmail.com>
Co-authored-by: voibit <krestean@gmail.com>
Co-authored-by: Luar Roji <cyberplant@users.noreply.github.com>
Co-authored-by: András Bíró <1202136+andrasbiro@users.noreply.github.com>
Co-authored-by: dmkif <dmkif@users.noreply.github.com>
Co-authored-by: Panuruj Khambanonda (PK) <pk@panurujk.com>
Co-authored-by: Kamil Trzciński <ayufan@ayufan.eu>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
Co-authored-by: Mario <4376789+mario-tux@users.noreply.github.com>
Co-authored-by: Héctor Giménez <hector.fwbz@gmail.com>
2020-04-10 00:07:18 -03:00