Commit Graph

657 Commits

Author SHA1 Message Date
Maxim Prokhorov
f007db1ff6 webui: implicit build-only consts via .d file 2024-06-25 17:53:50 +03:00
Maxim Prokhorov
a7697a2578 webui: attempt to clean-up index js types
minimal type info for internal and some external funcs
fix Ago updates depending on uptime, use onmessage

html/src/types/* useless (at least without tsc actually running)
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
2dadf01839 webui: gulpfile in strict mode
amends f58d086dd6
attempt to distinguish build and ui scripts
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
4f520a8798 webui: consistent settingsMax check
remove leftover manual template merge, idForContainer() should just use template-id data key
group add event now checks that instead, raising alert when number is greater than max

ref. #2610
2024-06-24 22:43:19 +03:00
Maxim Prokhorov
ce5ada9d32 webui: type filter for element setters 2024-06-24 22:43:19 +03:00
Maxim Prokhorov
a1363ddad9 system: iso8601 datetime & webui in local timezone
ref. #2608
2024-06-24 22:42:00 +03:00
Maxim Prokhorov
ddcbd0e885 webui: color hierarchy for custom toggle 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
4975a2382c webui: removing original .html & .js & .css 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
289fea4f3d webui: separate sources per module
* migrate to esbuild from terser, since now js source needs bundling
* (temporary?) hijack inline-source object handling to inline html files
* get rid of legacy removeIf comments in source in favour of explicit
  removal either through bundling tree-shaking and / or manual module-*
  class element removal w/ jsdom
* get rid of multi-layered custom checkboxes in favour of
  `appearance: none` directly styling the `input` elem
  also removes scripting part that was supposed to adjust for=... labels
* update to html-minifier-terser, up-to-date html-minifier fork
* update to iro.js 5.5.x, using npm to manage dependencies
* build script can now update resulting html output
  (called after bundling stage, before minification)
2024-06-22 19:49:59 +03:00
Maxim Prokhorov
d6f807d68c scheduler: midnight as default HH:MM
allow just "UTC", "Monday", "05-01", etc.
clarify webui paragraph and mention KEYWORD as an element

ignore sunrise and sunset keywords when sun module is disabled

move all of parsing to time module, test whether combined match works
2024-05-27 19:10:25 +03:00
Maxim Prokhorov
8735f4d762 scheduler: webui sun module, utc cannot be alone 2024-05-16 19:59:49 +03:00
Maxim Prokhorov
bfc716894d webui: scheduler 2024-05-16 01:25:50 +03:00
Maxim Prokhorov
87197470cb web: group delete button should not assume it is at the top 2024-05-16 00:00:32 +03:00
Maxim Prokhorov
dd6bedeec7 webui: style save button 2024-04-15 01:23:08 +03:00
Maxim Prokhorov
c70fe1a016 web: bump html-validate@8 again
fixes 3f1cf8cd *-dup false positives
2024-04-12 00:22:38 +03:00
Maxim Prokhorov
af797fddb7 ha: reorder settings in webui 2024-03-19 19:51:53 +03:00
Maxim Prokhorov
3f1cf8cd04 webui: autocomplete="off" fixes
update dev html-validate@8 and eslint
workaround for form-dup-name (false-positive?)
2024-03-19 19:51:53 +03:00
Maxim Prokhorov
452cd78c41 ha: handle homeassistant/status
birth message should trigger discovery, enabled by default
ref. #1637

clean-up discovery code to properly re-init when something goes wrong
also restore manual discovery trigger from WebUI
2024-03-19 19:51:35 +03:00
Dmitry
238dc130af garland: fixes and updates (#2600)
* garland: fix issue with division by zero in first scene setup

* garland: update setters code

* garland: fix web UI

* garland: update scene default settings

* garland: update palettes, add random run animation

* garland: enable and update anim_glow

* garland: update anim_spread

* garland: add anim_crossing

* garland: get rid of redundant variables in main class

* garland: provide anims with all palettes

* garland: unify anim_waves and anim_run to use ColorWave class

* garland: update format for color_wave.h and garland.cpp

* graland: update anim code with clear rands and auto counters

* garland: implement pixel caching for color waves to reduce redundant calculations

* garland: fix anim dolphins out of range issue

* garland: tune anim comets

* garland: combine all wave-based anims; add wave comet anim

* garland: fixes for PR notes
2024-01-20 22:23:05 +03:00
Maxim Prokhorov
f3c3efca4a dcz: typo in relay settings key
resolve #2596
2023-11-05 00:37:45 +03:00
Indu Prakash
2e19de7a44 webui: show message only for real pin-lock failures (#2584) 2023-03-17 14:39:03 +03:00
Maxim Prokhorov
3a1e041f51 gpio: notify about failed locks 2023-03-16 14:45:04 +03:00
Maxim Prokhorov
909949b5cc light: hide extra toggle in webui
amend b5a03dac72
2023-01-12 03:16:07 +03:00
Maxim Prokhorov
b5a03dac72 light: experiment with relay state provider
* dynamic relays should not overlap with configuration
* prefer explicit relay configuration vs. dynamic addition

resolve #2568
2023-01-11 05:46:38 +03:00
Maxim Prokhorov
767cd72e36 lights: allow to recover from a fully black rgb 2022-12-12 14:28:25 +03:00
Maxim Prokhorov
9126a9832b light: cct for rgb, rgbww and ww cases
- revert to ignoring rgb in color+white+cct case by resetting all its
  inputs to minimum and only controlling white channels
- ignore ww and cw in rgb+cct case; use approximated color, thus allowing
  us to set a different 'cold temperature' limit
- fix webui layout rules based on root element class(es) and consistent
  order for our control elements that does not depend on the order in which
  `processData` handles configuration kvs
- internal refactoring to flatten input processing funcs selection
  (to possibly replace our boolean flags with a simple list)
2022-12-01 00:30:26 +03:00
Maxim Prokhorov
4021c4d14d light: hide colorpicker when color is disabled 2022-11-27 03:43:41 +03:00
Maxim Prokhorov
b1bdfd927c webui: update blobs 2022-11-25 05:09:12 +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
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
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
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
2a7cabb4d3 light: rework hsv input in webui
* make sure we don't apply hsv and brightnesss, only take hue and saturation
  when calculating inputs. use value as brightness percentage, wrapping
  the original function (which also makes other modules use this codepath)
* deduce interface elements based on both setting and incoming
  properties. wrap everything in {light: ...} in both inputs and
  outputs, alse allow to update multiple properties at the same time
* add light state toggle when special lights relay is not set up
* remove channel, state and brightness elements through css styling
  instead of going to the elements directly. no need to chech whether
  certain elements exist
2022-10-23 03:18:57 +03:00
Maxim Prokhorov
fc8bdef7d5 terminal: fixing web socket interface
Make the buffer work on '\n' instead of a limit, flush asap.
Still using single 'DEBUG' output for both terminal and debug prints;
we no longer have 'pre' and 'msg' distinction - there is just 'msg'.
2022-09-08 15:50:30 +03:00
Maxim Prokhorov
ef202109e7 terminal: remove shared output
Make every available call site 'private'
e.g. typing command in telnet no longer prints to serial or WebUI

Serial input is now optional, see `TERMINAL_SERIAL_SUPPORT`.
Telnet using async server is a proper Print implementation now.
WebUI, MQTT and HTTP input is allowed to inject multiple lines at once.

Modernize our helper classes and remove legacy 2.3.0 quirks.
Replace global Terminal object and allow to separately
split, parse ARGV list and perform command search and invocation with
standalone function calls.
(but, notice that we still depend on a globally shared 'commands' list)

This greatly reduces used RAM (but, slightly increases our ROM).

Update our test suite to use namespaces and new calling convention.
2022-09-08 13:39:11 +03:00
Maxim Prokhorov
84017214d2 webui: detect when sensor unit changes
also split energy info into a separate payload & handler
2022-06-12 20:36:01 +03:00
Maxim Prokhorov
3275f4921f sns: the rest of magnitude settings
As mentioned in the #2491
Hides parent element when these groups are empty
2022-05-06 18:56:54 +03:00
Maxim Prokhorov
59bd14966e webui: rebuild blobs 2022-05-05 22:49:02 +03:00
Maxim Prokhorov
62b2edadc4 sns: show and edit correction values in webui
fixes #2491
2022-05-05 22:35:34 +03:00
Maxim Prokhorov
28aa9622bb rfbridge: handle rfb{ON,OFF} just like any other setting
removes the extra 'save' button from the ui and the code that handles it
also make sure to use the updated foreach_prefix when looking for the
match in the settings

resolve #2502
2022-02-09 16:00:41 +03:00
Maxim Prokhorov
5c6a6dacfb webui: fix class typos and add more control groups 2022-01-16 03:53:20 +03:00
Maxim Prokhorov
588b1c46b1 webui: hint is not a class anymore and fix alexa element group 2022-01-15 19:18:12 +03:00
Maxim Prokhorov
05c696f869 webui: fix lint 2022-01-14 03:50:23 +03:00
Maxim Prokhorov
288b79c549 webui: reposition elements and trying to fix autoscroll
Since 'Enter' is also a submit button and another style gets applied,
both seem to overlap. Not very important on a desktop, but might be
easier to navigate on mobile screen
(plus, move settings backup buttons back at the top, accidentally moved
those to the bottom in the previous commit)

On the DEBUG page as well, trying to fix the scrolling behaviour when the
logging stream just started and will only jump after it spends some time at
the top row. Watching the element state to pause the autoscroll when we
manually move the slider, and resume it once the slider touches the bottom
of the textarea. Entering the command will reset the state and enable
the autoscrolling immediately
2022-01-14 03:28:32 +03:00
Maxim Prokhorov
594763e349 webui: update blobs 2022-01-13 02:21:35 +03:00