diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 4a4828f8..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.all-contributorsrc b/.all-contributorsrc deleted file mode 100644 index 4634398d..00000000 --- a/.all-contributorsrc +++ /dev/null @@ -1,276 +0,0 @@ -{ - "files": [ - "README.md" - ], - "imageSize": 100, - "commit": false, - "commitConvention": "angular", - "contributors": [ - { - "login": "alxblog", - "name": " Alexandre ", - "avatar_url": "https://avatars.githubusercontent.com/u/3979539?v=4", - "profile": "https://github.com/alxblog", - "contributions": [ - "code" - ] - }, - { - "login": "MonoAnji", - "name": "René Pasold", - "avatar_url": "https://avatars.githubusercontent.com/u/16881074?v=4", - "profile": "https://github.com/MonoAnji", - "contributions": [ - "code" - ] - }, - { - "login": "aaronse", - "name": "aaron GitHub", - "avatar_url": "https://avatars.githubusercontent.com/u/16479976?v=4", - "profile": "https://github.com/aaronse", - "contributions": [ - "code" - ] - }, - { - "login": "Pavulon87", - "name": "Pavulon87", - "avatar_url": "https://avatars.githubusercontent.com/u/23641103?v=4", - "profile": "https://github.com/Pavulon87", - "contributions": [ - "bug", - "code" - ] - }, - { - "login": "MitchBradley", - "name": "Mitch Bradley", - "avatar_url": "https://avatars.githubusercontent.com/u/4861133?v=4", - "profile": "https://honuputters.com", - "contributions": [ - "ideas", - "code" - ] - }, - { - "login": "cotepat", - "name": "Patrice Côté", - "avatar_url": "https://avatars.githubusercontent.com/u/29361809?v=4", - "profile": "https://www.facebook.com/Patricecotemusique/", - "contributions": [ - "code" - ] - }, - { - "login": "Engineer2Designer", - "name": "E2D", - "avatar_url": "https://avatars.githubusercontent.com/u/25747949?v=4", - "profile": "http://engineer2designer.blogspot.com", - "contributions": [ - "translation" - ] - }, - { - "login": "duramson", - "name": "Cedrik Theesen", - "avatar_url": "https://avatars.githubusercontent.com/u/24916321?v=4", - "profile": "http://cedrik-theesen.de", - "contributions": [ - "translation" - ] - }, - { - "login": "royfocker19", - "name": "royfocker19", - "avatar_url": "https://avatars.githubusercontent.com/u/39307144?v=4", - "profile": "https://github.com/royfocker19", - "contributions": [ - "doc" - ] - }, - { - "login": "BToersche", - "name": "Bart Toersche", - "avatar_url": "https://avatars.githubusercontent.com/u/16536432?v=4", - "profile": "https://github.com/BToersche", - "contributions": [ - "code" - ] - }, - { - "login": "vivian-ng", - "name": "vivian-ng", - "avatar_url": "https://avatars.githubusercontent.com/u/24537694?v=4", - "profile": "https://github.com/vivian-ng", - "contributions": [ - "code" - ] - }, - { - "login": "drzejkopf", - "name": "drzejkopf", - "avatar_url": "https://avatars.githubusercontent.com/u/41212609?v=4", - "profile": "https://github.com/drzejkopf", - "contributions": [ - "translation" - ] - }, - { - "login": "lucmoda", - "name": "Luciano Charles Moda", - "avatar_url": "https://avatars.githubusercontent.com/u/6072702?v=4", - "profile": "http://www.gtmax.com.br", - "contributions": [ - "translation" - ] - }, - { - "login": "leseaw", - "name": "AxelB", - "avatar_url": "https://avatars.githubusercontent.com/u/8026764?v=4", - "profile": "https://youprintin3d.de", - "contributions": [ - "translation" - ] - }, - { - "login": "Zefram88", - "name": "Zefram88", - "avatar_url": "https://avatars.githubusercontent.com/u/40454706?v=4", - "profile": "https://github.com/Zefram88", - "contributions": [ - "translation" - ] - }, - { - "login": "3d-gussner", - "name": "3d-gussner", - "avatar_url": "https://avatars.githubusercontent.com/u/25530011?v=4", - "profile": "https://github.com/3d-gussner", - "contributions": [ - "translation" - ] - }, - { - "login": "aganov", - "name": "Alex Ganov", - "avatar_url": "https://avatars.githubusercontent.com/u/176610?v=4", - "profile": "http://aganov.github.io", - "contributions": [ - "ideas", - "code", - "mentoring" - ] - }, - { - "login": "bdring", - "name": "bdring", - "avatar_url": "https://avatars.githubusercontent.com/u/189677?v=4", - "profile": "https://github.com/bdring", - "contributions": [ - "financial", - "bug", - "platform" - ] - }, - { - "login": "ArturNadolski", - "name": "n4d01", - "avatar_url": "https://avatars.githubusercontent.com/u/20038314?v=4", - "profile": "https://github.com/ArturNadolski", - "contributions": [ - "translation" - ] - }, - { - "login": "ewidance", - "name": "Jean-Philippe CIVADE", - "avatar_url": "https://avatars.githubusercontent.com/u/2135006?v=4", - "profile": "https://www.civade.com", - "contributions": [ - "translation" - ] - }, - { - "login": "kondorzs", - "name": "kondorzs", - "avatar_url": "https://avatars.githubusercontent.com/u/15940476?v=4", - "profile": "https://github.com/kondorzs", - "contributions": [ - "translation" - ] - }, - { - "login": "onekk", - "name": "Carlo", - "avatar_url": "https://avatars.githubusercontent.com/u/7129964?v=4", - "profile": "https://github.com/onekk", - "contributions": [ - "translation" - ] - }, - { - "login": "zrwd01", - "name": "zrwd01", - "avatar_url": "https://avatars.githubusercontent.com/u/33946060?v=4", - "profile": "https://github.com/zrwd01", - "contributions": [ - "translation" - ] - }, - { - "login": "Wesie", - "name": "Wesie", - "avatar_url": "https://avatars.githubusercontent.com/u/9315139?v=4", - "profile": "https://github.com/Wesie", - "contributions": [ - "translation" - ] - }, - { - "login": "DusDus", - "name": "DusDus", - "avatar_url": "https://avatars.githubusercontent.com/u/69902032?v=4", - "profile": "https://github.com/DusDus", - "contributions": [ - "translation" - ] - }, - { - "login": "nyarurato", - "name": "nyarurato", - "avatar_url": "https://avatars.githubusercontent.com/u/8384007?v=4", - "profile": "https://github.com/nyarurato", - "contributions": [ - "translation" - ] - }, - { - "login": "terjeio", - "name": "Terje Io", - "avatar_url": "https://avatars.githubusercontent.com/u/20260062?v=4", - "profile": "https://github.com/terjeio", - "contributions": [ - "ideas", - "code", - "translation" - ] - }, - { - "login": "V1EngineeringInc", - "name": "Ryan V1", - "avatar_url": "https://avatars.githubusercontent.com/u/55478432?v=4", - "profile": "https://www.v1engineering.com/", - "contributions": [ - "financial" - ] - } - ], - "contributorsPerLine": 7, - "skipCi": true, - "repoType": "github", - "repoHost": "https://github.com", - "projectName": "ESP3D-WEBUI", - "projectOwner": "luc-github" -} diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 8115aaf8..d94db559 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,12 +1,12 @@ # These are supported funding model platforms -#github: luc-github +#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] #patreon: # Replace with a single Patreon username #open_collective: # Replace with a single Open Collective username -ko_fi: esp3d # Replace with a single Ko-fi username +#ko_fi: # Replace with a single Ko-fi username #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: ESP3D +#liberapay: # Replace with a single Liberapay username #issuehunt: # Replace with a single IssueHunt username #otechie: # Replace with a single Otechie username -custom: https://www.paypal.com/donate/?hosted_button_id=FQL59C749A78L +custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WWLSJZ97FV834 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 1f04ca49..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Wiki - url: https://github.com/luc-github/ESP3D-WEBUI/wiki - about: The Wiki has lot of informations. - - name: Discord chat - url: https://discord.gg/Z4ujTwE - about: Join the discord for support and discussion. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 50a5d481..00000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Question -about: Ask your question, if not bug neither feature request. -title: "[Question]" -labels: Question -assignees: '' - ---- - -What is your question ? diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index 9fa916f8..00000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Greetings - -on: [pull_request, issues] - -jobs: - greeting: - runs-on: ubuntu-latest - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: 'Thank your for submiting, please be sure you followed template or your issue may be dismissed.' - pr-message: 'Thank you for your contribution, be patient, review can take a time.' diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml deleted file mode 100644 index e72d9967..00000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: 'Lock threads' - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v2 - with: - github-token: ${{ github.token }} - issue-lock-inactive-days: '10' - issue-exclude-created-before: '' - issue-exclude-labels: 'planned' - issue-lock-labels: 'outdated' - issue-lock-comment: 'This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.' - issue-lock-reason: 'resolved' - pr-lock-inactive-days: '365' - pr-exclude-created-before: '' - pr-exclude-labels: '' - pr-lock-labels: '' - pr-lock-comment: '' - pr-lock-reason: 'resolved' - process-only: 'issues' diff --git a/.gitignore b/.gitignore index 174a26d0..bfd8348f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.idea node_modules -dist -src +.vscode +build diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..e8baaea6 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +14.16.1 \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..1e7a213e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,28 @@ +{ + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "semi": false, + "singleQuote": true, + "jsxSingleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "always", + "requirePragma": false, + "insertPragma": false, + "proseWrap": "preserve", + "overrides": [ + { + "files": "*.js", + "options": { + "parser": "babel" + } + }, + {"files": "*.scss", + "options": { + "parser": "css" + } + } + ] +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8aa8e261..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js -node_js: - - "lts/*" -cache: - directories: - - "node_modules" -sudo: false -install: - - npm install --global gulp-cli - - npm install --global gulp@4.0.0 - - npm install -script: - - echo "build index.html" - - gulp package - -notifications: - email: - on_success: change - on_failure: change diff --git a/Changelog.txt b/Changelog.txt deleted file mode 100644 index e86bd059..00000000 --- a/Changelog.txt +++ /dev/null @@ -1,39 +0,0 @@ -## What's Changed - -# Fixes -* Fix wrong source show in file panel -* Fix SSID with ' not properly transfered from dialog box to control -* Fix macro panel overload UI on some resolutions -* Fix moving buttons in grbl -* Fix SD icon and create dir displayed on GRBL thanks @Wesie -* Fix Abort button for marlin-embedded and marlinkimbra thanks @GerogeFu -* Fix always need to save preferences even no change -* Fix display glitch -* Fix Repetier ok 0 still visible with verbose mode off -* Fix Setup not working anymore due to breaking changes in GRBL_ESP32 -* Fix T is not T0 when heating T1 and so display wrong value thanks @Drzet -* Fix typo thanks @terjeio -* Fix bug with pure GRBL no receiving commands feedback thanks @jjhamb -* Fix pur GRBL not managing positions properly -* Fix some typo - thanks @kondorzs -* Fix smoothieware cannot list sub directory - thanks @sns5400 -* Fix missing translation for SD - -# Additions -* Add ; Linear Units: as legend for G21 in Marlin -* Add more filter to files list if unwished output pop up thanks @badbod -* Add Surfacing Wizard (GRBL panel) thanks @cotepat -* Add BTT USB DISK and onBoard SD support -* Add firmware checks for temperature controls -* Add support for Marlin T0 redundant, probe and chamber temperatures - thanks @BToersche -* Add bin.gz as accepted extension for FW update - -# New languages / update -* Add Turkish language thanks @DusDus -* Add Hungarian thanks @kondorzs -* Add Traditional Chinese. thanks @Engineer2Designer -* Add Japanese language thanks @nyarurato -* Update German language thanks @Wesie -* Update German language thanks @duramson - -**Full Changelog**: https://github.com/luc-github/ESP3D-WEBUI/compare/v2.1...V2.1.1 \ No newline at end of file diff --git a/ESP3D-WebUI-features.xls b/ESP3D-WebUI-features.xls new file mode 100644 index 00000000..11bcf63f Binary files /dev/null and b/ESP3D-WebUI-features.xls differ diff --git a/Features.md b/Features.md new file mode 100644 index 00000000..cd933726 --- /dev/null +++ b/Features.md @@ -0,0 +1,76 @@ +# V3 Features + +## Global Features + +- Firmware update +- WebUI update +- List of enabled features /capabilities +- Wifi configuration +- Features configuration +- WebUI features configuration +- Haptic feedback +- Audio feedback +- Terminal commands +- Emmergency stop +- Pluggins support +- Themes support (CSS) +- Language packs support +- Macro commands +- Local FS listing / content management +- External pages/panel support +- PC / Tablet / phone UI +- IP Camera & ESP32 Camera display support +- Import / Export settings +- Restart board support +- Monolitic small footprint +- Single user management support (auto close if not latest connected) +- Authentication support (admin / user) +- Configuration wizard (TBD) +- Firmware supported (3DPrinter / CNC / SandTable): + - ESP3D V3.x: + - Marlin (1.x / 2.x) + - Smoothieware (1.x / 2.x) + - Repetier (1.x / 2.x) + - GRBL (1.1h) + - ESP3D-TFT (ESP3D) + - ESP3DLib + - Marlin (2.x) - currently need custom version of Marlin : https://github.com/luc-github/Marlin/tree/ESP3DLibV3.0 + - grblHAL (ongoing) + - Makerbase TFT (ESP3D) + - Bigtreetech TFT (ESP3D) +- Firmware NOT yet supported: + - Reprap + +## 3D Printer Features + +- Target firmware configuration +- Jog control / monitoring +- Temperatures control / monitoring +- Additionnal sensors support +- Chart support for temperatures / sensors +- Multiple extruder support +- Target Firmware SD listing / content management (if supported) +- TFT SD/USB listing / content management (if supported) +- Fan control / monitoring (if supported) +- Flow rate control / monitoring (if supported) +- Feed rate control / monitoring (if supported) +- Print control / monitoring +- More to come... + +## CNC Features + +- Target firmware configuration +- Jog control / monitoring +- Laser control +- Spindle control +- Status monitoring +- Probing control / monitoring +- Code streaming using ESP3D V3 +- More to come... + +## Sand Table Features + +- Target firmware configuration +- Jog control / monitoring +- Status monitoring +- More to come... diff --git a/Memo/Commands.md b/Memo/Commands.md new file mode 100644 index 00000000..6e5e7829 --- /dev/null +++ b/Memo/Commands.md @@ -0,0 +1,310 @@ +# Direct ESP3D commands (V3.x) + +## Conventions + +1 - add space to separate parameters +2 - if parameter has space add \\ in front of space to not be seen as separator +3 - json json=YES json=TRUE json=1 are paremeters to switch output to json +By default output is plain text, to get json formated output +add json or json=yes after main parameters +The json format is { +cmd:"", //the id of requested command +status:"" //give if it is success or an failure +data:"" // response corresponding to answer in json format too +} + +## Commands + +- Show commands help + `[ESP] json=` + +- Set/Get STA SSID + `[ESP100] json= pwd=` + +- Set STA Password + `[ESP101] json= pwd=` + +- Set/Get STA IP mode (DHCP/STATIC) + `[ESP102] json= pwd=` + +- Set/Get STA IP/Mask/GW/DNS + `[ESP103]IP= MSK= GW= DNS= json= pwd=` + +- Set/Get sta fallback mode which can be WIFI-AP, BT, OFF + `[ESP104] json= pwd=` + +- Set/Get AP SSID + `[ESP105] json= pwd=` + +- Change AP Password + `[ESP106] json= pwd=` + +- Set/Get AP IP + `[ESP107] json= pwd=` + +- Set/Get AP channel + `[ESP108] json= pwd=` + +- Set/Get radio state which can be WIFI-STA, WIFI-AP, BT, ETH-STA, ETH-AP, OFF + `[ESP110] json= pwd=` + +- Get current IP + `[ESP111]json=` + +- Get/Set hostname + `[ESP112] json= pwd=` + +- Get /Set Boot radio state which can be ON, OFF + `[ESP114] json= pwd=` + +- Get/Set immediate network(WiFi/BT/Ethernet) state which can be ON, OFF + `[ESP115] json= pwd=` + +- Get/Set HTTP state which can be ON, OFF + `[ESP120] json= pwd=` + +- Get/Set HTTP port + `[ESP121] json= pwd=` + +- Get/Set Telnet state which can be ON, OFF, CLOSE + `[ESP130] json= pwd=` + +- Get/Set Telnet port + `[ESP131] json= pwd=` + +- Sync / Set / Get current time + `[ESP140] json= pwd=` + +- Get/Set display/set boot delay in ms / Verbose boot + `[ESP150]pwd=` + +- Get/Set WebSocket state which can be ON, OFF + `[ESP160] json= pwd=` + +- Get/Set WebSocket port + `[ESP161] json= pwd=` + +- Get/Set Camera command value / list all values in JSON/plain + label can be: light/framesize/quality/contrast/brightness/saturation/gainceiling/colorbar/awb/agc/aec/hmirror/vflip/awb_gain/agc_gain/aec_value/aec2/cw/bpc/wpc/raw_gma/lenc/special_effect/wb_mode/ae_level + `[ESP170] json= pwd=` + +- Save frame to target path and filename (default target = today date, default name=timestamp.jpg) + `[ESP171] ` + +- Get/Set Ftp state which can be ON, OFF, CLOSE + `[ESP180] json= pwd=` + +- Get/Set Ftp ports + `[ESP181]ctrl= active= passive= json= pwd=` + +- Get/Set WebDav state which can be ON, OFF, CLOSE + `[ESP190] json= pwd=` + +- Get/Set WebDav port + `[ESP191] json= pwd=` + +- Get/Set SD Card Status + `[ESP200] json= pwd=` + `RELEASE` will force the release of SD from ESP3D if SD is shared + `REFRESH` will refresh the SD info is available` + +- Get/Set pin value + `[ESP201]P= V= [PULLUP=YES RAW=YES ANALOG=NO ANALOG_RANGE=255]pwd=` + + - if no V= get P= value + - if V= 0/1 set INPUT_PULLUP value, but for GPIO16(ESP8266) INPUT_PULLDOWN_16 + - if PULLUP=YES set input pull up (for GPIO16(ESP8266) INPUT_PULLDOWN_16), if not set input + - if RAW=YES do not set pinmode just read value + + Note: Flash pins according chip cannot be used + +- Get/Set SD card Speed factor 1 2 4 6 8 16 32 + `[ESP202]SPEED= json= pwd=` + +- Get Sensor Value / type/Set Sensor type + `[ESP210] json= pwd=` + +- Output to esp screen status + `[ESP214] json= pwd=` + +- Touch Calibration + `[ESP215] json= pwd=` + +- Show defined pins + `[ESP220] json= pwd=` + +- Play sound + `[ESP250]F= D= json= pwd=` + Note: No parameter just play beep + +- Delay command + `[ESP290] json=pwd=` + +- Get full EEPROM settings content + `[ESP400] pwd=` + Note: do not give any passwords + +\*Set EEPROM setting + position in EEPROM, type: B(byte), I(integer/long), S(string), A(IP address / mask) + `[ESP401]P= T= V= json= pwd=` + +``` + Description: Positions: + ESP_RADIO_MODE 0 //1 byte = flag + ESP_STA_SSID 1 //33 bytes 32+1 = string ; warning does not support multibyte char like chinese + ESP_STA_PASSWORD 34 //65 bytes 64 +1 = string ;warning does not support multibyte char like chinese + ESP_STA_IP_MODE 99 //1 byte = flag + ESP_STA_IP_VALUE 100 //4 bytes xxx.xxx.xxx.xxx + ESP_STA_MASK_VALUE 104 //4 bytes xxx.xxx.xxx.xxx + ESP_STA_GATEWAY_VALUE 108 //4 bytes xxx.xxx.xxx.xxx + ESP_BAUD_RATE 112 //4 bytes = int + ESP_NOTIFICATION_TYPE 116 //1 byte = flag + ESP_CALIBRATION 117 //1 byte = flag + ESP_AP_CHANNEL 118 //1 byte = flag + ESP_BUZZER 119 //1 byte = flag + ESP_INTERNET_TIME 120 //1 byte = flag + ESP_HTTP_PORT 121 //4 bytes = int + ESP_TELNET_PORT 125 //4 bytes = int + ESP_SERIAL_FLAG 129 //1 bytes = flag + ESP_HOSTNAME 130 //33 bytes 32+1 = string ; warning does not support multibyte char like chinese + ESP_SENSOR_INTERVAL 164 //4 bytes = int + ESP_SETTINGS_VERSION 168 //8 bytes = 7+1 = string ESP3D + 2 digits + ESP_ADMIN_PWD 176 //21 bytes 20+1 = string ; warning does not support multibyte char like chinese + ESP_USER_PWD 197 //21 bytes 20+1 = string ; warning does not support multibyte char like chinese + ESP_AP_SSID 218 //33 bytes 32+1 = string ; warning does not support multibyte char like chinese + ESP_AP_PASSWORD 251 //65 bytes 64 +1 = string ;warning does not support multibyte char like chinese + ESP_AP_IP_VALUE 316 //4 bytes xxx.xxx.xxx.xxx + ESP_BOOT_DELAY 320 //4 bytes = int + ESP_WEBSOCKET_PORT 324 //4 bytes= int + ESP_HTTP_ON 328 //1 byte = flag + ESP_TELNET_ON 329 //1 byte = flag + ESP_WEBSOCKET_ON 330 //1 byte = flag + ESP_SD_SPEED_DIV 331 //1 byte = flag + ESP_NOTIFICATION_TOKEN1 332 //64 bytes 63+1 = string ; warning does not support multibyte char like chinese + ESP_NOTIFICATION_TOKEN2 396 //64 bytes 63+1 = string ; warning does not support multibyte char like chinese + ESP_SENSOR_TYPE 460 //1 bytes = flag + ESP_TARGET_FW 461 //1 bytes = flag + ESP_TIMEZONE 462 //1 bytes = flag + ESP_TIME_IS_DST 463 //1 bytes = flag + ESP_TIME_SERVER1 464 //129 bytes 128+1 = string ; warning does not support multibyte char like chinese + ESP_TIME_SERVER2 593 //129 bytes 128+1 = string ; warning does not support multibyte char like chinese + ESP_TIME_SERVER3 722 //129 bytes 128+1 = string ; warning does not support multibyte char like chinese + ESP_REMOTE_SCREEN 851 //1 bytes = flag + ESP_SD_MOUNT 852 //1 bytes = flag + ESP_SESSION_TIMEOUT 853 //1 bytes = flag + ESP_WEBSOCKET_FLAG 854 //1 bytes = flag + ESP_SD_CHECK_UPDATE_AT_BOOT 855//1 bytes = flag + ESP_NOTIFICATION_SETTINGS 856 //129 bytes 128+1 = string ; warning does not support multibyte char like chinese + ESP_CALIBRATION_1 985 //4 bytes = int + ESP_CALIBRATION_2 989 //4 bytes = int + ESP_CALIBRATION_3 993 //4 bytes = int + ESP_CALIBRATION_4 997 //4 bytes = int + ESP_CALIBRATION_5 1001 //4 bytes = int + ESP_SETUP 1005 //1 byte = flag + ESP_TELNET_FLAG 1006 //1 byte = flag + ESP_BT_FLAG 1007 //1 byte = flag + ESP_SCREEEN_FLAG 1008 //1 byte = flag + ESP_FTP_CTRL_PORT 1009 //4 bytes = int + ESP_FTP_DATA_ACTIVE_PORT 1013 //4 bytes = int + ESP_FTP_DATA_PASSIVE_PORT 1017 //4 bytes = int + ESP_FTP_ON 1021 //1 byte = flag + ESP_AUTO_NOTIFICATION 1022 //1 byte = flag + ESP_VERBOSE_BOOT 1023 //1 byte = flag + ESP_WEBDAV_ON 1024 //1 byte = flag + ESP_WEBDAV_PORT 1025 //4 bytes = int + ESP_STA_DNS_VALUE 1029 //4 bytes= int + ESP_SECURE_SERIAL 1033 //1 byte = flag + ESP_SERIAL_BRIDGE_ON 1036 //1 byte = flag + ESP_SERIAL_BRIDGE_FLAG 1037 //1 byte = flag + ESP_SERIAL_BRIDGE_BAUD 1038 //4 bytes= int +``` + +- Get/Set Check update at boot state which can be ON, OFF + `[ESP402] json= pwd=` + +- Get available AP list (limited to 30) + output is JSON or plain text according parameter + `[ESP410]json= ` + +- Get current settings of ESP3D + Output is JSON or plain text according parameter + `[ESP420]json= ` + +- Set ESP State + `cmd` can be `RESTART` to restart board or `RESET` to reset all setting to defaults values + `[ESP444] json= ` + +- Get available ESP3D list + output is JSON or plain text according parameter + `[ESP450]json= ` + +- Change admin password + `[ESP550] json= pwd=` + +- Change user password + `[ESP555] json= pwd=` + +- Send Notification + `[ESP600]msg json= pwd=` + +- Set/Get Notification settings + `[ESP610]type= T1= T2= TS= json= [pwd=]` + Get will give type and settings only, not the protected T1/T2 + +- Send Notification using URL + `[ESP620]URL= json= pwd=` + +- Read / Stream / Process FS file + `[ESP700] json= pwd=` + +- Query and Control ESP700 stream + `[ESP701]action= json= pwd=` + +- Format ESP Filesystem + `[ESP710]FORMATFS json= pwd=` + +- Format SD Filesystem + `[ESP715]FORMATSD json= pwd=` + +- List ESP Filesystem + `[ESP720] json= pwd=` + +- Action on ESP Filesystem + Action can be `rmdir` to remove empty directory / `remove` to delete file / `mkdir` to create directory / `exists` to check if file or directory exists / `create` create an empty file + `[ESP730]= json= pwd=` + +- List SD Filesystem + `[ESP740] json= pwd=` + +- Action on SD Filesystem + Action can be `rmdir` to remove empty directory / `remove` to delete file / `mkdir` to create directory / `exists` to check if file or directory exists / `create` create an empty file + `[ESP750]= json= pwd=` + +- List Global Filesystem + `[ESP780] json= pwd=` + +- Action on Global Filesystem + Action can be `rmdir` to remove empty directory / `remove` to delete file / `mkdir` to create directory / `exists` to check if file or directory exists / `create` create an empty file + `[ESP790]= json= pwd=` + +- FW Informations + `[ESP800]json= pwd= ` + +- Get state / Set Enable / Disable Serial Communication + `[ESP900] json= pwd=` +- Get / Set Serial Baud Rate + `[ESP901] json= pwd=` + +- Get state / Set Enable / Disable buzzer + `[ESP910] json= pwd=` + +- Get state / Set state of output message clients + `[ESP920]= json= pwd=` + +- Get state / Set Enable / Disable Serial Bridge Communication + `[ESP930] json= pwd=` +- Get / Set Serial Bridge Baud Rate + `[ESP931] json= pwd=` + +- Set quiet boot if strapping pin is High + `[ESP999]QUIETBOOT pwd=` diff --git a/Memo/ESP3D [ESP400] format.md b/Memo/ESP3D [ESP400] format.md new file mode 100644 index 00000000..d42fe366 --- /dev/null +++ b/Memo/ESP3D [ESP400] format.md @@ -0,0 +1,102 @@ +# ESP3D [ESP400] format + +Only sent in JSON format + +``` +{"cmd":"400","status":"ok","data":[ +{"F":"network/network","P":"130","T":"S","V":"esp3d","H":"hostname","S":"32","M":"1"}, +{"F":"network/network","P":"0","T":"B","V":"1","H":"radio mode","O":[{"none":"0"}, +{"sta":"1"}, +{"ap":"2"}]}, +{"F":"network/sta","P":"1","T":"S","V":"WIFI_OFFICE_B2G","S":"32","H":"SSID","M":"1"}, +{"F":"network/sta","P":"34","T":"S","N":"1","V":"********","S":"64","H":"pwd","M":"8"}, +{"F":"network/sta","P":"99","T":"B","V":"1","H":"ip mode","O":[{"dhcp":"1"}, +{"static":"0"}]}, +{"F":"network/sta","P":"100","T":"A","V":"192.168.0.1","H":"ip"}, +{"F":"network/sta","P":"108","T":"A","V":"192.168.0.1","H":"gw"}, +{"F":"network/sta","P":"104","T":"A","V":"255.255.255.0","H":"msk"}, +{"F":"network/ap","P":"218","T":"S","V":"ESP3D","S":"32","H":"SSID","M":"1"}, +{"F":"network/ap","P":"251","T":"S","N":"1","V":"********","S":"64","H":"pwd","M":"8"}, +{"F":"network/ap","P":"316","T":"A","V":"192.168.0.1","H":"ip"}, +{"F":"network/ap","P":"118","T":"B","V":"11","H":"channel","O":[{"1":"1"}, +{"2":"2"}, +{"3":"3"}, +{"4":"4"}, +{"5":"5"}, +{"6":"6"}, +{"7":"7"}, +{"8":"8"}, +{"9":"9"}, +{"10":"10"}, +{"11":"11"}, +{"12":"12"}, +{"13":"13"}, +{"14":"14"}]}, +{"F":"service/http","P":"328","T":"B","V":"1","H":"enable","O":[{"no":"0"}, +{"yes":"1"}]}, +{"F":"service/http","P":"121","T":"I","V":"80","H":"port","S":"65001","M":"1"}, +{"F":"service/telnetp","P":"329","T":"B","V":"1","H":"enable","O":[{"no":"0"}, +{"yes":"1"}]}, +{"F":"service/telnetp","P":"125","T":"I","V":"23","H":"port","S":"65001","M":"1"}, +{"F":"service/ftp","P":"1021","T":"B","V":"1","H":"enable","O":[{"no":"0"}, +{"yes":"1"}]}, +{"F":"service/ftp","P":"1009","T":"I","V":"21","H":"control port","S":"65001","M":"1"}, +{"F":"service/ftp","P":"1013","T":"I","V":"20","H":"active port","S":"65001","M":"1"}, +{"F":"service/ftp","P":"1017","T":"I","V":"55600","H":"passive port","S":"65001","M":"1"}, +{"F":"service/notification","P":"1004","T":"B","V":"1","H":"auto notif","O":[{"no":"0"}, +{"yes":"1"}]}, +{"F":"service/notification","P":"116","T":"B","V":"0","H":"notification","O":[{"none":"0"}, +{"pushover":"1"}, +{"email":"2"}, +{"line":"3"}]}, +{"F":"service/notification","P":"332","T":"S","V":"********","S":"63","H":"t1","M":"0"}, +{"F":"service/notification","P":"396","T":"S","V":"********","S":"63","H":"t2","M":"0"}, +{"F":"service/notification","P":"855","T":"S","V":" ","S":"127","H":"ts","M":"0"}, +{"F":"system/system","P":"461","T":"B","V":"40","H":"targetfw","O":[{"repetier":"50"}, +{"marlin":"20"}, +{"smoothieware":"40"}, +{"grbl":"10"}, +{"unknown":"0"}]}, +{"F":"system/system","P":"112","T":"I","V":"115200","H":"baud","O":[{"9600":"9600"}, +{"19200":"19200"}, +{"38400":"38400"}, +{"57600":"57600"}, +{"74880":"74880"}, +{"115200":"115200"}, +{"230400":"230400"}, +{"250000":"250000"}, +{"500000":"500000"}, +{"921600":"921600"}]}, +{"F":"system/system","P":"320","T":"I","V":"10000","H":"bootdelay","S":"40000","M":"0"}, +]} +``` + +1 - key : `Settings` +2 - value: array of data formated like this +{"F":"network/network","P":"130","T":"S","V":"esp3d","H":"hostname","S":"32","M":"1"} +or +{"F":"service/notification","P":"1004","T":"B","V":"1","H":"auto notif","O":[{"no":"0"},{"yes":"1"}]} + + - F: is filter formated as section/sub-section, if section is same as sub-section, it means no sub-section + - P: is id (also position reference so it is unique) + - T: is type of data which can be: + - S: for string + - I: for integer + - B: for Byte + - A: for IP address / Mask + - F: for float (only grblHAL) + - M: for bits mask (only grblHAL) + - X: for exclusive bitsfield (only grblHAL) + - V: is current value, if type is string and value is `********`, (8 stars) then it is a password + - E: is integer for exactess / precision of float/double value (only grblHAL) + - U: is text unit of value (only grblHAL) + - H: is text label of value + - S: is max size if type is string, and max possible value if value is number (byte, integer) + - M: is min size if type is string, and min possible value if value is number (byte, integer) + - MS: is additionnal min size if type is string (e.g for password can be 0 or 8, so need additional min size), M should be the more minimal value + so MS value must be between M and S + - O: is an array of {label:value} used for possible values in selection or bits labels list + - R: need restart to be applied + +Note: if Type `M` and `X` use `O` entry to define the label / position, if `O` is `[]` then axis label are used according need `X`, `Y`, `Z`, `A`, `B`, `C` +Note2 : the 2.1 Flag type is no more used, several entries are used instead grouped by sub-section diff --git a/Memo/ESP3D [ESP401] format.md b/Memo/ESP3D [ESP401] format.md new file mode 100644 index 00000000..b99c1be6 --- /dev/null +++ b/Memo/ESP3D [ESP401] format.md @@ -0,0 +1,22 @@ +# ESP3D [ESP401] format + +WebUI need use json format to get propelry formated answer +As described in Commands.md: + +## Conventions + +1 - add space to separate parameters +2 - if parameter has space add \\ in front of space to not be seen as separator +3 - json json=YES json=TRUE json=1 are paremeters to switch output to json +By default output is plain text, to get json formated output +add json or json=yes after main parameters +The json format is { +cmd:"<401>", //the id of requested command +status:"" //give if it is success or an failure +data:"the position of setting" +} + +Example +`[ESP401]P=1 T=S V=My\ SSID json` +you will get the following if ok +`{"cmd":"401","status":"ok","data":"1"}` diff --git a/Memo/ESP3D [ESP410] format.md b/Memo/ESP3D [ESP410] format.md new file mode 100644 index 00000000..2e76603d --- /dev/null +++ b/Memo/ESP3D [ESP410] format.md @@ -0,0 +1,34 @@ +# ESP3D [ESP410] format + +This command list all AP available, limited to 30 by API, if signal is too low, AP is not listed to avoid connection problems. + +WebUI need use json format to get propelry formated answer +As described in Commands.md: + +Example +`[ESP410]json` +you will get the following if ok + +``` +{ + "cmd": "410", + "status": "ok", + "data": [ + { + "SSID": "GRBL", + "SIGNAL": "100", + "IS_PROTECTED": "1" + }, + { + "SSID": "luc-ext1", + "SIGNAL": "64", + "IS_PROTECTED": "1" + }, + { + "SSID": "TP-Link_Luc", + "SIGNAL": "62", + "IS_PROTECTED": "1" + } + ] +} +``` diff --git a/Memo/ESP3D [ESP800] format.md b/Memo/ESP3D [ESP800] format.md new file mode 100644 index 00000000..20f6a0a7 --- /dev/null +++ b/Memo/ESP3D [ESP800] format.md @@ -0,0 +1,119 @@ +# ESP3D [ESP800] format + +can be in JSON or plain text + +## Input + +`[ESP800] json= pwd=` + + * json=yes + the output format + * time= + to set ESP3D time using ISO 8601 format : `YYYY`-`MM`-`DD`T`HH`-`minutes`-`seconds` + * version + version of webUI + * setup flag + Enable / Disable the setup flag + +## Output + +- In json format + +``` +{ + "cmd":"800", + "status":"ok", + "data":{ + "FWVersion":"bugfix-2.0.x-3.0.0.a200", + "FWTarget":"marlin", + "FWTargetID":"30", + "Setup":"Enabled", + "SDConnection":"shared", + "SerialProtocol":"Socket", + "Authentication":"Disabled", + "WebCommunication":"Synchronous", + "WebSocketIP":"192.168.2.117", + "WebSocketPort":"81", + "Hostname":"esp3d", + "WiFiMode":"STA", + "WebUpdate":"Enabled", + "FlashFileSystem":"LittleFS", + "HostPath":"www", + "Time":"none" + } +} +``` + + * `cmd` + Id of requested command, should be `800` + + * `status` + status of command, should be `ok` + + * `data` + content of response: + * `FWVersion` + Version of ESP3D firmware or targeted FW (Marlin with ESP3DLib / grblHal) + * `FWTarget` + name of targeted Firmware + * `FWTargetID` + numerical ID of targeted FW as same name can have several Ids + * `Setup` + Should be `Enabled` or `Disabled` according flag in EEPROM/Preferences, this allows to WedUI to start wizard automaticaly (or not) + + * `SDConnection` + This is SD capability, SD can be + * `shared` + ESP does share access to SD card reader with main board or Firmware (Marlin with ESP3Dlib, ESP3D with hardware SD share solution) + * `direct` + ESP does have direct access to SD card reader (e.g: ESP3D, grblHal) + * `none` + ESP does not have direct access to SD card reader, (e.g: ESP3D with only serial connection) + * `SerialProtocol` + It define how ESP3D FW communicate with main FW + * `Socket` + ESP and main FW use same FW (e.g: Marlin with ESP3DLib, grblHal) + * `Raw` + Classic serial connection + * `MKS` + Serial connection using MKS protocol + * `Authentication` + Can be `Enabled` or `Disabled` + * `WebCommunication` + currently only `Synchronous`, because `Asychronous` has been put in hold + * `WebSocketIP` + Ip address for the websocket terminal `192.168.2.117` + * `WebSocketPort` + Port for the web socket terminal `81` + * `Hostname` + Hostname of ESP3D or main Baord `esp3d` + * `WiFiMode` + Current wiFi mode in use can be `AP` or `STA` + * `WebUpdate` + Inform webUI the feature is available or not, can be `Enabled` or `Disabled` + * `FlashFileSystem` (currently `FileSystem`, to be updated soon ) + The file system used by ESP board can be `LittleFS`, `SPIFFS`, `Fat`, `none` + * `HostPath` + Path where the preferences.json and index.html.gz are stored and can be updated (e.g: `www`) + * `Time` + Type of time support + * `none` + Time is not supported + * `Auto` + Board use internet to sync time and it is successful + * `Failed to set` + Board use internet to sync time and it is failed + * `Manual` + Board use time of ESP800 to set the time and it is successful + * `Not set` + Board use time of ESP800 to set the time and command did not sent it (time may have been set by previous command) + * `CameraID` + if ESP has camera it contain the camera ID + * `CameraName` + if ESP has camera it contain the camera name + * `Axisletters` + Currently only used for grbHAL + can be : + - XYZABC + - XYZUVZ (supported soon) + - XYZABCUVZ (supported soon) diff --git a/Memo/Handlers.md b/Memo/Handlers.md new file mode 100644 index 00000000..192cd0a1 --- /dev/null +++ b/Memo/Handlers.md @@ -0,0 +1,175 @@ +# Web Handlers + +### / + +root is the default handler where all files will be served, if no file is defined, it looks for index.html or index.html.gz (compressed) +if you call specific file, it will look for the filename and filename.gz (compressed) +if no file is defined and there is not index.html(.gz) it will display embedded page +another way to show the embedded page is /?forcefallback=yes + +### /sd/ + +it will serve any file from SD card if there is one, it is only a wrapper to read SD card, no upload + +### /files + +this handler handle all commands for FS, including upload on FS. + possible options/arguments are: + +- `quiet=yes` can be used when you don't want list files but just upload them +- `path=...` define the path to the file +- `action=...` define the action to execute which can be: + - delete + delete the file defined by `filename=...` it will also use `path=...` to do full path + - deletedir + delete the directory defined by `filename=...` it will also use `path=...` to do full path + - createdir + create the directory defined by `filename=...` it will also use `path=...` to do full path +- `createPath=yes` when doing upload and the path do not exists, it will create it, POST only +- `S=...` give the size of uploaded file with name, need to be set before file is set in upload, POST only + +the output is a json file: + + ``` + { + "files":[ //the files list + { + "name":"index.html.gz", //the name of the file + "size":"83.46 KB", //the formated size of the file + "time":"2022-09-04 11:56:05" //the time when the file was modified last time, this one is optional and depend on (FILESYSTEM_TIMESTAMP_FEATURE) + }, + { + "name":"subdir", //the name of the file / directory + "size":"-1", //the size is -1 because it is a directory + "time":"" //no time for directories optional as depend on (FILESYSTEM_TIMESTAMP_FEATURE) + } + ], + "path":"/", //current path + "occupation":"52", //% of occupation + "status":"subdir created", //status + "total":"192.00 KB", //Formated total space of Filesystem + "used":"100.00 KB" //Formated used space of Filesystem + } + ``` + +### /sdfiles + +this handler handle all commands for SD, including upload on SD (only shared and direct SD) +this handler handle all commands for FS, including upload on FS. + possible options/arguments are: + +- `quiet=yes` can be used when you don't want list files but just upload them +- `path=...` define the path to the file +- `action=...` define the action to execute which can be: + - list + Will refresh the stats of the files - delete + delete the file defined by `filename=...` it will also use `path=...` to do full path + - deletedir + delete the directory defined by `filename=...` it will also use `path=...` to do full path + - createdir + create the directory defined by `filename=...` it will also use `path=...` to do full path +- `createPath=yes` when doing upload and the path do not exists, it will create it, POST only +- `S=...` give the size of uploaded file with name, need to be set before file is set in upload, POST only + +the output is a json file: + + ``` + { + "files":[ //the files list + { + "name":"3Oc-pika2.gco",//the name of the file + "shortname":"3Oc-pika2.gco", //the 8.3 shortname if available, if not the name of the file + "size":"83.46 KB", //the formated size of the file + "time":"2022-09-04 11:56:05" //the time when the file was modified last time, this one is optional and depend on (SD_TIMESTAMP_FEATURE) + }, + { + "name":"subdir", //the name of the file / directory + "size":"-1", //the size is -1 because it is a directory + "time":"" //no time for directories optional as depend on (SD_TIMESTAMP_FEATURE) + } + ], + "path":"/", //current path + "occupation":"52", //% of occupation + "status":"subdir created", //status + "total":"192.00 KB", //Formated total space of Filesystem + "used":"100.00 KB" //Formated used space of Filesystem + } + ``` + +### /upload + +this handler is for MKS boards using MKS communication protocol if enabled, it handle only upload on SD + +### /command + +this handler is for all commands the parameter is `cmd=...` +if it is an `[ESPXXX]` command the answer is the `[ESPXXX]` response +if it is not an `[ESPXXX]` command the answer is `ESP3D says: command forwarded` and can be ignored + +### /login + +this handler is for authentication function if enabled +possible options/arguments are: + - `DISCONNECT=YES` +it will clear current session, remove authentication cookie, set status to `disconnected` and response code to 401 - `SUBMIT=YES` +to login it will need also `PASSWORD=...` and `USER=...`, the answer will be 200 if success and 401 if failed +if user is already authenticated it can use `NEWPASSWORD=...` instead of `PASSWORD=...` to change his password, if successful answer will be returned with code 200, otherwise code will be 500 if change failed or if password format is invalid + +Output: + +- if authentified and no submission: + `{"status":"Identified","authentication_lvl":"admin"}` and code 200 +- if not authenticated and no submission: + `{"status":"Wrong authentication!","authentication_lvl":"guest"}` and code 401 + +### /config + +this handler is a shortcut to [ESP420] command in text mode, to get output in json add `json=yes` + +### /updatefw + +this handler is for FW upload and update +Answer output is : +`{"status":"..."}` if upload is successful the ESP will restart + +### /snap + +this handler is on esp32cam with camera enabled to capture a Frame +it answer by sending a jpg image + +### /description.xml + +this handler is for SSDP if enabled to present device informations + +``` + + + 1 + 0 + + http://192.168.2.178:80/ + + urn:schemas-upnp-org:device:upnp:rootdevice:1 + esp3d + / + 52332 + ESP Board + + ESP3D 3.0 + https://www.espressif.com/en/products/devkits + Espressif Systems + https://www.espressif.com + uuid:38323636-4558-4dda-9188-cda0e600cc6c + + + + +``` + +### Captive portal bypass handlers + +to avoid a redirect to index.html and so a refresh of the page, some classic handler have been added so they all go to / handler actually + +- /generate_204 +- /gconnectivitycheck.gstatic.com +- /fwlink/ diff --git a/Memo/TargetFW.md b/Memo/TargetFW.md new file mode 100644 index 00000000..de1a0118 --- /dev/null +++ b/Memo/TargetFW.md @@ -0,0 +1,20 @@ +# Firmware names, ids, usages + +- grblhal + grblhal -80 - grblHAL Fw +- reprap + reprap -70 - NA +- fluidnc + fluidnc -60 - NA +- repetier + repetier - 50 - ESP3D Fw +- smoothieware + smoothieware- 40 - ESP3D Fw +- marlin_embedded + marlin - 30 - ESP3DLib/Marlin +- marlin + marlin - 20 - ESP3D Fw +- grbl + grbl - 10 - ESP3D Fw +- unknown + unknown - 0 - ESP3D Fw diff --git a/Memo/data structure.odt b/Memo/data structure.odt new file mode 100644 index 00000000..8c540c44 Binary files /dev/null and b/Memo/data structure.odt differ diff --git a/Memo/languagepack.md b/Memo/languagepack.md new file mode 100644 index 00000000..9c2867c8 --- /dev/null +++ b/Memo/languagepack.md @@ -0,0 +1,62 @@ +# Language packs + +## Generate template files + +Use the script `npm run template` to geenrate up todate template files for all packs + +Currently: + +- CNC GRBL in `languages/cncgrblpack` +- CNC grblHAL `languages/cncgrblhalpack` +- 3D Printers (all) `languages/printerpack` +- Sand Table (all) `languages/sandtablepack` + +## Generate language pack files + +- Rename the template file according the language code http://www.lingoes.net/en/translator/langcode.htm using `_` instead of `-` and add `lang-` in from of name. + so for example : + + - for french language pack, `en.json` file would be renamed to `lang-fr.json` + - for simplified chinese language pack, `en.json` file would be renamed to `lang-zh_cn.json` + - for simplified chinese language pack, `en.json` file would be renamed to `lang-zh_cn.json` + - for german language pack, `en.json` file would be renamed to `lang-de.json` + +- Modify the language pack file according to the language and test it against the WebUI + +- Compress the final pack + use the following command to compress the final pack targeting the file : + `npm run package target=languages//lang-.json` + + so for French language pack for example: + `npm run package target=languages/printerpack/lang-fr.json` + +## Compare template pack with language pack file + +This script is used to compare current language pack content against the template language pack to see if the language pack need to be updated. + +`npm run check reference=