Commit Graph

3674 Commits

Author SHA1 Message Date
Maxim Prokhorov
b1bdfd927c webui: update blobs 2022-11-25 05:09:12 +03:00
Maxim Prokhorov
83e7b61ce9 light: mired range in terminal 2022-11-25 05:07:46 +03:00
Maxim Prokhorov
33453117a4 light: fix temperature scale and white channel mode
make use of our apply() objects for value replacement in-place
also revert the white channel mode change that ignores rgb output factor
2022-11-25 05:06:10 +03:00
Maxim Prokhorov
99b5ed9b57 webui: normalize light channel tags 2022-11-25 05:04:25 +03:00
Maxim Prokhorov
d029414f6e webui: always display brightness 2022-11-25 05:03:58 +03:00
Maxim Prokhorov
909b2a0786 webui: lights styling through classes 2022-11-25 05:03:29 +03:00
Maxim Prokhorov
e84fbf7366 webui: correct TZ yet again
amends 94f0786ed5
2022-11-17 23:05:40 +03:00
Maxim Prokhorov
ad603aa2c3 light: another ambiguous type 2022-11-17 23:02:22 +03:00
Maxim Prokhorov
a437371408 light: ambiguous numeric type 2022-11-17 23:02:14 +03:00
Maxim Prokhorov
94f0786ed5 webui: simple tz could either be with hyphen or without
looking at <...> TZ values, previous version seemed true
2022-11-17 17:23:06 +03:00
Maxim Prokhorov
70d25aea06 webui: ntp offsets from tzdata/etcetera
refer to our docs for the script output
see #2548
2022-11-17 01:46:51 +03:00
Maxim Prokhorov
fcbc57c885 util: fix non-arduino api 2022-11-17 00:54:10 +03:00
Maxim Prokhorov
45c54863ba light: report disabled relay support 2022-11-17 00:54:10 +03:00
Maxim Prokhorov
f37f380c04 webui: 2nd try at using css for light controls
register channels with their respective tags, instead of using count
both on backend and frontend

revert to useCCT mireds slider rule, disallow white channels with useWhite
2022-11-17 00:54:10 +03:00
Maxim Prokhorov
1be7623143 webui: emon hints visibility through css 2022-11-17 00:54:10 +03:00
Maxim Prokhorov
2586b54411 sns: v9261f reactive power from apparent
resolve #2554

make use of cse7766 calculation for factor, too
thanks to @Kaan88

remove reactive power ratio from base sensor as well, since it does not
seem to be used anywhere else (...and does not really make sense in most
situations when sensor inputs are using common gain)
2022-11-17 00:54:10 +03:00
Maxim Prokhorov
6fe04a49e7 system: common case could sleep for the timeout duration 2022-11-17 00:54:10 +03:00
Maxim Prokhorov
22791cfc86 system: blocking delay should actually call delay()
avoid optimizing out function call when `&&` comparison is always false
resolve #2555
2022-11-17 00:54:10 +03:00
Maxim Prokhorov
a3d8582a70 sns: flush does not mean reset for both tx and rx
* clean-up useless stream read() / flush(), rely on timer and internal state
  avoids wdt reset with sensors looping on available()
* fix some instances of `available()` in boolean context to use `>0`
  (not everything returns sign, but if it does - we are in trouble)
* util func to read available bytes from the stream using buffered
  interface instead of 1 byte at a time
2022-11-17 00:54:10 +03:00
Maxim Prokhorov
441454d931 light: mireds as another input value
color temperature applies to input values as and / or
- rgb channels scale, when cct mode is enabled w/ color
- white channel(s), moving between warm and cold

remove two rgb scalers applied one after the other in favour of two
distinct variants - we either subtract common value from rgb or use
mireds as a scale for both rgb and ww+cw
restore brightness control as well
2022-11-17 00:54:10 +03:00
ktkd
1169be25a5 sns: fix slash removal in modules (#2552)
fix invalid prometheus syntax `strconv.ParseFloat: parsing "/0": invalid syntax`
fix another instance of remove('/')
2022-11-07 19:10:12 +03:00
Maxim Prokhorov
079c4305c0 light: limit comma separated payloads
rgb only applies to the first 3, group applies to all
2022-11-05 04:08:56 +03:00
Maxim Prokhorov
5577d8bb42 light: group payload is comma separated 2022-11-05 03:32:58 +03:00
Maxim Prokhorov
c4d3c57e80 light: ws channel data is text 2022-11-05 03:27:45 +03:00
Maxim Prokhorov
29af260d34 debug: sometimes uart is disabled 2022-11-05 02:59:12 +03:00
Maxim Prokhorov
c99118e294 ws: yet another json buffer overflow 2022-11-04 19:35:04 +03:00
Maxim Prokhorov
cc90554b0e sns: redefinable bh1750 mode 2022-11-03 18:13:39 +03:00
Maxim Prokhorov
03ed94b771 light: try generic provider once again
avoid going out-of-bounds in phases loop
small adjustments to the variable loading
2022-11-02 04:36:49 +03:00
Maxim Prokhorov
7bda67a06c ws: fix off-by-one when parsing input
notice about buffering and its impact
and avoid using strcmp, just compare bytes
2022-10-30 00:51:23 +03:00
Maxim Prokhorov
7296eca22e ws: do not print raw data
* error code is not buffered through our handler object.
  while espasync code does strlen, what it returns is mostly random.
  (old request parts, weird data, etc.)
* reworked buffer class to avoid an extra allocation on top of the
  existing vector data buffer. plus, simple function pointer as well
2022-10-30 00:50:05 +03:00
Maxim Prokhorov
f1d5b62146 light: webui color and cct fixes
* correct id=... and element references, partial changes to element
  order were not using the new global 'light' container
* separate block for picker, does not seem consistent to depend on json
  key order when processing device cfg
* visibility != display; make sure color picker is hidden when there is
  no color control, but not visible when color is on but state is off
2022-10-29 02:08:50 +03:00
Maxim Prokhorov
fce3adf2b2 system: revert 657061bf completely
disarm is *required* by the underlying API, don't miss it on start()
while the func uses a resource lock internally, it does not seem to be the
source of system lock-ups encountered so far
2022-10-27 18:37:20 +03:00
Maxim Prokhorov
c01a192756 hw: fix lightfox builds 2022-10-27 17:26:27 +03:00
Maxim Prokhorov
9aa91bf022 uart: allow to claim unused hw pins with sw
prioritize hw instead of straight up removing the choice to create a sw
object. for example, allow to use either of the swapped UART0 pins when
we already use the main ones
2022-10-27 03:57:54 +03:00
Maxim Prokhorov
ca3fa3f7fd system: just be careful 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
d60689d4b4 system: revert 657061bf behaviour with 'tick' timers
if tick object exists, repeat flag was set for the os_timer_arm()
do not fire more than once when repeating was not requested
2022-10-27 03:57:54 +03:00
Maxim Prokhorov
44ec40304c pio: build pzemv3 envs 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
4269ddcf5f hw: include swserial in generic sensor builds 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
138113ce50 build: show uart and uart_sw 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
8f74789462 util: fix parsing 3 and more digit numbers 2022-10-27 03:57:54 +03:00
Maxim Prokhorov
6154f40a4e sns: fix v9261f uart parity mode 2022-10-27 01:02:09 +03:00
Maxim Prokhorov
504bda8299 web: always export arduinojson overrides 2022-10-27 00:55:55 +03:00
Maxim Prokhorov
6b3ce83198 mqtt: fix json topic generation 2022-10-24 18:32:06 +03:00
Maxim Prokhorov
2918d9fe5d light: channel id in terminal is not a path 2022-10-24 18:30:23 +03:00
Maxim Prokhorov
74ad71bf74 tests: fix device-only macro 2022-10-23 05:45:42 +03:00
Maxim Prokhorov
afb24f7ba6 webui: bump html-validate to 7.6.0 2022-10-23 03:56:19 +03:00
Maxim Prokhorov
aa84f98d5f webui: bump eslint to 8.26 2022-10-23 03:49:06 +03:00
Maxim Prokhorov
b6ac1140f2 webui: bump node dependencies 2022-10-23 03:47:47 +03:00
Maxim Prokhorov
7b8955341a api: streamable string view for json parser 2022-10-23 03:19:07 +03:00
Maxim Prokhorov
9d4bf43d66 rpn: fix variable name match 2022-10-23 03:19:07 +03:00