Commit Graph

135 Commits

Author SHA1 Message Date
J. Nick Koston 1762204b00 dashboard: set nodelay on the websocket to avoid a delay seeing log messages (#5802) 2023-11-24 11:49:55 +13:00
J. Nick Koston 7d5ebeda52 dashboard: Fix online status when api is disabled (#5792) 2023-11-21 13:16:06 +13:00
J. Nick Koston 2aaee81313 Refactor StorageJSON to keep loaded_integrations a set until its converted to JSON (#5793)
* Refactor StorageJSON to keep loaded_integrations a set until its converted to a dict

after #5792 we will be checking loaded_integrations often. ESPHome
core keep uses a set, but it would get converted to a list when
passed through StorageJSON. Keep it a set until its needed to
be read/write to JSON so we do not have to linear searches on it
since they have a time complexity of O(n) vs O(1)

* legacy
2023-11-19 22:31:00 -05:00
J. Nick Koston cd9bf29df1 dashboard: Add lookup by name to entries (#5790)
* Add lookup by name to entries

* adj

* tweak

* tweak

* tweak

* tweak

* tweak

* tweak

* preen
2023-11-19 22:29:40 -05:00
J. Nick Koston 4e4fe3c26d dashboard: Ensure disk I/O happens in the executor (#5789)
* Ensure I/O executor

* safe file writer

* fixes

* more io

* more io
2023-11-19 22:28:35 -05:00
J. Nick Koston 3c243e663f dashboard: Add support for firing events (#5775)
* dashboard: fire events when entry is updated or state changes

* dashboard: fire events when entry is updated or state changes

* dashboard: fire events when entry is updated or state changes

* tweaks

* fixes

* remove typing_extensions

* rename for asyncio

* rename for asyncio

* rename for asyncio

* preen

* lint

* lint

* move dict converter

* lint
2023-11-17 19:33:10 -05:00
J. Nick Koston 149d814fab dashboard: Centralize dashboard entries into DashboardEntries class (#5774)
* Centralize dashboard entries into DashboardEntries class

* preen

* preen

* preen

* preen

* preen
2023-11-15 21:49:56 -05:00
J. Nick Koston 5f1d8dfa5b dashboard: use fastest available yaml loader in the dashboard (#5771)
* dashboard: use fastest available yaml loader in the dashboard

* remove unrelated change
2023-11-15 19:08:17 -05:00
J. Nick Koston 3644853d38 dashboard: fix subprocesses blocking the event loop (#5772)
* dashboard: fix subprocesses blocking the event loop

- break apart the util module
- adds a new util to run subprocesses with asyncio

* take a list
2023-11-15 19:07:51 -05:00
J. Nick Koston c795dbde26 dashboard: split dashboard web server code into its own module (#5770) 2023-11-15 21:34:09 +00:00
J. Nick Koston 86b4fdc139 dashboard: Break apart dashboard into separate modules (#5764)
* Break apart dashboard into seperate modules

* reduce code change

* late imports

* late imports

* preen

* remove accidental changes

* save the file
2023-11-15 13:00:28 -05:00
J. Nick Koston 20ea8bf06e dashboard: convert ping thread to use asyncio (#5749) 2023-11-14 22:55:33 -06:00
J. Nick Koston 214b419db2 dashboard: Use mdns cache when available if device connection is OTA (#5724)
* Use mdns or freshen cache when device connection is OTA

Since we already have a service browser running, we likely
already know the IP of the deivce we want to connect to so
we can replace OTA with the address to avoid the esphome
app having to look it up again

* isort

* Fix zeroconf name resolution refactoring error

HostResolver should get the type as the first arg instead
of the name

* no i/o

* tornado support native coros

* lint

* use new tornado start methods

* use new tornado start methods

* use new tornado start methods

* break

* lint

* lint

* typing, missing awaits

* io in executor

* missed one

* fix: missing if

* stale comment

* rename run_command to build_device_command since it does not actually run anything
2023-11-14 21:21:44 -05:00
J. Nick Koston f198be39d7 dashboard: Run get_serial_ports in the executor (#5740) 2023-11-14 13:46:51 +13:00
J. Nick Koston 08fc96b890 dashboard: remove usage of codecs module (#5741) 2023-11-14 13:44:49 +13:00
J. Nick Koston cf22c55430 Fix static assets cache logic (#5700) 2023-11-08 21:04:01 +00:00
J. Nick Koston 78e3ce7718 Implement a memory cache for dashboard entries to avoid frequent disk reads (#5687) 2023-11-07 19:04:55 +13:00
Jesse Hills 43b36ac3c7 Allow static assets to be cached if not in debug mode (#5684) 2023-11-07 12:38:38 +13:00
J. Nick Koston fce59819f5 Refactor dashboard zeroconf support (#5681) 2023-11-07 11:07:59 +13:00
Jesse Hills 46be886ca6 Use platform consts (#5508) 2023-10-09 16:54:15 -05:00
Jesse Hills fe81bcc003 Use /data directory for .esphome folder when running as HA add-on (#5374) 2023-09-12 09:26:48 +12:00
Kuba Szczodrzyński 9cf115a752 Fix dashboard download for ESP32 variants (#5355) 2023-09-09 09:20:26 +12:00
Kuba Szczodrzyński a9630ac847 Support for LibreTiny platform (RTL8710, BK7231 & other modules) (#3509)
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
Co-authored-by: Sam Neirinck <git@samneirinck.com>
Co-authored-by: David Buezas <dbuezas@users.noreply.github.com>
Co-authored-by: Stroe Andrei Catalin <catalin2402@gmail.com>
Co-authored-by: Sam Neirinck <github@samneirinck.be>
Co-authored-by: Péter Sárközi <xmisterhu@gmail.com>
Co-authored-by: Hajo Noerenberg <hn@users.noreply.github.com>
2023-09-05 10:16:08 +12:00
Kuba Szczodrzyński c3332e4a39 Add dashboard API to get firmware binaries (#4675)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-01 18:17:33 +12:00
mwolter805 c47c1a7867 Resolve offline ESPs in dashboard when using ESPHOME_DASHBOARD_USE_PING=true (#5281) 2023-08-20 12:15:45 -07:00
Graham Brown 89c5298bb9 Streamer mode (#5119) 2023-07-21 08:47:37 +12:00
Kuba Szczodrzyński 973e78355f Dashboard: use Popen() on Windows (#5110) 2023-07-20 08:39:35 +12:00
F.D.Castel c82be2cd60 Fixes compressed downloads (#5014)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-28 11:13:14 +12:00
F.D.Castel f72b07eb0e dashboard: Adds "compressed=1" to /download.bin endpoint. (...) (#4966)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-22 11:48:17 +12:00
Markus c5a45645a6 allow to use MQTT for discovery of IPs if mDNS is no option (#3887)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-17 16:29:56 +12:00
dependabot[bot] 5997401e9e Bump pylint from 2.15.10 to 2.16.2 (#4426)
* Bump pylint from 2.15.10 to 2.16.2

Bumps [pylint](https://github.com/PyCQA/pylint) from 2.15.10 to 2.16.2.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.15.10...v2.16.2)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Lint

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-13 22:55:36 +00:00
Jesse Hills 4f4ca61ada Handle uart.write in json-config endpoint (#4430) 2023-02-14 11:38:21 +13:00
Jesse Hills dfeeccfcca Add version api endpoint (#4429) 2023-02-14 11:38:05 +13:00
dependabot[bot] b7ab00b699 Bump black from 22.12.0 to 23.1.0 (#4375)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-10 07:40:04 +13:00
Paulus Schoutsen 17ea0efb08 Verify rel_path output is relative (#4247) 2023-02-08 20:20:30 -05:00
Paulus Schoutsen d20d4947ac Remove unused manifest handler (#4169)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-09 13:41:59 +13:00
Jesse Hills 3facfa5c21 Allow dashboard import to specify if api encryption key should be generated (#4393) 2023-02-07 12:27:07 +13:00
Jesse Hills e847766514 Dump full parsed config to json-config api call (#4373) 2023-02-01 16:59:51 +13:00
Paulus Schoutsen 13cfe11a19 Add upload dashboard api (#4318) 2023-01-20 09:28:28 +13:00
Jesse Hills c301ae3645 Add friendly_name to device (#4296) 2023-01-17 10:28:09 +13:00
Paulus Schoutsen 27185265f6 Clean up dashboard ping result post-rename/delete (#4170) 2023-01-16 13:31:03 +13:00
Kuba Szczodrzyński 19bf9b1e36 Add API for dashboard to get boards list by platform (#4168)
* Add API for dashboard to get boards list by platform

* Dashboard API: add board list for ESP32 S2/S3/C3

* Dashboard API: remove endpoint for all boards

* Dashboard API: hide group titles for all platforms

* Dashboard API: fix Python lint

* Dashboard API: refactor /boards to use list output

* Dashboard API: filter boards for selected platform

* Dashboard API: do not duplicate esp32 boards

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-12-31 14:02:56 -05:00
Jesse Hills 6ad9baa870 Add API for dashboard to get boards list (#4154) 2022-12-07 16:07:51 +13:00
Jesse Hills 9370ff3dfa Allow dashboard import to pull complete file from github (#3982) 2022-12-07 07:29:56 +13:00
Nicolas Graziano f117d4f50a Dashboard, after login use relative url. (#4103) 2022-12-01 13:15:32 +13:00
Jesse Hills b184b01600 Remove a bunch of unnecessary pylint disabling (#4079) 2022-11-24 11:09:19 +13:00
Jesse Hills 7c8f502e7e Add option for dashboard command to only generate the project and supporting files (#3981) 2022-11-10 09:42:03 +13:00
Jesse Hills 6153bcc6ad Initial Support for RP2040 platform (#3284)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-20 16:50:39 +13:00
RoboMagus e87edcc77a Add API interface to request a complete device config as JSON. (#3911)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-10-19 23:39:34 -04:00
Jesse Hills fd57b21aff Dont add wifi block to yaml if discovered device uses ethernet (#3882) 2022-10-07 15:35:48 +13:00