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.
* 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>
* 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>
* 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>
* Update ESP32 BLE ADV parse to match BLE spec
* Update xiaomi
* Update ruuvi
* Format
* Update esp32_ble_tracker.cpp
* Fix log
* Format
* Update xiaomi_ble.cpp
* 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>
* 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
* 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>
* 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.
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.
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.