Commit Graph

83 Commits

Author SHA1 Message Date
philippe44
f23116d2c6 GH desktop thought it was smart to CRLF all the pull 2022-09-26 19:58:50 -07:00
philippe44
ff1d276148 Update plugin (credits @mherger) 2022-09-25 11:32:11 -07:00
Michael Herger
1876b26100 Enable live EQ preview in Material skin (and Classic/EN)
* add JavaScript to submit the changes before storing them
* add input validation
* fix settings page loading in case of networking issues (which I suffered from when I tried to implement the above :-))
2022-09-24 18:42:02 +02:00
Philippe G
6f4ed0679e fix 32 bits sample size L/R swap - release
issue is in esp-idf
2021-09-11 21:40:10 -07:00
Philippe G
64bb5f018b Windows CRLF! 2021-04-28 18:00:05 -07:00
Philippe G
593927aac3 plugin update now on cmake (except repo.xml) 2021-04-28 17:29:28 -07:00
Michael Herger
5c56abfe75 Don't filter by HTTP verb - older firmwares are using GET rather than HEAD 2021-04-27 07:31:24 +02:00
Michael Herger
be28555a40 Fix backwards compatibility with "older" firmwares checking for the -99 magic number, rather than check.bin 2021-04-27 07:06:47 +02:00
Michael Herger
190326726c Add firmware upload handler to SqueezeESP32 plugin
* upload firmware image: `curl -vF 'data=@./someFirmwareImage.bin' http://localhost:9000/plugins/SqueezeESP32/firmware/upload` (or the JS equivalent, using multipart form data
* receive response: `{"url":"http://192.168.0.63:9000/plugins/SqueezeESP32/firmware/squeezelite-esp32-upload-b0w7mn.bin", "size":2463375}`
* install firmware from temporary URL returned
* uploads are removed after 15 minutes or upon LMS restart
2021-04-25 01:26:10 +02:00
Michael Herger
1a4a8ba559 Allow firmware installation from LMS' player settings page 2021-04-17 19:09:31 +02:00
Michael Herger
7ad39a02f5 Extend firmware download handler to serve locally built custom firmware, too.
Just save it as `squeezelite-esp32-custom.bin` in the firmware update folder (LMS Cache/updates) and paste http://yourlms:9000/plugins/SqueezeESP32/firmware/custom.bin in the firmware URL box.
2021-04-17 07:19:04 +02:00
Michael Herger
f96d06912f Fix LMS plugin availability check. As I removed the download by ID, this needs a tweak on the UI/JS side. 2021-04-17 06:32:09 +02:00
Michael Herger
36571d3dad Improve firmware download proxy
* initialize firmware pre-fetching when a player connects
* get firmware based on the player's version string as returned by `status.json`
* keep firmware file per platform/branch/resolution combination to support different squeezelite-ESP32 players in an installation
* remove handler to get firmware by numeric ID rather than filename
2021-04-17 06:27:25 +02:00
Michael Herger
b075bbaea3 Add link to the ESP32 WiFi Manager to the settings page in LMS. 2021-04-17 06:27:25 +02:00
Philippe G
3a2bfe470f show absolute battery level 2021-04-04 16:06:31 -07:00
Philippe G
f6b55c5ac9 voltage 2021-04-04 15:45:22 -07:00
Michael Herger
f9e97036cf Firmware proxy (#88)
* Add support for a firmware download proxy. This should help in situations where the player's firmware can't handle https correctly.

Two possibilities:
* full path to image: http://yourlms:9000/plugins/SqueezeESP32/firmware/ESP32-A1S.32.634.master-cmake/squeezelite-esp32-master-cmake-ESP32-A1S-32-V0.634.bin
* use Github's asset ID: http://yourlms:9000/plugins/SqueezeESP32/firmware/34298863

The former is more prone to issues related to the path. A change in the schema could break the matching regex.
The latter is simpler to use if you know the ID. But the ID is not easily available to the user. And it requires one more lookup in the plugin to get from the ID to the download path.

* Add support for proxying firmware downloads through LMS

* add magic asset ID -99 to allow the front-end to check whether the plugin does support download proxying
* web manager is expecting `lms_port` and `lms_ip` in `status.json`. If that's available, check whether plugin does support firmware downloading. If that's the case, download firmwares through LMS
* plugin would cache firmware images. In case of multiple images the file would be served directly from LMS.

* Add firmware pre-caching

* keep track of the most recently requested firmware build type
* poll Github for releases every ~6h
* download new firmware file for the same player model used before

Factor out firmware handling code to its own module.

Co-authored-by: Michael Herger <michael@herger.net>
2021-04-04 13:02:12 -04:00
Michael Herger
bc0d104290 Add support for a firmware download proxy (#85)
* Add support for a firmware download proxy. This should help in situations where the player's firmware can't handle https correctly.

Two possibilities:
* full path to image: http://yourlms:9000/plugins/SqueezeESP32/firmware/ESP32-A1S.32.634.master-cmake/squeezelite-esp32-master-cmake-ESP32-A1S-32-V0.634.bin
* use Github's asset ID: http://yourlms:9000/plugins/SqueezeESP32/firmware/34298863

The former is more prone to issues related to the path. A change in the schema could break the matching regex.
The latter is simpler to use if you know the ID. But the ID is not easily available to the user. And it requires one more lookup in the plugin to get from the ID to the download path.

* Add support for proxying firmware downloads through LMS

* add magic asset ID -99 to allow the front-end to check whether the plugin does support download proxying
* web manager is expecting `lms_port` and `lms_ip` in `status.json`. If that's available, check whether plugin does support firmware downloading. If that's the case, download firmwares through LMS
* plugin would cache firmware images. In case of multiple images the file would be served directly from LMS.

Co-authored-by: Michael Herger <michael@herger.net>
2021-04-03 21:01:40 -04:00
Philippe G
b3ff717d32 32 bits cleanup 2021-03-04 20:30:06 -08:00
Philippe G
c33c6187ca remove unused code + plugin update 2020-12-03 20:56:56 -08:00
Philippe G
99019cd22f mirror make branch changes on plugin (need to point there ...) 2020-12-02 14:06:49 -08:00
Philippe G
6ae47a908b add player type 101 - release 2020-10-06 22:28:01 -07:00
Philippe G
028a090864 update plugin files 2020-08-29 22:20:26 -07:00
Philippe G
8e599e2d21 fix plugin - release 2020-08-16 00:09:20 -07:00
Philippe G
db6924deb6 update plugin 2020-08-15 19:04:32 -07:00
Philippe G
a5a0cbc557 brightness log 0..5 + log - release 2020-05-27 17:01:33 -07:00
Philippe G
edf1d454a2 enable "remote" menu in settings 2020-05-10 14:51:11 -07:00
Philippe G
bbe62352a2 CRLF in strings.txt - grrr! 2020-05-10 12:04:38 -07:00
Philippe G
f01d746e9b plugin clean-up, add equalizer auto-update, add CLI for equalizer - Thanks Michael! 2020-05-10 11:51:02 -07:00
philippe44
2821a85328 Merge pull request #26 from michaelherger/live-eq
Make the EQ in player settings update the player in "real time"
2020-05-10 10:45:07 -07:00
Michael Herger
90860afe3d As spectrum and artwork prefs are not handled by the default Settings handler we can't expect the values to be in the prefs element. 2020-05-10 11:17:24 +02:00
Michael Herger
192847af89 Make the EQ in player settings update the player in "real time" as you change the values. 2020-05-08 13:42:40 +02:00
philippe44
be00683b66 Merge pull request #24 from michaelherger/fix-no-display-use-case-and-some
Fix #23 - fix some issues when SqueezeAmp doesn't have a display
2020-05-06 19:34:40 -07:00
Michael Herger
fd16af1ae6 We need to wrap the callback to make it unique. Otherwise subscriptions would overwrite each other. 2020-05-06 06:17:00 +02:00
Michael Herger
5e00288f11 German Translation 2020-05-05 23:04:12 +02:00
Michael Herger
9f23b79818 Fix some issues when SqueezeAmp doesn't have a display
* only push simple prefs on the list of automatically managed items - hashes and lists can't be managed by the Settings super class
* only push display/artwork related prefs on the list if deal with a player which has a display
* move most artwork/display handling code out of the plugin to the Player class
* rename `eq` pref to `equalizer`, as `eq` is a reserved word
* automatically update the player when the `equalizer` pref is changed
* strip down Plugin to the bare minimum needed with any SqueezeAMP, no matter whether it has a display or not
2020-05-05 22:45:54 +02:00
Philippe G
7a44e379ed set defautl value in settings 2020-04-22 14:59:39 -07:00
Philippe G
e0e309c4ed equalizer w/o display 2020-04-17 14:54:39 -07:00
Philippe G
30454bbd0c player.html was missing - release 2020-04-17 08:35:02 -07:00
Philippe G
394d6b6465 equalizer - release 2020-04-17 08:03:17 -07:00
Philippe G
402da30bea forgot SHA1 2020-04-02 17:22:42 -07:00
Philippe G
c994c5f3e3 tweak for square displays & vertical VU - release 2020-04-02 17:07:54 -07:00
Philippe G
26330ee69e add SSD1322 + few tweaks - release 2020-04-01 20:03:57 -07:00
philippe44
3eb2c76d6b set height before building modes 2020-03-22 20:23:51 -07:00
philippe44
6342e7b824 add analogue VU - release 2020-03-22 19:59:44 -07:00
philippe44
fb499982c2 better screensaver handling - release 2020-03-21 13:24:26 -07:00
philippe44
ff40290610 handle "generic" visualizer - release 2020-03-20 23:55:26 -07:00
philippe44
b5199650ff notification correction 2020-03-19 17:16:43 -07:00
philippe44
755386c6ec html file was not updated 2020-03-19 16:23:36 -07:00
philippe44
606f1983c5 artwork support - release 2020-03-19 16:13:59 -07:00