Commit Graph

512 Commits

Author SHA1 Message Date
Max Prokhorov
8510f77d12 pio: use gcc10.1 package from registry
ref.
https://github.com/platformio/platform-espressif8266/issues/224#issuecomment-667053958
https://bintray.com/platformio/dl-packages/toolchain-xtensa/2.100100.200706
2020-08-02 13:36:15 +03:00
Max Prokhorov
35305f1f36 Update rpnlib to 0.23.x (#2274)
## [0.23.0] 2020-07-26
### Added
- `p` operator to print the top of the stack via debug function
- `&var` syntax to create variable reference in expression
- `=` operator for variable assignment in expression
- `exists` operator to check for variable existance (only for references)
- `deref` operator to convert variable reference into a value (only for references)
- Allow to use either float or double as floating type, parse numbers in expressions as specified type
- Add boolean type, parse `true` and `false` in expressions
- Add null type, parse `null` in expressions
- Add string type, parse double-quoted `"string"` in expressions
- Add integer and unsigned integer type, used in operators
- Allow to configure underlying types from rpnlib\_config.h and -D... flags
- Return `rpn_error` from operators, split error types into categories
- Create a new stack by using `[` keyword. Move stack contents into the previous stack + size by using `]`.

### Changed
- Stack structure no longer holds raw `float`, but internal `rpn_value` type
- rpn\_... setter and getter methods use `rpn_value` type
- Operator functions return `rpn_error` type, allowing to return both value and operator errors
- Variables in expressions are no longer required to exist when using `&var`
  Expression will automatically create the variable, set it to `null` and push it's reference on the stack
- It is possible to create 'reference' stack values
- Improve precision of `e` and `pi`

### Fixed
- Proper value for `e` constant
- Allow to use multiple contexts simultaniously, replace `rpn_error` and `rpn_debug_callback`
  with the current `rpn_context` members `error` and `debug_callback` respectively
2020-08-02 13:14:44 +03:00
Rui Marinho
6266930a4d sns: Add BME680 (#2295)
Add support for BME680 using libalgobsec proprietary algorithms for precise Indoor Air Quality (IAQ) measurement. Unlike traditional CO2 sensors - and good ones are expensive - it measures nearly all VOCs compounds in the air (plus other gases) and compensates those measurements with its built-in temperature and humidity sensors to determine indoor air quality.

Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
2020-08-02 09:12:38 +03:00
Maxim Prokhorov
b7a01466fc pio: fix lib_deps order
See https://github.com/platformio/platformio-core/issues/3598
2020-07-16 05:27:42 +03:00
dpeddi
547f52fe79 hw: Implement support for ProDino WIFI (#2269)
- implement mcp23s08
- support mcp pins in relays and buttons
- add hardware profile for ProDino WiFi

Co-authored-by: dpeddi <dpeddi@gmail.com>
Co-authored-by: Maxim Prokhorov <prokhorov.max@outlook.com>
2020-07-16 05:15:34 +03:00
Max Prokhorov
2be8d10601 PIO: fix git, bump versions (#2298)
- bump to espressif8266@2.5.3 (but, 2.5.4 will be here soon...)
- pwm asm -> __asm__
- re-shuffle dependencies a bit, remove brzo from -git and -latest, ref https://github.com/pasko-zh/brzo_i2c/issues/40
2020-07-08 17:44:29 +03:00
Max Prokhorov
3145e8be24 Rework settings (#2282)
* wip based on early draft. todo benchmarking

* fixup eraser, assume keys are unique

* fix cursor copy, test removal at random

* small benchmark via permutations. todo lambdas and novirtual

* fix empty condition / reset

* overwrite optimizations, fix move offsets overflows

* ...erase using 0xff instead of 0

* test the theory with code, different length kv were bugged

* try to check for out-of-bounds writes / reads

* style

* trying to fix mover again

* clarify length, defend against reading len on edge

* fix uncommited rewind change

* prove space assumptions

* more concise traces, fix move condition (agrh!!!)

* slightly more internal knowledge (estimates API?)

* make sure cursor is only valid within the range

* ensure 0 does not blow things

* go back up

* cursor comments

* comments

* rewrite writes through cursor

* in del too

* estimate kv storage requirements, return available size

* move raw erase / move into a method, allow ::set to avoid scanning storage twice

* refactor naming, use in code

* amend storage slicing test

* fix crash handler offsets, cleanup configuration

* start -> begin

* eeprom readiness

* dependencies

* unused

* SPI_FLASH constants for older Core

* vtables -> templates

* less include dependencies

* gcov help, move estimate outside of the class

* writer position can never match, use begin + offset

* tweak save_crash to trigger only once in a serious crash

* doh, header function should be inline

* foreach api, tweak structs for public api

* use test helper class

* when not using foreach, move cursor reset closer to the loop using read_kv

* coverage comments, fix typo in tests decltype

* ensure set() does not break with offset

* make codacy happy again
2020-07-03 22:07:48 +03:00
Matt Black
774a73d1d4 Including support for Arlec PC190HA/PB89HA (#2286) 2020-06-27 07:54:58 +03:00
Andrej Peterka
3e28ebf24f Add support for AG-L4 v3 (#2276) 2020-06-27 07:54:21 +03:00
Max Prokhorov
7aec0c57eb hardware: test nedis-wifip310fwt-sensor 2020-06-08 00:21:35 +03:00
Max Prokhorov
ba9b4a4503 hardware: Add support for Nedis WIFIP310FWT (#2275) 2020-06-07 22:35:02 +03:00
Max Prokhorov
e26ba9f52e Update platform_latest to Core 2.7.1 (#2263) 2020-05-27 01:10:10 +03:00
Esteban Zapata Rojas
d60ff79eda hardware: Add support for HUGOAI smart socket plug. (#2243)
* hardware: Add support for HUGOAI smart socket plug.

* Update code/platformio.ini

Co-authored-by: pezinek <pezinek@gmail.com>

Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
Co-authored-by: pezinek <pezinek@gmail.com>
2020-05-12 23:06:57 +03:00
Max Prokhorov
a2a44c28d4 Update IRremoteESP8266 to 2.7.4 (#2182)
* Update IRremoteESP8266 to 2.7.4

Fix version specifier, use PIO registry instead of git
Need this for -DALLOW_DELAY_CALLS=false

* Update platformio.ini

https://platformio.org/lib/show/1089/IRremoteESP8266/installation
2020-05-12 21:16:33 +03:00
Albert Weterings
ff2718e8ca KingArt WiFi Curtain Switch (#2063)
This will add support for the KingArt Wifi Curtain Switch. There are no buttons in the web interface as I could not figure out how to create them (any help on that is welcome).

For now the switch can be controlled over MQTT:
"{hostname}/curtain/set"
"{hostname}/curtain"
2020-05-01 12:45:41 +03:00
Esteban Zapata Rojas
9d2534f641 hardware: Add support for Aoycocr X5P Plug. (#2235)
* hardware: Add support for Aoycocr X5P Plug.

This change allow espurna to control Aoycocr X5P Plug devices, which has
the same behaviour as the GOSUND WP3 but using different GPIO pins for
relay, button and leds.

* Update platformio.ini

Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
2020-04-30 22:09:11 +03:00
Maxim Prokhorov
2dcf1b2bd8 cfg: move DEVICE and MANUFACTURER to functions
Avoids useless logs like this one:
https://travis-ci.com/github/mcspr/espurna-nightly-builder/jobs/316891026#L449
2020-04-08 23:28:43 +03:00
Max Prokhorov
92bdf211eb Update platformio.ini comments
Clarify flash size settings, fix old comment regarding build_flags
2020-04-08 02:33:26 +03:00
Max Prokhorov
b500273029 sns: add SI1145 sensor (#2216)
Co-authored-by: Joop Hilverink <33230021+HilverinkJ@users.noreply.github.com>
2020-04-08 01:48:45 +03:00
Max Prokhorov
49b6d351d9 PIO/hardware.h: Update naming (#2214)
* update platformio.ini comments
* espurna-base -> espurna-core-webui
* esp8266-<flavour>-<size>-base -> esp8266-<size>-<flavour>-base
* clean-up ESPURNA_CORE detection, use boards function
2020-04-07 21:48:43 +03:00
Max Prokhorov
db50be91bc PIO: fix env definitions (again) (#2212)
* base envs

* CI: speed up release process (since we still want some .bin files)

* fixup! CI: speed up release process (since we still want some .bin files)

* release dry run

* fixup! release dry run

* adjust

* fix .bin name

* it works

* minor cleanup for current git

* use pio suggestion about ldscript, reduce build_flags impact

* fix linker

* parse ${vars} instead of ignoring them

* add filtering and override file (sneak peak into tasmota's pio config)

* don't generate secure client (for now)

* formatting

* codacy
2020-04-07 21:20:32 +03:00
ziggurat29
387d4cea58 Board definition for the Gosund WP3 smart socket (#2191)
Co-authored-by: ziggurat29 <xxx@yyy.zzz>
2020-03-24 22:34:14 +03:00
Max Prokhorov
43c2c41cba mqtt(async): buffer some data (#2181)
* mqtt: enum state

* mqtt: async client buffer with MQTT_MAX_PACKET_SIZE

* mqtt: rework debug messages

* mqtt: MQTT_BUFFER_MAX_SIZE

* mqtt/test: debug log for async callback

* mqtt/test: don't log things we don't handle

* button: fix typo
2020-03-20 21:07:02 +03:00
ziggurat29
7496606140 Example for Generic ESP01 boards with 512KiB flash (#2185)
Co-authored-by: ziggurat29 <xxx@yyy.zzz>
2020-03-20 21:06:12 +03:00
Max Prokhorov
ba3e6267e6 Button pin provider & runtime settings (#2162)
* wip

* cleanup buttons-through-serial code, remove hw mention from button module

* remove wip

* implement mqtt settings

* fixup struct members, dual no longer allocates debouncer

* add missing debounceevent lib

* fix missing event_handler, update names

* fix namespace

* drop lib

* fix int<->bool comparison

* Move gpio16 handling from DigitalPin to EventHandler

* Cleanup debounceevent headers

* Don't expect system headers to be included

* re 70b54c489f - no allocation, for real

* Adjust settings names

* dont retain by default

* unused

* typo

* Fix length type (ref 6017ad9474)

* Move pin class outside of debounce lib, lowercase ns

* move event handling inside of button_t

* refactor config. ..._MODE -> _CONFIG, ..._MODE_... -> ..._ACTION_...

* fix test

* naming

* move indexed value to header

* refactor actions into direct opts

* fix webui, fix buttons not respecting old user setting

* change button config format from bitmask to a struct, adjust settings conversion

* proxy some more header defautls, fix web kv

* gpiopin

* adjust webui func to support every setting

* clarify single-return event->string

* fix dual setting

* fix dual packet condition, de-duplicate funcs

* fix bogus warning
2020-03-13 04:42:40 +03:00
DmitryBlinov
373dd27d60 Fixes and updates for thermostat and display (#2173)
* Fixes and updates for thermostat and display:

- Switch to original esp8266-oled-ssd1306 library
- Fixes and updates for thermostat and display
- Add display switching off after interval
- If THERMOSTAT_DISPLAY_SUPPORT enabled, then one click enable display, long click switch relay. This functionality also depend on fix for long click. See pull request https://github.com/xoseperez/espurna/pull/2172

* Move buttons definitions for display to dependencies.h

* Pin ThingPulse/esp8266-oled-ssd1306#3398c97
2020-03-08 18:15:27 +03:00
julianwb
8f7d77b2a1 Config for Teckin SP23 & Maxcio W-UK007S (#2157) 2020-02-18 22:23:52 +03:00
Max Prokhorov
3747d2ef46 Merge pull request #2154 from mcspr/mqtt/bump
mqtt: bump arduino-mqtt version, tweak keepalive
2020-02-18 12:15:44 +03:00
Max Prokhorov
79e45324ca Bump RFM69 version (#2148)
* Check patched RFM69 with relative includes

* merged upstream, point to the commit
2020-02-18 12:14:52 +03:00
Max Prokhorov
fd50e95e9e Thingspeak: tweak SecureClient connection (#2144)
- continue #2140 , use the correct implementation for http requests not confuse code readers with our parsing
- fix data sender data duplication, run build test
- add note that this is actually really RAM heavy, some connection failures are not easily distinguishable from any code errors and are simply OOM.

also
- fix arduinoota prototype error when building without it (... ino2cpp, again)
- add comment about 160mhz into the platformio.ini
2020-02-18 12:14:07 +03:00
Maxim Prokhorov
098de0cb0b mqtt: pin arduino mqtt version 2020-02-18 09:46:39 +03:00
Max Prokhorov
7862b52060 Fix "Fix AsyncTCP dependency" (#2149)
* Revert "Fix AsyncTCP dependency (#2147)"

This reverts commit d5093b4d18.

* Ignore AsyncTCP
2020-02-14 14:40:51 +03:00
Max Prokhorov
d5093b4d18 Fix AsyncTCP dependency (#2147)
PIO 4.2.1a default soft does not work
2020-02-14 13:27:18 +03:00
Max Prokhorov
a4d4231ae0 PIO: remove -ota envs, handle OTA condition in extra script (#2099)
* PIO: remove -ota envs, handle OTA condition in extra script
* Tweak ESPURNA_BOARD variable
* Support git and latest in ota script
* Handle ESPURNA_FLAGS too
* Try to handle env and projenv in pylint
* Add deprecation comment about -ota envs
* regen arduino.h
2020-01-20 17:41:10 +03:00
Anders Blockmar
55a73b1c6e Added hardware config for Avatto NAS-WR01W (#2113)
Not a match to same model from Neo Coolcam
2020-01-20 15:42:16 +03:00
orrpan
57a441a811 Deltaco smart home (#2103)
* add support for DELTACO SH-P01

* renaming deltaco_sh_le14w to deltaco_sh_lexxw

* add support Deltaco SH-P03USB and SH-LEXXRGB
2020-01-13 14:31:17 +03:00
Wil Wilsman
c25d6509bf Add MagicHome ZJ_LB_RGBWW_L support (#2100) 2020-01-13 14:29:25 +03:00
Marcus Winkler
4d978a46ac Add support for Teckin SB53 smart bulb (#2090) 2020-01-13 14:06:13 +03:00
Aurélien Requiem
a170716e90 Add support for Kogan Smarter Home Plug With Energy Meter (#2086)
* Add support for Kogan Smarter Home Plug With Energy Meter

Type: Power Plug
Board: Kogan Smarter Home Plug with Energy Meter
Build flag: KOGAN_SMARTER_HOME_PLUG_W_POW
Description: Power Plug with integrated Energy Meter
Baseboard: Tuya TYWE3S
Baseboard Data sheet: https://docs.tuya.com/docDetail?code=K8uhkbb1ihp8u

* Include Kogan Smarter Home plug with energy meter (KOGAN_SMARTER_HOME_PLUG_W_POW) into arduino.h

* Update platformio.ini to support Kogan Smarter Home plug with energy meter (KOGAN_SMARTER_HOME_PLUG_W_POW)

* Add Kogan Smarter Home plug with energy meter product image

* fix platformio.ini that was missing a '-ota' for the environment

* comment out device definition

* Make device name consistent with #define and platformio.ini
2020-01-13 14:05:32 +03:00
Max Prokhorov
76ba6d52d7 Recover -ota block for #2042 2019-12-18 17:55:23 +03:00
Max Prokhorov
56ab28cd68 Update PIO platforms comment 2019-12-18 17:54:20 +03:00
Niek van der Maas
de2179cf25 Update Arduino core to 2.3.2 (#2069) 2019-12-18 17:46:47 +03:00
Max Prokhorov
e5b72a0d43 Device: add LOHAS_E26_A19, rename LOHAS_9W to LOHAS_E27_9W (#2068) 2019-12-16 14:41:35 +03:00
sehraf
c0c325ee3b Add support for the LSC LED LIGHT STRIP from ACTION using a tuya chip. (#2065)
This LED strip is sold by ACTION in Germany and comes with a Tuya (TYWE3L) chip. It can be "freed" by using tuya-convert. It has (yet another) IR remote control that uses another set of codes. Which is added, too. The color codes are copies from SET 1 and 2.
I kind of think that they don't match my remote control but since i'm using my smart home system for controlling, i don't care enough to figure out the correct color codes.

The circuit board supports also a CW channel on PIN 5 (which is not used on by version), nevertheless I've added a comment in case anybody has a similar device with CW
2019-12-16 14:35:41 +03:00
Max Prokhorov
8e8c990ff0 Device: MAGICHOME_ZJ_WFMN_C_11 (#2051) 2019-12-16 14:08:24 +03:00
Vencislav Atanasov
b1d34885b1 Add support for eHomeDIY devices. (#2046)
We have created a few dozens of devices, released as open-source hardware and
published the schematics to GitHub. We're planning to organize some small
(10-15 people) workshops on how to assemble, flash and configure these board.

https://github.com/eHomeDIY
2019-12-16 14:07:01 +03:00
mpcusack
9c5dc67320 Add support for LinkSprite R4 (#2042)
* Add LinkSprite R4 def

* Platformio.ini def for linksprite r4

* LINKSPRITE_LINKNODE_R4
2019-12-16 14:04:25 +03:00
orrpan
e64ec2a9e3 Device: add GENERIC_E14, e14 rgb+w 4,5w (#2039) 2019-12-16 13:58:17 +03:00
Johannes Hörmann
4cb8cd31b3 Add support for BW-SHP5 (#2029) 2019-11-29 23:03:13 +03:00
Max Prokhorov
52fff439f1 Update nodemcu-lolin envs (#2025)
- add nodemcu-lolin-secure-client
- add nodemcu-lolin-latest based on $platform_latest
- remove nodemcu-lolin-252 based on $arduino_core_2_5_2
2019-11-28 19:48:12 +03:00