Commit Graph

2625 Commits

Author SHA1 Message Date
Maxim Prokhorov
19e474abca utils: fix base-10 condition 2019-11-23 00:48:20 +03:00
Maxim Prokhorov
83f49e30ea relay: write boot mask later, add relay_t defaults 2019-11-23 00:26:48 +03:00
Maxim Prokhorov
5e74adb23e relay: proxy header defaults through methods 2019-11-23 00:24:54 +03:00
Maxim Prokhorov
e7fc5f337b relay: rework mask handling to use generic u32<->string conversion 2019-11-23 00:24:54 +03:00
Maxim Prokhorov
9f4329dc1a relay: replace eeprom 8bit with 32bit bitmask stored in settings
- mask is defined as (relay# status << number)
- transparently handle base-2 and base-10 numbers
- if the relay mode requires us to save the mask, it will be saved as base-2
2019-11-22 18:05:04 +03:00
Maxim Prokhorov
f4b0e9fe5b relay: fix dummy relays overwriting real ones 2019-11-22 15:23:30 +03:00
Max Prokhorov
1f41d79afb Fix heartbeat check for thermostat, add Bssid for InfluxDB (#2002) 2019-11-22 15:22:05 +03:00
Max Prokhorov
ca56e0e4c1 Add THERMOSTAT_SUPPORT=1 to the sensor tests 2019-11-21 02:47:28 +03:00
Max Prokhorov
383d5a8a5d DHTSensor: fix Si7021 compatibility (#2000)
* sensor: add DHT_CHIP_SI7021 references

* sensor: update DHT_TYPE definitions, use enum

* changelog
2019-11-21 01:29:58 +03:00
Max Prokhorov
9a5698b342 Add TUYA_SUPPORT (#1997)
- add experimental `relayDummy` to configure dummy relays at runtime
- add tuya-generic-dimmer #1729
- cleanup broker interface to allow Tuya module to properly receive events, modify broker methods to allow different function signatures
- add basic tests for Tuya frame and data protocol
2019-11-21 01:14:17 +03:00
Max Prokhorov
c96f2e4e3a Fix strtoul error condition (#1995)
endptr is set to '\0' when successful
2019-11-18 03:28:24 +03:00
Max Prokhorov
ab186e057e Add missing / not implemented default getSettings values (#1996)
* scheduler: match webui defaults

* relay: inverse error condition

* api: simplify apikey handling

* thingspeak: use apikey default value

* web: fix checkbox value for haschanged

* fixup! scheduler: match webui defaults
2019-11-18 02:48:22 +03:00
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