Skip to content

Commit

Permalink
Change to hard code WebSocket sub protocol
Browse files Browse the repository at this point in the history
Use ISO_8601 date time format for ESP800
Update docs
Bump version
Build index.html.gz
  • Loading branch information
luc-github committed Sep 11, 2022
1 parent 46d9e6f commit 3c153fd
Show file tree
Hide file tree
Showing 20 changed files with 234 additions and 241 deletions.
448 changes: 225 additions & 223 deletions Memo/Commands.md

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions Memo/ESP3D [ESP800] format.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ can be in JSON or plain text

## Input

`[ESP800]json=yes time=2022-08-02-12-02-18 version=3.0.0-a11 setup=0`
`[ESP800]<time=YYYY-MM-DDTHH:mm:ss> <version=3.0.0-a11> <setup=0/1> json=<no> pwd=<admin password>`

* json=yes
the output format
* time=
to set ESP3D time using format : `YYYY`-`MM`-`DD`-`HH24`-`minutes`-`seconds`
to set ESP3D time using ISO 8601 format : `YYYY`-`MM`-`DD`T`HH`-`minutes`-`seconds`
* version
version of webUI
* setup flag
Expand All @@ -34,7 +34,6 @@ can be in JSON or plain text
"WebCommunication":"Synchronous",
"WebSocketIP":"192.168.2.117",
"WebSocketPort":"81",
"WebSocketSubProtocol":"webui-v3",
"Hostname":"esp3d",
"WiFiMode":"STA",
"WebUpdate":"Enabled",
Expand Down Expand Up @@ -86,8 +85,6 @@ can be in JSON or plain text
Ip address for the websocket terminal `192.168.2.117`
* `WebSocketPort`
Port for the web socket terminal `81`
* `WebSocketSubProtocol` (not yet implemented)
Sub protocol to be used (e.g: `webui-v3`)
* `Hostname`
Hostname of ESP3D or main Baord `esp3d`
* `WiFiMode`
Expand All @@ -96,7 +93,7 @@ can be in JSON or plain text
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` (not yet implemented)
* `HostPath`
Path where the preferences.json and index.html.gz are stored and can be updated (e.g: `www`)
* `Time`
Type of time support
Expand Down
2 changes: 1 addition & 1 deletion Memo/websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ there are 2

## Terminal websocket

use subprotocol `webui-v3` (to be implemented)
use subprotocol `webui-v3`

### <u>text mode</u>

Expand Down
1 change: 0 additions & 1 deletion config/targets/CNC/GRBL/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ const commandsQuery = (req, res, SendWS) => {
Authentication: "Disabled",
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketSubProtocol: "webui-V3",
WebSocketPort: "81",
Hostname: "esp3d",
WiFiMode: "STA",
Expand Down
1 change: 0 additions & 1 deletion config/targets/CNC/GRBLHal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const commandsQuery = (req, res, SendWS) => {
Authentication: "Disabled",
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketSubProtocol: "webui-V3",
WebSocketPort: "81",
Hostname: "esp3d",
WiFiMode: "STA",
Expand Down
1 change: 0 additions & 1 deletion config/targets/Printer3D/Marlin-embedded/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ const commandsQuery = (req, res, SendWS) => {
Authentication: "Disabled",
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketSubProtocol: "webui-V3",
WebSocketPort: "81",
Hostname: "esp3d",
WiFiMode: "STA",
Expand Down
1 change: 0 additions & 1 deletion config/targets/Printer3D/Marlin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ const commandsQuery = (req, res, SendWS) => {
Authentication: "Disabled",
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketSubProtocol: "webui-V3",
WebSocketPort: "81",
Hostname: "esp3d",
WiFiMode: "STA",
Expand Down
1 change: 0 additions & 1 deletion config/targets/Printer3D/Repetier/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ const commandsQuery = (req, res, SendWS) => {
Authentication: enableAuthentication ? "Enabled" : "Disabled",
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketSubProtocol: "webui-V3",
WebSocketPort: "81",
Hostname: "esp3d",
WiFiMode: "STA",
Expand Down
1 change: 0 additions & 1 deletion config/targets/Printer3D/Smoothieware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,6 @@ const commandsQuery = (req, res, SendWS) => {
Authentication: enableAuthentication ? "Enabled" : "Disabled",
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketSubProtocol: "webui-V3",
WebSocketPort: "81",
Hostname: "smoothesp3d",
WiFiMode: "STA",
Expand Down
1 change: 0 additions & 1 deletion config/targets/SandTable/GRBL/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const commandsQuery = (req, res, SendWS) => {
Authentication: "Disabled",
WebCommunication: "Synchronous",
WebSocketIP: "localhost",
WebSocketSubProtocol: "webui-V3",
WebSocketPort: "81",
Hostname: "esp3d",
WiFiMode: "STA",
Expand Down
Binary file modified dist/CNC/GRBL/index.html.gz
Binary file not shown.
Binary file modified dist/CNC/GRBLHal/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin-embedded/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Marlin/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Repetier/index.html.gz
Binary file not shown.
Binary file modified dist/Printer3D/Smoothieware/index.html.gz
Binary file not shown.
Binary file modified dist/SandTable/GRBL/index.html.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/App/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
import { h } from "preact"
import { webUIbuild } from "../../targets"
export const webUIversion = "3.0.0-a18"
export const webUIversion = "3.0.0-a19"
export const Esp3dVersion = () => (
<span>
{webUIversion}.{webUIbuild}
Expand Down
5 changes: 3 additions & 2 deletions src/components/Helpers/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import { h } from "preact"

function getBrowserTime() {
//ISO 8601 format string
function padNumber(num, size) {
const s = num.toString().padStart(size, "0")
return s
Expand All @@ -26,10 +27,10 @@ function getBrowserTime() {
return `${d.getFullYear()}-${padNumber(d.getMonth() + 1, 2)}-${padNumber(
d.getDate(),
2
)}-${padNumber(d.getHours(), 2)}-${padNumber(
)}H${padNumber(d.getHours(), 2)}:${padNumber(
d.getMinutes(),
2
)}-${padNumber(d.getSeconds(), 2)}`
)}:${padNumber(d.getSeconds(), 2)}`
}

export { getBrowserTime }
2 changes: 1 addition & 1 deletion src/contexts/WsContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const WsContextProvider = ({ children }) => {

wsConnection.current = new WebSocket(
`ws://${document.location.hostname}:${connectionSettings.current.WebSocketPort}${path}`,
`${connectionSettings.current.WebSocketSubProtocol}`
`webui-v3`
)
wsConnection.current.binaryType = "arraybuffer"

Expand Down

0 comments on commit 3c153fd

Please sign in to comment.