Commit Graph

2564 Commits

Author SHA1 Message Date
Xose Pérez
b2df1d8ef8 Merge branch 'dev' into rules-rpn 2019-09-30 07:59:40 +02:00
Xose Pérez
50eda3371b Itead Sonoff Mini support 2019-09-30 07:59:17 +02:00
Xose Pérez
7e92bbe253 Fix merge 2019-09-27 23:00:10 +02:00
Xose Pérez
62b80bb9ea Merge branch 'dev' into rules-rpn 2019-09-27 18:22:30 +02:00
Max Prokhorov
deb465763f Fix WiFi scan results in Web (#1913)
* web: re-add wifi scan action, send as json array

* ws: forcibly inline send functions
2019-09-20 15:37:54 +03:00
Max Prokhorov
c0c534926b Light: store pwm consts as progmem data (#1906) 2019-09-20 15:33:39 +03:00
Max Prokhorov
ae070b5973 Lights: channel value change detection (#1914) 2019-09-20 15:33:07 +03:00
Max Prokhorov
1f44bf5790 WiFi: Configure TX power (#1915) 2019-09-20 15:24:45 +03:00
Max Prokhorov
0ede907400 cfg: ignore MDNS_CLIENT_SUPPORT with lwip2 2019-09-20 15:13:59 +03:00
Max Prokhorov
9232ebae66 ws: move cmdVisible to terminal module 2019-09-20 15:13:59 +03:00
Max Prokhorov
fc2e29552e test: netstat and dns probing in terminal 2019-09-20 15:13:59 +03:00
Niek van der Maas
29ce81e4bf Fix SSL check callback function definition (#1916)
* Fix SSL check callback function definition

* Print secure client check as string
2019-09-20 14:45:07 +03:00
Max Prokhorov
cf3bd49bde light: fix value2pwm range conversion (#1902, #1905) 2019-09-10 19:09:24 +03:00
Niek van der Maas
ad2188cc0b Fix HTTPS support with OTA_CLIENT_HTTPUPDATE (#1894) 2019-09-10 12:57:01 +03:00
Max Prokhorov
0f23cddf9b Merge remote-tracking branch 'origin/dev' into web/update 2019-09-10 12:48:18 +03:00
Max Prokhorov
7959863526 lights: toRGB default arg 2019-09-10 12:45:16 +03:00
Max Prokhorov
054a9a5ea7 lights: fix kelvin/mired const naming 2019-09-10 12:45:16 +03:00
Max Prokhorov
f0a86ded9e lights/hsv: properly divide rgb values 2019-09-10 12:45:16 +03:00
Max Prokhorov
a2688ec376 lights: don't show v for hsv picker, use brightness instead 2019-09-10 12:39:28 +03:00
Max Prokhorov
f8deb535b5 lights: selector typo 2019-09-10 12:36:09 +03:00
Max Prokhorov
8dbd25c548 lights: initColor args 2019-09-10 12:35:12 +03:00
Max Prokhorov
e233fd5b08 web: move hsv picker conversions into functions 2019-09-07 12:48:35 +03:00
Max Prokhorov
5622fb8183 wifi: try garp before checking AP, if it is destroyed 2019-09-07 12:46:25 +03:00
Max Prokhorov
5d5f0f8b8c light: schedule provider update on loop 2019-09-07 12:41:39 +03:00
Max Prokhorov
019e8ae10d util: do not construct struct for simple getFreeHeap 2019-09-07 12:40:53 +03:00
Max Prokhorov
7efaaa8a80 ir: use proper methods 2019-09-07 12:39:48 +03:00
Max Prokhorov
0bf07f166e web: update to jquery 3.4.1 and wheelcolorpicker 3.0.8 2019-09-07 12:37:31 +03:00
Max Prokhorov
68270310c7 web: parse host query via browser api, logging 2019-09-06 14:37:39 +03:00
Thomas
24788474ad ha: add color_temp_state_topic (#1891) 2019-09-04 02:22:26 +03:00
Max Prokhorov
26fcdd76c5 WiFi settings clean-up (#1893)
* use indexed getsetting
* store defaults in progmem
2019-09-04 02:21:14 +03:00
Max Prokhorov
4bc530452c relay: fix typos in payload configuration (#1892) 2019-09-04 02:20:43 +03:00
Max Prokhorov
beff73ef8b relay/mqtt: handle custom relay status payloads (#1889)
- customize relay TOGGLE payload
- match payload string when receiving mqtt status message
- reference enum values instead of raw integers, spell out intended status
- remove dead code

amend #1885, capitalize `relayPayload...` suffix instead of using uppercase
add `relayPayloadToggle`
2019-09-03 09:13:21 +03:00
Max Prokhorov
13c1a19328 Home Assistant updates (#1885)
- remove "platform" key, see #1440. this implicitly sets schema to "basic". pending some other clean-up regarding json and mqtt queueing, other schema can be added down the line 
- updated ws module queue elem to capture callbacks list, allows to pass more than one callback (for example, when they are generated on the fly as lambdas, see ha wsPost usage)
- modified method to send ha config to use global ws queue, fix #1762 problem with empty topics and ensure json allocation is consistent.
- use existing defines to set mqtt payload options. amend #1085, #1188, #1883 to use the set payload value. drop HOMEASSISTANT_PAYLOAD... defines. 
- update MQTT_STATUS_ONLINE/OFFLINE and RELAY_MQTT_ON/OFF with runtime configuration
- filter payload strings so that the resulting yaml value is not interpreted as bool (python True, False)
- helper method for settings to streamline string values manipulation
2019-09-03 06:34:11 +03:00
Max Prokhorov
e398685ba4 mqtt: generic secureclient configuration (#1873)
* Rework MQTT sync client configuration

* MQTT_LIBRARY_...

* comments

* fix not doing any checks for bearssl, remove afterconnected template for mqttclient

* comments

* comments

* secure bool stub

* typos, always include sc helpers

* fix on_fingerprint return type

* typo

* typo

* indent

* tag is already in config obj

* generate mqtt featureset string at compile time

* reword again

* trusted_root_ca
2019-09-03 06:20:39 +03:00
Max Prokhorov
9d166f8a30 mqtt: update MQTT_MAX_PACKET_SIZE to fit JSON payload (#1888) 2019-09-03 06:19:01 +03:00
Max Prokhorov
af18758073 ws: check for client_id value before checking for client (#1887) 2019-09-03 06:17:43 +03:00
Max Prokhorov
1fe28225a4 Disable serial debug for env:nodemcu-pzem004t 2019-09-03 06:16:20 +03:00
Max Prokhorov
35ce68710c Test: etharp_gratuitous (#1877)
* test: etharp_gratuitous

* proper checks before calling etharp_gratuitous, move includes

* disable at runtime

* ms values

* reload

* debug

* reword

* filter by ifnum instead of checking for AP mode

* drop station_if check

2.3.0/lwip1 builds netif->num increments on for each sta or ap
lwip2 keeps those constant, but that seems like a implementation detail
might break in the future anyways...
2019-08-30 10:58:05 +03:00
Max Prokhorov
c123156b87 WiFi SoftAP fixes (#1881)
* Stop updating SoftAP SSID and password when changing hostname and password via WebUI / settings `reload`:
https://gitter.im/tinkerman-cat/espurna?at=5d65418f49ac051923be1f06
* Show real ssid and psk values from the current sdk configuration instead of using getSetting
* `WIFI.STA` command
2019-08-30 10:57:29 +03:00
Max Prokhorov
18b403bb56 lights: update kelvin constants 2019-08-30 07:51:00 +03:00
Max Prokhorov
ec25976717 domoticz: handle cmode=2
resolve #1763
2019-08-30 07:51:00 +03:00
Max Prokhorov
b3600bdc14 Format fixes in light module (#1874)
* Light: proper printf format for HSV, use lround

* core: warn about map() and 2.3.0, type-strict constrain()

* use generic format

* value already has brightness
2019-08-30 06:32:56 +03:00
reaper7
bbb4c061f6 Fix relative paths in prototypes.h (#1878)
Fix Arduino IDE error by changing to proper relative paths:

```
In file included from sketch\config/all.h:36:0, from C:\Programy\arduino_projekty\espurna_dev\code\espurna\espurna.ino:22:
sketch\config/prototypes.h:178:86: fatal error: static/letsencrypt_isrgroot_pem.h: No such file or directory

#include "static/letsencrypt_isrgroot_pem.h" // Default to LetsEncrypt X3 certificate

compilation terminated.
```
2019-08-30 06:32:35 +03:00
Max Prokhorov
58401c8a61 Use indexed keys for energy saving (#1875)
* Use indexed keys for energy saving

* match else even when rtcmem cannot fit the value

* fix energy reset placement

* fix rtcmem->energy size check

* revert to pre 62a2b9e value, handle update from 1.13.5
2019-08-27 03:15:47 +03:00
foxman69
d66b8a9bed Syncronize js when saving configuration (#1863)
* Syncronize js when saving important data

* update webui
2019-08-27 01:15:24 +03:00
Antonio López Marín
93c1dd6bf9 Support Shelly 2.5 (#1827)
* Add Shelly 2.5

* Add ADE7953 sensor support

* Fix compilation

* Use only one instance

* WIP: Not working, I got StoreProhibited exception

* Fix exception

* Fix merge issues

* Apply request review changes

* declare struct before using it

* uninterruptible delay

* try optimized reg_size

* fix types

* Remove gpio 0 input in analog sensor

* Add energy to ADE7953, it is not finished yet

* Add new method to save energy with index

* Finish energy for ADE7953
2019-08-27 00:25:19 +03:00
Niek van der Maas
b48f8c1440 MQTT rewrite with SSL fixes (#1751, #1829)
* MQTT rewrite with SSL fixes

- Added Arduino MQTT library support (actively maintained)
- Added support for BearSSL (core >= 2.5)
- BearSSL validation: insecure, fingerprinting and CA validation
- AxTLS validation: insecure and fingerprinting
- Support MFLN in order to reduce heap usage

* Better header incl, fix building w/ no NTP_SUPPORT

* Clean up code, use DEBUG_MSG_P

* Fix compile error
2019-08-26 23:59:07 +03:00
Yonsm
fa9ff7dee7 Check value range for PMSX005 and SenseAir CO2 sensor (#1865) 2019-08-22 03:23:50 +03:00
Tercio Gaudencio Filho
85a09a2b47 Add #ifndef guard for BMX280_... defines (#1867) 2019-08-22 03:10:40 +03:00
Max Prokhorov
c15d87a517 Remove gpio 0 pinmode in analog sensor
Thanks to @tonilopezmr 
1c3d68af34
2019-08-22 03:08:28 +03:00