Commit Graph

2613 Commits

Author SHA1 Message Date
Max Prokhorov
7fa05d1bf4 utils/heartbeat: fix hbReport=1 condition, add Bssid (#1995)
* hb: fix hbReport=1 condition, add Bssid

* type
2019-11-18 02:46:54 +03:00
Niek van der Maas
f588893373 Use generic typechecks, OTA add followRedirects (#1974)
* Use generic typechecks, OTA add followRedirects

* revamp using is_detected

* relative include

* mention ts draft instead, fix c++17 includes (still not buildable)

* typo

* Always create WiFiClient pointer

* Remove old CREATE_CHECK macro

* do not create wificlient obj when running old Core
2019-11-18 02:45:49 +03:00
Max Prokhorov
04c733353b relay: add WEB_SUPPORT check (#1985) 2019-11-10 07:04:27 +03:00
Max Prokhorov
849f8cf920 Rules RPN (#1984)
* RPN rules (WIP)

* RPN rules web interface, MQTT inputs

* Stickyness, rpn.ops,...

* Perform light updates only when value changes

* Improve wsSend performance

* Revert PR test

* Check TERMINAL_SUPPORT for _rpnInitCommands and remove unused variable

* Fix merge

* formatting

* disable by default (?)

* changelog

* comment

* remove debug function wrappers in favour of var activation

* fixup! comment
2019-11-10 07:01:50 +03:00
Max Prokhorov
99dcff334f Merge pull request #1969 from mcspr/ha/disc-queue
HA: discovery fixes
2019-11-09 04:31:40 +03:00
Max Prokhorov
c3678abba0 Relay: use relative time comparisons, runtime settings for flood window and delays (#1962)
* relay: respect relay delay time when using NONE_OR_ONE sync

* fixup! relay: respect relay delay time when using NONE_OR_ONE sync

* calculate delay from flood window + existing delay

* configure flood max changes too

* oops, s -> ms

* count other way around

* interpret delay differently with sync_one/none_or_one

* instead of accumulation, ensure that max delay time is selected (if it is there at all)

* global interlock delay setting, allow to set change_delay before relayStatus(id, status) changes it

* fixup! global interlock delay setting, allow to set change_delay before relayStatus(id, status) changes it

* (finally) use lock attr to avoid user changing state while target != current state

* fix building with 2.3.0

* postpone wspost after all relays are processed, remove change_start refresh, snapshot relaySync value in configure

* fix warning

* add another timer for ONE
2019-11-09 03:39:03 +03:00
Maxim Prokhorov
08cfcbd2c1 sensor/dht: wait DHT_MIN_INTERVAL after initialization 2019-11-09 03:28:50 +03:00
Maxim Prokhorov
e1ed62af37 sensor/dht: set pin mode before digitalWrite 2019-11-09 03:28:50 +03:00
Maxim Prokhorov
5ae0eb88ac sensor/dht: increase the delay per DHT22 datasheet
Operating specifications / Communication and signal

"Data-bus's free status is high voltage level. When communication
between MCU and DHT22 begin, program of MCU will transform data-bus's
voltage level from high to low level and this process must beyond at least
**1ms** to ensure DHT22 could detect MCU's signal, then MCU will wait 20-40us for
DHT22's response."
2019-11-09 03:28:50 +03:00
ealfaroc
cec6c6a385 Adding support for miobulb001 (#1973)
* Adding support for miobulb001

* Add miobulb001 images

* defined MUVIT_IO_MIOBULB001

* Update platformio.ini

revert default env
use dashes

* typo

* typo
2019-11-09 02:17:59 +03:00
Niek van der Maas
292ef5bac7 mqtt: Arduino-MQTT setWill parameters order (#1978)
The correct order of parameters is: topic, payload, retained, QoS
2019-11-09 02:00:51 +03:00
Niek van der Maas
05a1029bbd Fix out_of_range exception on bitset.test (#1977) 2019-11-09 01:51:52 +03:00
Max Prokhorov
c6f75f9160 Comments & README - 1.13.6 -> 1.14.0 (#1980)
* Update version in README.md

* Update comments regarding 1.13.6
2019-11-08 22:49:07 +03:00
Max Prokhorov
17b3620d9f 1.14.0-dev 2019-11-08 20:59:40 +03:00
Niek van der Maas
bad47d0195 Typo in thingspeak macro (#1965) 2019-11-06 14:39:34 +03:00
Max Prokhorov
01345987cd gpio: detect esp8285 chip to allow the use of GPIO9 and GPIO10 (#1964)
* gpio: detect esp8285 chip to allow the use of GPIO9 and GPIO10

* add another reference to the current rtos headers (but not used anywhere in the sdk code)

* fix typo in register order

* fixup! fix typo in register order
2019-11-06 14:36:39 +03:00
James
d177634a70 Telaire T6613 Support (#1956)
* Added T6613

* Added T6613

* Added T6613

* Added T6613

* Added T6613

* Added T6613

* Added T6613

* Added T6613

* Added T6613

* Updated copyright string

* Buffer from 6 bytes to 8 bytes

Current gcc-4 does not mark this as warning, but gcc-9 notices the 3 char size requirement. Buffer should be 8

* Use 5000ppm max
2019-11-06 14:32:58 +03:00
foxman69
4343457b9e Support restore last schedule (#1948)
* Added restore last schedule support

* Merged RestoreLastScheduleState function into the _schCheck function

* handle lights in restore action

* hide webui chbox when not using scheduler

* use settings instead of struct member, hide under ifdef scheduler_support

* relayLastSchedule uses SCHEDULER_RESTORE_LAST_SCHEDULE as default

* Changed all the variable names to be the same so there would be no confusions

* Fixed client side to create an array from relayLastschedule

* Fixed cosmetic issue with the toggle display in webui

* Fixed variable name and disabled comparison at the end

* Added another check if the switch type is light provider

* Changed variables naming

* Naming mistake
2019-11-06 14:25:42 +03:00
Maxim Prokhorov
c414ba1251 ha: log autodiscovery -> discovery 2019-11-01 23:47:55 +03:00
Maxim Prokhorov
e8acf33a69 ha: more cancelation reasons 2019-11-01 23:43:48 +03:00
Maxim Prokhorov
9956cd835b ha: send discovery on reconnect 2019-11-01 23:18:57 +03:00
Maxim Prokhorov
7adedc8992 ws: use std::pair instead of custom struct 2019-11-01 23:16:55 +03:00
Maxim Prokhorov
5bef606f2a ha: delay discovery until next loop
- stack-like discovery struct to store pending mqtt topic and
message
- use separate json objects for sensor and switch data (different solution for the #1957)
2019-11-01 23:16:55 +03:00
Maxim Prokhorov
5e7f3c29bd mqtt: reduce debug log pressure, return result of mqttSend 2019-11-01 23:16:55 +03:00
Niek van der Maas
e17ee6168e MQTT & OTA Fingerprint setting capitalization fix (#1952)
* MQTT Fingerprint setting capitalization fix

* otafp -> otaFP
2019-10-22 17:08:15 +03:00
Max Prokhorov
a2ada68d6e Restore WebUI builds in travis (#1953)
* test: restore webui builds in travis

* show build.sh usage via -h, exclude build stage instead of explicitly including it
2019-10-22 17:07:52 +03:00
Maxim Prokhorov
9025a4eb42 sensor/si7021: unused variable 2019-10-22 15:17:22 +03:00
Maxim Prokhorov
49bfd0819a sensor/ade7953: unused variable 2019-10-22 15:17:22 +03:00
Maxim Prokhorov
cb9dba4bb6 sensor/pmsx003: only delete object when it is managed by sensor 2019-10-22 15:17:22 +03:00
Maxim Prokhorov
ec37c06ba5 sensor/ads1x15: fix changing sensor type when reading adc 2019-10-22 15:17:22 +03:00
Maxim Prokhorov
0f2226e177 sensor: cast variable as UNUSED and prevent intended assignment warnings 2019-10-22 15:17:22 +03:00
Maxim Prokhorov
01b76adff0 crash,lights: ensure that settings contain positive value 2019-10-22 15:17:22 +03:00
Maxim Prokhorov
b36e5ee396 test: allow to run a single configuration test, improve commandline handling 2019-10-22 15:17:22 +03:00
Max Prokhorov
c18490cc4a PIO: pass APP_REVISION via extra scripts (#1946)
* utils/version: use git description token as version, add memoization

* pio: move extra scripts to a separate directory

* pio: add -DAPP_REVISION=... as local build flag
2019-10-16 14:41:43 +03:00
Max Prokhorov
6cb503b623 Merge pull request #1945 from mcspr/light/cfg-colortemp-range
Lights: configure mired warm / cold at runtime
2019-10-16 14:28:21 +03:00
Max Prokhorov
ff5b0d5165 ha: add platform="mqtt" back to the yaml output (#1949) 2019-10-16 14:27:25 +03:00
Max Prokhorov
7ad8045304 Fix infinite loop when printing crash dump (#1947)
* terminal: avoid softlock when comparing signed with unsigned

* move offset increment to condition

* adjust settings and crash handler available space

* key

* offset embedis writer and reader too

* rollback settings change
2019-10-16 14:25:36 +03:00
Niek van der Maas
7db0df0a67 NTP: Fix warning about unused variable if DEBUG support is disabled (#1944) 2019-10-16 14:23:51 +03:00
Max Prokhorov
d0a137ce94 Test: move travis boards outside of hardware header (#1943)
* travis: move build flags tests outside of hardware header

* mqtt: fix typo

* travis: use files instead of bundling test cases into script

* fixup! travis: use files instead of bundling test cases into script

* fix variable expansion, remove custom h at the end

* add ade7953 to sensors list

* custom.h path as variable

* shellcheck

* fix printf syntax, silent again

* fix bash 4.3 treating empty array as unset variable
2019-10-16 14:23:19 +03:00
Max Prokhorov
8dda0072f2 WiFi: allow button action to also disable softAP (#1942) 2019-10-16 14:22:43 +03:00
Max Prokhorov
6a3ef86c8f light: change naming order for cct vars 2019-10-15 19:24:54 +03:00
Max Prokhorov
5a2314e17a light: update XIAOMI_SMART_DESK_LAMP mired values 2019-10-15 19:14:59 +03:00
Max Prokhorov
6d9d4ae149 light: provide mired warm / cold limits to webui 2019-10-15 19:14:22 +03:00
Maxim Prokhorov
bcd2bf807f light: configure colortemp limits from settings 2019-10-15 19:12:07 +03:00
Xose Pérez
0a11a74f94 Support for TFlag NX-SM100 and NX-SM200 power monitoring switches 2019-10-11 17:46:53 +02:00
Xose Pérez
8b7eea6c72 ESPurna base image for Tuya Convert 2019-10-11 17:44:47 +02:00
Xose Pérez
06ebab31b5 Support for Teckin SP21 2019-10-10 13:25:55 +02:00
Max Prokhorov
1949bc8e3b Telnet: (optional) buffered output for AsyncTcp server (#1929)
* telnet: buffered output for async server

* telnet: make async buffer an option

* just use the queue containers directly

* try with simpler list

* exhaust buffers as much as possible in a single try

* don't forget to destroy the client object

* naming

* kill the connection earlier

* fix merge issues
2019-10-09 23:32:13 +03:00
Niek van der Maas
f3b35567d4 Added support for reverse telnet (#1920)
* Added support for reverse telnet

* Fix issues with first command being ignored

* Fix incorrect client creation

* Integrate PR 1927
2019-10-09 23:05:26 +03:00
Max Prokhorov
cf4540ae90 lights: module declarations in the header 2019-10-09 22:57:28 +03:00