diff --git a/dist/CNC/GRBL/index.html.gz b/dist/CNC/GRBL/index.html.gz
index c3d608e6..0f5d8ec9 100644
Binary files a/dist/CNC/GRBL/index.html.gz and b/dist/CNC/GRBL/index.html.gz differ
diff --git a/dist/CNC/GRBLHal/index.html.gz b/dist/CNC/GRBLHal/index.html.gz
index 68b2f5a4..93588eef 100644
Binary files a/dist/CNC/GRBLHal/index.html.gz and b/dist/CNC/GRBLHal/index.html.gz differ
diff --git a/dist/Plotter/HP-GL/index.html.gz b/dist/Plotter/HP-GL/index.html.gz
index 7120c824..2d12d5b5 100644
Binary files a/dist/Plotter/HP-GL/index.html.gz and b/dist/Plotter/HP-GL/index.html.gz differ
diff --git a/dist/Printer3D/Marlin-embedded/index.html.gz b/dist/Printer3D/Marlin-embedded/index.html.gz
index b22da38a..67180dbd 100644
Binary files a/dist/Printer3D/Marlin-embedded/index.html.gz and b/dist/Printer3D/Marlin-embedded/index.html.gz differ
diff --git a/dist/Printer3D/Marlin/index.html.gz b/dist/Printer3D/Marlin/index.html.gz
index c4f8be6c..5343728f 100644
Binary files a/dist/Printer3D/Marlin/index.html.gz and b/dist/Printer3D/Marlin/index.html.gz differ
diff --git a/dist/Printer3D/Repetier/index.html.gz b/dist/Printer3D/Repetier/index.html.gz
index f0e8ad00..4a8e1e55 100644
Binary files a/dist/Printer3D/Repetier/index.html.gz and b/dist/Printer3D/Repetier/index.html.gz differ
diff --git a/dist/Printer3D/Smoothieware/index.html.gz b/dist/Printer3D/Smoothieware/index.html.gz
index adf66c28..a7550caf 100644
Binary files a/dist/Printer3D/Smoothieware/index.html.gz and b/dist/Printer3D/Smoothieware/index.html.gz differ
diff --git a/dist/SandTable/GRBL/index.html.gz b/dist/SandTable/GRBL/index.html.gz
index 287d305e..e4fb4d62 100644
Binary files a/dist/SandTable/GRBL/index.html.gz and b/dist/SandTable/GRBL/index.html.gz differ
diff --git a/extensions_samples/API.md b/extensions_samples/API.md
index 987646f0..3280eaba 100644
--- a/extensions_samples/API.md
+++ b/extensions_samples/API.md
@@ -455,10 +455,18 @@ There is no answer for this message, so `id` is not necessary
---
### Send capabilities request
-Example: `{type:'capabilities', target:'webui', id:'transpanel'}`
+This allow to collect all capabilities for specific topic:
+if id is `connection` you will get the json of [ESP800] response jsonified
+if id is `features` you will get the [ESP400] response jsonified
+if id is `interface` you will get the preferences.json jsonified
+if id is `settings` you will get specific settings from target fw
+
+Be noted this API only collect existing data, so for `features`,`interface` and `settings` you may get empty response if corresponding query has not be done.
+
+Example: `{type:'capabilities', target:'webui', id:'connection'}`
**type** is `capabilities` (mandatory)
**target** is `webui` (mandatory)
-**id** is `infopanel` (optional)
+**id** is `connection` (mandatory)
* Answer format: check the `eventMsg.data`
@@ -466,18 +474,41 @@ Example: `{type:'capabilities', target:'webui', id:'transpanel'}`
{
"type": "capabilities",
"content": {
- "response": "Your session will end soon, do you want to stay connected ?",
+ "response": "{
+ "FWVersion": "3.0.0.a111",
+ "FWTarget": "marlin",
+ "FWTargetID": "40",
+ "Setup": "Enabled",
+ "Screen": "HMI V3",
+ "Streaming": "Enabled",
+ "SDConnection": "direct",
+ "SerialProtocol": "Raw",
+ "Authentication": "Disabled",
+ "WebCommunication": "Asynchronous",
+ "WebSocketIP": "localhost",
+ "WebSocketPort": "81",
+ "Hostname": "esp3d",
+ "WiFiMode": "STA",
+ "WebUpdate": "Enabled",
+ "FlashFileSystem": "LittleFS",
+ "HostPath": "/",
+ "Time": "none",
+ "HostTarget": "files",
+ "HostUploadPath": "/",
+ "HostDownloadPath": "/",
+ "wsID": "0"
+ }",
"initiator": {
"type":"capabilities",
"target":"webui",
- "id":"infopanel"
+ "id":"connection"
}
},
- "id": "infopanel"
+ "id": "connection"
}
```
**type** is `capabilities`
- **id** is the id set in command message to help to screen
+ **id** is the id of requested capability
**content** has the response it self **response**, in our case a JSON and also the **initiator** is the initial command for reference
---
@@ -643,4 +674,4 @@ Note: there no answer as the purpose of this is to send answer
**id** is the id set in command message to help to screen
**content** has the response it self **response**, in our case `create` because user clicked on button 1, and the text entered is in **inputData**, here `mydir`, and also the **initiator** is the initial command for reference
- Note: **inputData** is present for both buttons clicked, so screening must be done according response
\ No newline at end of file
+ Note: **inputData** is present for both buttons clicked, so screening must be done according response
diff --git a/extensions_samples/capabilities.html b/extensions_samples/capabilities.html
index 61e54e8e..cbb310f8 100644
--- a/extensions_samples/capabilities.html
+++ b/extensions_samples/capabilities.html
@@ -2,14 +2,23 @@
function sendMessage(msg){
window.parent.postMessage(msg, '*');
}
+
+ function onclickBtn(){
+ const selectElement = document.getElementById('request_id');
+ id_requested = selectElement.value
+ sendMessage({type:'capabilities', target:'webui', id:document.getElementById('request_id').value,});
+ }
function processMessage(eventMsg){
- if (eventMsg.data.type && (!eventMsg.data.id||eventMsg.data.id=="infopanel")){
+ if (eventMsg.data.type && (!eventMsg.data.id||eventMsg.data.id==document.getElementById('request_id').value)){
if (eventMsg.data.type=="capabilities"){
const line = eventMsg.data.content
const resultPanel = document.getElementById("output");
-
- resultPanel.innerHTML = resultPanel.innerHTML + "
"+ JSON.stringify(line.response, " ", "
")+"
+