Commit Graph

2494 Commits

Author SHA1 Message Date
Max Prokhorov
f4e3ced56a Port PROGMEM from 2.5.0 (#1374)
* Port PROGMEM from 2.5.0

* Update prototypes.h

* Guard for <2.5.0, prettify
2019-08-12 21:46:42 +03:00
Niek van der Maas
274f71d7d9 Allow offline building - skip package updater if there is no connection (#1841) 2019-08-06 15:13:08 +03:00
Max Prokhorov
437424aaac .ld scripts refactoring (#1559)
* initial ldscripts refactoring

* add missing menu options

* board for 2.3.0 and 2.4.2

* test with core 2.5.0

* typo

* ...same typo in other boards.local.txt

* generate boards.local.txt from common template

* Depend on file presence instead of platform version

* sdk selection

* Override only relevant entries

* generate ldscripts

* formatting

* unused

* fix section scope

* fix linker script comment and build getting stuck

* py2 compat

platformio from pip still does not support py3

* add TODO for py3

* chmod +x, remove leading newline

* comment with real spiffs size

* fixup! chmod +x, remove leading newline

* regenerate all ldscripts

* Preventive fix of spiffs_end calculation

* update arg parsing

* generate only 2.3.0 and latest

* readme for boards.local.txt

* Update ldscript readme

* unique flash sizes

* fix sub

* line break

* correct way to get framework path

* Alias for _FS_... symbols

* unused 2m1m1s

* bump?

* show travis logs

* ensure latest toolchain for travis

* check platform packages when building
2019-08-05 19:44:21 +03:00
Max Prokhorov
8d009a66f5 Add missing DOMOTICZ_... ifndef guards
https://github.com/xoseperez/espurna/issues/1839#issuecomment-518248474
2019-08-05 19:35:23 +03:00
Pavel S
228fba5b3a Enable multiple Digital & Events sensors (#1832)
* enable multiple Digital, Events & PulseMeter

* delete SPI dependency

* back to only one PulseMeter

* deprecared pins
2019-08-05 19:20:10 +03:00
Laine Walker-Avina
7e536be79c Add iselector-sm-pw702 (#1837) 2019-08-05 19:01:05 +03:00
Sandeep Sirpatil
6d74f4e958 Add etekcity-esw01-usa (#1836)
*  * Added support for Etekcity ESW01-USA device

* Update hardware.h

* Update hardware.h
2019-08-05 18:57:08 +03:00
Max Prokhorov
e49e538ce3 Update arduino.h 2019-08-05 18:46:35 +03:00
Michael Murton
dfb0cfb717 add s31-lite hardware profile
Signed-off-by: Michael Murton <6764025+CrazyIvan359@users.noreply.github.com>
2019-07-20 09:26:59 -04:00
arihant daga
fbf2b71749 Backup EEPROM before performing OTA (#1808, #1809)
* [Fix] Backing up EEPROM before performing OTA.For fixing - [#1808]

* Guard ArduinoOTA, different handler for async
2019-07-18 02:05:25 +03:00
Max Prokhorov
6765fd830f Fix assert condition 2019-07-18 02:04:17 +03:00
Max Prokhorov
e169a9dc6d Always apply channel inputValue->value 2019-07-18 02:04:17 +03:00
Max Prokhorov
5883617ee6 Light: move gamma to PROGMEM 2019-07-18 02:04:17 +03:00
Max Prokhorov
c918791920 Light: split RGBWW and only W brightness 2019-07-18 02:04:17 +03:00
Max Prokhorov
f8a0b9935c Terminal: Add description for each channel 2019-07-18 02:04:17 +03:00
Antonio López Marín
2e8ff3ab3d Add Shelly 1PM (#1822)
* Add Shelly 1PM

* Improve Shelly 1PM temperature tabs

* Add shelly 1pm button
2019-07-18 02:03:51 +03:00
Max Prokhorov
4469ec8575 env:wemos-d1mini is 4MB board 2019-07-15 00:44:42 +03:00
m-kozlowski
8dac0bbe49 Build date in ota.py (mDNS) (#1736)
* include build_date in mdns (and ota.py)

* ota.py: correct number of dashes in header
2019-07-15 00:42:12 +03:00
Max Prokhorov
98fbb8fc6f Update platformio.ini
Fix upload_... -> ota_upload_...
2019-07-13 05:35:38 +03:00
Max Prokhorov
b454cc4ed8 Web OTA: check authentication result before accepting payload (#1812) 2019-07-13 05:18:08 +03:00
Max Prokhorov
dd7760e76a Fixes for platformio builds (#1818)
* Define ota_upload_port, ota_upload_flags

* Update core builds - basic, wps and smartconfig
2019-07-13 02:58:43 +03:00
konsgn
ee8a6e022a Nexete A19 RGBW bulb (#1814)
* adding Nexete

Started Adding Nexete A19 Bulb

* Update hardware.h

* fixed pinout

* Rename to Nexete_A19 + added non-ota
2019-07-13 02:58:04 +03:00
Niek van der Maas
9be43c364a Telnet/WiFiServer: alternative to ESPAsyncTCP (#1799)
* Telnet rewrite, no longer using ESPAsyncTCP

* Support two telnet server implementations

* Clean up diff

* Update types, no free() calls, cleanup

* Use std::unique_ptr

* Fix nullptr checks

* Fix double log with async server

* Common new connection method

* use same connected() check as sync variant

* fixup! use same connected() check as sync variant

* Fix compile issue, close connection in case of timeout and when max connections reached

* Use AyncsClient* in function call

* Allow overriding telnet port + max clients

* Do not allocate 512 bytes by default

* Use TERMINAL_BUFFER_SIZE
2019-07-13 02:56:31 +03:00
Rui Caridade
3bb5cc879f Make compilation more flexible (#1816)
* Make compilation more flexible allowing to define in custom.h your own variation to devices and define four wifi networks

* Implement suggestion from Max Prokhorov, it's simpler and cleaner

* Change a #elif by #else

* Move ESPurna Core comment
2019-07-13 02:54:53 +03:00
Niek van der Maas
a8f602a401 Use basic BearSSL ciphers on low memory boards (#1810)
* Use basic BearSSL ciphers on low memory boards

* Move BearSSL basic flag to recommendation
2019-07-13 02:43:20 +03:00
Max Prokhorov
1d133bee16 Build with platformio 4 (#1805)
- update file paths: .pioenvs -> .pio/build, .piolibdeps -> .pio/libdeps
- modify envs to use common settings
- enable shared libs in travis and ota scripts
2019-07-11 00:34:17 +03:00
Niek van der Maas
900bcb8bf1 PIO4: default_envs (#1793) 2019-07-07 22:55:01 +03:00
Max Prokhorov
9bae101ed1 PIO: Update for recent platforms (#1811)
* PlatformIO development platforms

* Properly detect platform directory

* Naming

* Update platformio.ini
2019-07-07 11:35:50 +03:00
Max Prokhorov
bd00758162 Thingspeak: async client fixes (#1806)
* Thingspeak: async client fixes

- remove memory management in async client callbacks
- instead of global one, reference asyncclient from callback argument
- transfer temporary data-buffer to the global scope, avoid accidental String copy
- implement strnstr to search onData payload

* fixup format strings

* update retry time each attempt

* start with default attempts value

* trying to work with lwip2-536

* count time from last request

* promptly run flush
2019-07-07 11:21:15 +03:00
Max Prokhorov
d09b3f156f Update ESPAsyncTCP to 7e9ed22 (#1752, #1806)
Fix random resets when connection closes prematurely
2019-07-07 10:57:36 +03:00
Max Prokhorov
c44c74f70e Import Encoder library (#1769)
* Update encoder

- import modified Encoder library
- customize minimum delta value

* minimum delta in header config

* fixup! minimum delta in header config

* fix dead code, actually use interrupts

* move static class methods to normal funcs, apply namespace

* drop hardcoded register use

- use peripheral api (see cores/esp8266/esp8266_peri.h)
- remove bitmask and register struct members

* add a note about changes

* fixup! add a note about changes
2019-07-07 10:55:01 +03:00
Vencislav Atanasov
dc26a69642 Add support for MagicHome RGBWW LED strip (#1787)
* Add support for MagicHome RGBWW LED strip

This adds support for MagicHome 5 channel LED strip. It is using ESP8285 board, labelled as ESP-M4, has 5 powerful MOSFETs (M3006D, up to 80A! continuous/160A peak) at 12-24V. They are driven by smaller transistors. Red LED is connected to 3.3V power supply, and can't be controller. Green LED is connected to GPIO. Pin mappings:
BTN IO0
R Q8 Q2 IO14
G Q6 Q3 IO12
B Q9 Q4 IO13
WW Q10 Q5 IO15
CW Q7 Q1 IO5
GREEN_LED IO2
Looks like the same board is used in another product which has support for RF remote, but mine doesn't, so I don't include RF config, if yours has it should be a simple copy/paste job to add it.

* Add config for push button

* Fix copy/paste mistake

* Turn on/off LEDs using the push button
2019-07-02 05:43:29 +03:00
Max Prokhorov
1baeec545f Revert "fix led invert for yjzk switches (#1779)" (#1804)
https://github.com/xoseperez/espurna/pull/1779#issuecomment-504789747
2019-07-02 05:42:14 +03:00
Max Prokhorov
ff046eb0f1 DEBUG_SUPPORT check for crashSetup (#1807) 2019-07-02 05:41:26 +03:00
Max Prokhorov
0d76910b6d Update EventsSensor (#1771)
- cache ms<->clockcycles conversions
- move callback invocation outside of ISR handler
- remember last event value
2019-06-30 02:10:40 +03:00
Max Prokhorov
5e091ec5a9 Relay: drop legacy settings migration (#1797) 2019-06-30 01:29:54 +03:00
Max Prokhorov
08a748e05d Update crash handler (#1796)
* Update crash handler

- limit recorder stack size by 128 bytes
- offset settings a bit more
- add possibility to disable crash crash recoder completely

* nicer setting names, comment layout change
2019-06-30 01:25:59 +03:00
Vencislav Atanasov
746ad7062d Add config for push button of Arilux AL-LC06 (#1794)
Button is not visible from the outside, but can be wired outside or made more accessible by using a thin object, so it feels more like a button than a hole. The configuration should not cause issues if the button is not used at all.
2019-06-30 01:25:28 +03:00
Max Prokhorov
36f6c822ad Configure WEB_REMOTE_DOMAIN at runtime (#1789)
* Configure WEB_REMOTE_DOMAIN at runtime

* typo
2019-06-30 01:25:05 +03:00
Niek van der Maas
3fb34c1cc4 Add ability to print all GPIO values at once (#1798)
* Added ability to print all GPIO values at once

* Print input/output pin state, optimize code
2019-06-30 01:24:48 +03:00
Max Prokhorov
e445cf8c70 Update arduino.h and platformio.ini (#1774) (#1790) 2019-06-24 00:30:41 +03:00
Max Prokhorov
aac36d9b0c Update debugSend / debugSend_P (#1788)
- chain debugSend_P into basic _debugSend instead of duplicating code, pass va_list between them
- check if new[] call was successful
- when possible, use stack buffer and fallback to heap buffer only when it is more that 64 chars
2019-06-24 00:30:16 +03:00
Max Prokhorov
0dbfce1444 Show Core revision as hex string (#1786) 2019-06-24 00:20:25 +03:00
Max Prokhorov
88b8fcc9e4 Start SmartConfig without any networks configured (#1785) 2019-06-24 00:19:56 +03:00
Max Prokhorov
dc3a572f29 Let JustWifi fallback handle AP (#1784) 2019-06-24 00:19:41 +03:00
Michael Murton
48699e62a0 fix led invert for yjzk switches (#1779)
Signed-off-by: Michael Murton <6764025+CrazyIvan359@users.noreply.github.com>
2019-06-24 00:18:48 +03:00
reaper7
bf3caf3758 add support for JINVOO VALVE SM-AW713 (#1774)
* add support for JINVOO VALVE SM-AW713

* add support for JINVOO VALVE SM-AW713

* add support for JINVOO VALVE SM-AW713

* add support for JINVOO VALVE SM-AW713

Type: Other
Board: Jinvoo SM-AW713
Build flag: JINVOO_VALVE_SM_AW713
Description: motorized valve

* fix typo
2019-06-24 00:17:40 +03:00
Max Prokhorov
14b796b410 Rtcmem update (#1770)
* Custom erase method instead of memset

* Print whole available user rtc memory
2019-06-24 00:15:44 +03:00
Max Prokhorov
0f0d0b1b34 Close connection in notFound callback (#1768)
* Close connection in notFound callback

* Add early check of AP mode
2019-06-24 00:15:27 +03:00
Max Prokhorov
dfd3a14abc Terminal: heap fragmentation stat (#1740)
* debug: heap fragmentation stat

* Rework method detection

- return check integral type as a result of detection instead of method type
- type-tagging instead of enable_if

* fix alias

* typo

* only need one bool_type instance

* Move heap debug into HeapStats header

- don't show fragmentation stats on the first call
- prettify fragmentation display
- pack function params into helper struct
- naming

* pass external flag instead

* add missing prototypes
2019-06-24 00:15:03 +03:00