From cd884aa1b35d803fee1cdb5caea1577becf7b195 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com>
Date: Sun, 28 Sep 2025 21:33:18 +0800
Subject: [PATCH] =?UTF-8?q?feat(boards):=20`=E7=89=A9=E8=81=94=E7=BD=91`?=
=?UTF-8?q?=20=E5=88=86=E7=B1=BB=E4=B8=8B=E6=B7=BB=E5=8A=A0=20`TinyWebDB`?=
=?UTF-8?q?=20=E5=88=86=E7=B1=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
boards/default_src/micropython/blocks/iot.js | 119 ++++++++++++++++++
.../default_src/micropython/generators/iot.js | 48 +++++++
.../micropython/origin/build/lib/mixiot.py | 90 +------------
.../origin/build/lib/tiny_webdb.py | 72 +++++++++++
.../css/color_esp32_mixgo.css | 10 ++
.../micropython_esp32/template.xml | 71 +++++++++++
.../css/color_esp32c3_mixgocc.css | 10 ++
.../micropython_esp32c2/template.xml | 71 +++++++++++
.../css/color_esp32c3_mixgocc.css | 10 ++
.../micropython_esp32c3/template.xml | 71 +++++++++++
.../css/color_esp32s2_mixgoce.css | 10 ++
.../micropython_esp32s2/template.xml | 71 +++++++++++
.../css/color_esp32s2_mixgoce.css | 10 ++
.../micropython_esp32s3/template.xml | 71 +++++++++++
.../css/color_esp32_mixgo.css | 10 ++
.../micropython_robot/template.xml | 71 +++++++++++
common/media/mark/database.png | Bin 0 -> 868 bytes
common/media/mark/database2.png | Bin 0 -> 902 bytes
common/msg/blockly/en.js | 15 ++-
common/msg/blockly/zh-hans.js | 15 ++-
common/msg/blockly/zh-hant.js | 15 ++-
21 files changed, 772 insertions(+), 88 deletions(-)
create mode 100644 boards/default_src/micropython/origin/build/lib/tiny_webdb.py
create mode 100644 common/media/mark/database.png
create mode 100644 common/media/mark/database2.png
diff --git a/boards/default_src/micropython/blocks/iot.js b/boards/default_src/micropython/blocks/iot.js
index 72656c18..cc69804d 100644
--- a/boards/default_src/micropython/blocks/iot.js
+++ b/boards/default_src/micropython/blocks/iot.js
@@ -778,4 +778,123 @@ export const ollama_empty_history = {
this.setPreviousStatement(true);
this.setNextStatement(true);
}
+};
+
+const TINY_WEB_DB = 0;
+
+export const iot_tiny_web_db_init = {
+ init: function () {
+ this.setColour(TINY_WEB_DB);
+ this.appendDummyInput()
+ .appendField(`${Blockly.Msg.MIXLY_SETUP} TinyWebDB`);
+ this.appendValueInput('ADDR')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.MIXLY_EMQX_SERVER);
+ this.appendValueInput('USERNAME')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.MIXLY_EMQX_USERNAME);
+ this.appendValueInput('PASSWORD')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.MIXLY_EMQX_PASSWORD);
+ this.setInputsInline(false);
+ this.setPreviousStatement(true);
+ this.setNextStatement(true);
+ }
+};
+
+export const iot_tiny_web_db_init_with_mqtt = {
+ init: function () {
+ this.setColour(TINY_WEB_DB);
+ this.appendDummyInput()
+ .appendField(`${Blockly.Msg.MIXLY_SETUP} TinyWebDB`);
+ this.appendValueInput('MQTT')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(`MixIO ${Blockly.Msg.MIXLY_Client}`);
+ this.setInputsInline(true);
+ this.setPreviousStatement(true);
+ this.setNextStatement(true);
+ }
+};
+
+export const iot_tiny_web_db_update = {
+ init: function () {
+ this.setColour(TINY_WEB_DB);
+ this.appendDummyInput()
+ .appendField('TinyWebDB');
+ this.appendValueInput('TAG')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_UPDATE_VARIABLE);
+ this.appendValueInput('VALUE')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.DICTS_ADD_VALUE);
+ this.setInputsInline(true);
+ this.setPreviousStatement(true);
+ this.setNextStatement(true);
+ }
+};
+
+export const iot_tiny_web_db_get = {
+ init: function () {
+ this.setColour(TINY_WEB_DB);
+ this.appendDummyInput()
+ .appendField('TinyWebDB');
+ this.appendValueInput('TAG')
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_GET_VARIABLE);
+ this.appendDummyInput()
+ .appendField(Blockly.Msg.DICTS_ADD_VALUE);
+ this.setInputsInline(true);
+ this.setOutput(true);
+ }
+};
+
+export const iot_tiny_web_db_count = {
+ init: function () {
+ this.setColour(TINY_WEB_DB);
+ this.appendDummyInput()
+ .appendField('TinyWebDB');
+ this.appendDummyInput()
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_GET_VARIABLES_NUM);
+ this.setInputsInline(true);
+ this.setOutput(true);
+ }
+};
+
+export const iot_tiny_web_db_search = {
+ init: function () {
+ this.setColour(TINY_WEB_DB);
+ this.appendDummyInput()
+ .appendField('TinyWebDB')
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_SEARCH_VARIABLES);
+ this.appendValueInput('NO')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_START_NUMBER);
+ this.appendValueInput('COUNT')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_VARIABLE_NUMBER);
+ this.appendValueInput('TAG')
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_SEARCH_VARS);
+ this.appendDummyInput()
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(new Blockly.FieldDropdown([
+ [Blockly.Msg.MIXLY_TINY_WEB_DB_GET_VARIABLES_ALL, 'both'],
+ [Blockly.Msg.MIXLY_TINY_WEB_DB_GET_VARIABLES_TAG, 'tag'],
+ [Blockly.Msg.MIXLY_TINY_WEB_DB_GET_VARIABLES_VALUE, 'value']
+ ]), 'DTYPE');
+ this.setInputsInline(false);
+ this.setOutput(true);
+ }
+};
+
+export const iot_tiny_web_db_delete = {
+ init: function () {
+ this.setColour(TINY_WEB_DB);
+ this.appendDummyInput()
+ .appendField('TinyWebDB');
+ this.appendValueInput('TAG')
+ .appendField(Blockly.Msg.MIXLY_TINY_WEB_DB_DELETE_VARIABLE);
+ this.setInputsInline(true);
+ this.setPreviousStatement(true);
+ this.setNextStatement(true);
+ }
};
\ No newline at end of file
diff --git a/boards/default_src/micropython/generators/iot.js b/boards/default_src/micropython/generators/iot.js
index 1c30b2de..0f0cd509 100644
--- a/boards/default_src/micropython/generators/iot.js
+++ b/boards/default_src/micropython/generators/iot.js
@@ -310,4 +310,52 @@ export const use_ollama_llm_to_chat_return = function (_, generator) {
export const ollama_empty_history = function () {
var code = 'llm.empty_history()\n';
return code;
+}
+
+export const iot_tiny_web_db_init = function (_,generator) {
+ generator.definitions_['import_tiny_webdb'] = "import tiny_webdb";
+ const addr = generator.valueToCode(this, 'ADDR', generator.ORDER_ATOMIC);
+ const username = generator.valueToCode(this, 'USERNAME', generator.ORDER_ATOMIC);
+ const password = generator.valueToCode(this, 'PASSWORD', generator.ORDER_ATOMIC);
+ const code = `webdb = tiny_webdb.TinyWebDB(${addr}, ${username}, ${password})\n`;
+ return code;
+}
+
+export const iot_tiny_web_db_init_with_mqtt = function (_,generator) {
+ const mqtt = generator.valueToCode(this, 'MQTT', generator.ORDER_ATOMIC);
+ const code = `webdb = tiny_webdb.TinyWebDB(${mqtt})\n`;
+ return code;
+}
+
+export const iot_tiny_web_db_update = function (_,generator) {
+ const tag = generator.valueToCode(this, 'TAG', generator.ORDER_ATOMIC);
+ const value = generator.valueToCode(this, 'VALUE', generator.ORDER_ATOMIC);
+ const code = `webdb.update(${tag}, ${value})\n`;
+ return code;
+}
+
+export const iot_tiny_web_db_get = function (_,generator) {
+ const tag = generator.valueToCode(this, 'TAG', generator.ORDER_ATOMIC);
+ const code = `webdb.get(${tag})`;
+ return [code, generator.ORDER_ATOMIC];
+}
+
+export const iot_tiny_web_db_count = function (_,generator) {
+ const code = 'webdb.count()';
+ return [code, generator.ORDER_ATOMIC];
+}
+
+export const iot_tiny_web_db_search = function (_,generator) {
+ const no = generator.valueToCode(this, 'NO', generator.ORDER_ATOMIC);
+ const count = generator.valueToCode(this, 'COUNT', generator.ORDER_ATOMIC);
+ const tag = generator.valueToCode(this, 'TAG', generator.ORDER_ATOMIC);
+ const dtype = this.getFieldValue('DTYPE');
+ const code = `webdb.search(${no}, ${count}, ${tag}, '${dtype}')`;
+ return [code, generator.ORDER_ATOMIC];
+}
+
+export const iot_tiny_web_db_delete = function (_,generator) {
+ const tag = generator.valueToCode(this, 'TAG', generator.ORDER_ATOMIC);
+ const code = `webdb.delete(${tag})\n`;
+ return code;
}
\ No newline at end of file
diff --git a/boards/default_src/micropython/origin/build/lib/mixiot.py b/boards/default_src/micropython/origin/build/lib/mixiot.py
index 28822d7d..15f5c1f1 100644
--- a/boards/default_src/micropython/origin/build/lib/mixiot.py
+++ b/boards/default_src/micropython/origin/build/lib/mixiot.py
@@ -1,6 +1,5 @@
import time
import usocket as socket
-import urequests as requests
import ustruct as struct
from machine import unique_id
from ubinascii import hexlify
@@ -41,8 +40,9 @@ def image_base64(path="mixly.jpg"):
return b'data:image/jpg;base64,' + b64encode(path)
def ntp(url='mixio.mixly.cn'):
+ import urequests
try:
- results=eval(requests.get('http://{}/time.php'.format(url)).text)
+ results=eval(urequests.get('http://{}/time.php'.format(url)).text)
except Exception as e:
raise RuntimeError("API request failed or WiFi is not connected",e)
return results
@@ -72,6 +72,7 @@ class MQTTClient:
port = 8883 if ssl else 1883
self.client_id = client_id
self.sock = None
+ self.server = server
self.addr = socket.getaddrinfo(server, port)[0][-1]
self.ssl = ssl
self.ssl_params = ssl_params
@@ -86,7 +87,6 @@ class MQTTClient:
self.lw_retain = False
self._on_message_filtered = MQTTMatcher()
self._star_time = time.ticks_ms()
- self._tiny_web_db = TinyWebDB("", username, password)
def _send_str(self, s):
self.sock.write(struct.pack("!H", str_len(s)))
@@ -343,85 +343,5 @@ class MQTTClient:
self.ping()
return self.wait_msg()
- def tiny_web_db_update(self, url, key, value):
- self._tiny_web_db.set_url(url)
- return self._tiny_web_db.update(key, value)
-
- def tiny_web_db_get(self, url, key):
- self._tiny_web_db.set_url(url)
- return self._tiny_web_db.get(key)
-
- def tiny_web_db_count(self, url):
- self._tiny_web_db.set_url(url)
- return self._tiny_web_db.count()
-
- def tiny_web_db_search(self, url, no=1, count=1, tag='', dtype='both'):
- self._tiny_web_db.set_url(url)
- return self._tiny_web_db.search(no, count, tag, dtype)
-
- def tiny_web_db_delete(self, url, key):
- self._tiny_web_db.set_url(url)
- return self._tiny_web_db.delete(key)
-
-class TinyWebDB:
- def __init__(self, url, username, password):
- self._api_url = ""
- self._username = username
- self._password = password
- self.set_url(url)
-
- def update(self, key, value):
- key = str(key)
- value = str(value)
- result = self._request("update", "tag={}&value={}".format(key, value))
- if result["status"] == "error":
- raise RuntimeError(result["message"])
-
- def get(self, key):
- key = str(key)
- result = self._request("get", "tag={}".format(key))
- if result["status"] == "error":
- raise RuntimeError(result["message"])
- return result["value"]
-
- def count(self):
- result = self._request("count")
- if result["status"] == "error":
- raise RuntimeError(result["message"])
- return int(result["count"])
-
- def search(self, no=1, count=1, tag='', dtype='both'):
- no = str(no)
- count = str(count)
- result = self._request("search", "no={}&count={}&tag={}&type={}".format(no, count, tag, dtype))
- if result["status"] == "error":
- raise RuntimeError(result["message"])
- return result["data"]
-
- def delete(self, key):
- key = str(key)
- result = self._request("delete", "tag={}".format(key))
- if result["status"] == "error":
- raise RuntimeError(result["message"])
-
- def set_url(self, url):
- if url[-1] != '/':
- url += '/'
- self._api_url = url
-
- def _request(self, op, param=""):
- data = "user={}&secret={}&action={}".format(self._username, self._password, op)
- if param:
- data += '&' + param
- try:
- headers = {
- "Content-Type": "application/x-www-form-urlencoded"
- }
- response = requests.post(self._api_url, data=data, headers=headers)
- result = {}
- if response.status_code == 200:
- result = response.json()
- response.close()
- return result
- except Exception as e:
- raise RuntimeError("API request failed or WiFi is not connected", e)
\ No newline at end of file
+ def get_server_info(self):
+ return (self.server, self.username, self.password)
diff --git a/boards/default_src/micropython/origin/build/lib/tiny_webdb.py b/boards/default_src/micropython/origin/build/lib/tiny_webdb.py
new file mode 100644
index 00000000..b61263be
--- /dev/null
+++ b/boards/default_src/micropython/origin/build/lib/tiny_webdb.py
@@ -0,0 +1,72 @@
+import urequests as requests
+
+
+class TinyWebDB:
+ def __init__(self, url, username, password):
+ self._api_url = ""
+ self._username = username
+ self._password = password
+ self.set_url(url)
+
+ def __init__(self, mqtt_client):
+ self._api_url = ""
+ url, username, password = mqtt_client.get_server_info()
+ self.set_url('https://{}:443'.format(url))
+ self._username = username
+ self._password = password
+
+ def update(self, key, value):
+ key = str(key)
+ value = str(value)
+ result = self._request("update", "tag={}&value={}".format(key, value))
+ if result["status"] == "error":
+ raise RuntimeError(result["message"])
+
+ def get(self, key):
+ key = str(key)
+ result = self._request("get", "tag={}".format(key))
+ if result["status"] == "error":
+ raise RuntimeError(result["message"])
+ return result["value"]
+
+ def count(self):
+ result = self._request("count")
+ if result["status"] == "error":
+ raise RuntimeError(result["message"])
+ return int(result["count"])
+
+ def search(self, no=1, count=1, tag='', dtype='both'):
+ no = str(no)
+ count = str(count)
+ result = self._request("search", "no={}&count={}&tag={}&type={}".format(no, count, tag, dtype))
+ if result["status"] == "error":
+ raise RuntimeError(result["message"])
+ return result["data"]
+
+ def delete(self, key):
+ key = str(key)
+ result = self._request("delete", "tag={}".format(key))
+ if result["status"] == "error":
+ raise RuntimeError(result["message"])
+
+ def set_url(self, url):
+ if url[-1] != '/':
+ url += '/'
+ self._api_url = url
+
+ def _request(self, op, param=""):
+ data = "user={}&secret={}&action={}".format(self._username, self._password, op)
+ if param:
+ data += '&' + param
+ try:
+ headers = {
+ "Content-Type": "application/x-www-form-urlencoded"
+ }
+ response = requests.post(self._api_url, data=data, headers=headers)
+ result = {}
+ if response.status_code == 200:
+ result = response.json()
+ response.close()
+ return result
+ except Exception as e:
+ raise RuntimeError("API request failed or WiFi is not connected", e)
\ No newline at end of file
diff --git a/boards/default_src/micropython_esp32/css/color_esp32_mixgo.css b/boards/default_src/micropython_esp32/css/color_esp32_mixgo.css
index cfe73d8a..7be75f26 100644
--- a/boards/default_src/micropython_esp32/css/color_esp32_mixgo.css
+++ b/boards/default_src/micropython_esp32/css/color_esp32_mixgo.css
@@ -409,6 +409,16 @@ div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTr
background-size: 100% auto;
}
+#catTinyWebDB.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database.png') no-repeat;
+ background-size: 100% auto;
+}
+
+#catTinyWebDB.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database2.png') no-repeat;
+ background-size: 100% auto;
+}
+
#catFactory.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/factory3.png') no-repeat;
background-size: 100% auto;
diff --git a/boards/default_src/micropython_esp32/template.xml b/boards/default_src/micropython_esp32/template.xml
index 1052d16e..3f870e36 100644
--- a/boards/default_src/micropython_esp32/template.xml
+++ b/boards/default_src/micropython_esp32/template.xml
@@ -2841,6 +2841,77 @@
+
+
+
+
+ https://mixio.mixly.cn
+
+
+
+
+ username
+
+
+
+
+ password
+
+
+
+
+
+
+ mqtt_client
+
+
+
+
+
+
+ mixly
+
+
+
+
+ hello
+
+
+
+
+
+
+ mixly
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ mixly
+
+
+
+
+
+
+ mixly
+
+
+
+
diff --git a/boards/default_src/micropython_esp32c2/css/color_esp32c3_mixgocc.css b/boards/default_src/micropython_esp32c2/css/color_esp32c3_mixgocc.css
index 7a67282a..e471b651 100644
--- a/boards/default_src/micropython_esp32c2/css/color_esp32c3_mixgocc.css
+++ b/boards/default_src/micropython_esp32c2/css/color_esp32c3_mixgocc.css
@@ -427,6 +427,16 @@ div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTr
background-size: 100% auto;
}
+#catTinyWebDB.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database.png') no-repeat;
+ background-size: 100% auto;
+}
+
+#catTinyWebDB.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database2.png') no-repeat;
+ background-size: 100% auto;
+}
+
#catAIOT.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/ai.png') no-repeat;
background-size: 100% auto;
diff --git a/boards/default_src/micropython_esp32c2/template.xml b/boards/default_src/micropython_esp32c2/template.xml
index bae21d91..3ac852a5 100644
--- a/boards/default_src/micropython_esp32c2/template.xml
+++ b/boards/default_src/micropython_esp32c2/template.xml
@@ -2739,6 +2739,77 @@
+
+
+
+
+ https://mixio.mixly.cn
+
+
+
+
+ username
+
+
+
+
+ password
+
+
+
+
+
+
+ mqtt_client
+
+
+
+
+
+
+ mixly
+
+
+
+
+ hello
+
+
+
+
+
+
+ mixly
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ mixly
+
+
+
+
+
+
+ mixly
+
+
+
+
diff --git a/boards/default_src/micropython_esp32c3/css/color_esp32c3_mixgocc.css b/boards/default_src/micropython_esp32c3/css/color_esp32c3_mixgocc.css
index e5083a8e..5013b08b 100644
--- a/boards/default_src/micropython_esp32c3/css/color_esp32c3_mixgocc.css
+++ b/boards/default_src/micropython_esp32c3/css/color_esp32c3_mixgocc.css
@@ -408,6 +408,16 @@ div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTr
background-size: 100% auto;
}
+#catTinyWebDB.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database.png') no-repeat;
+ background-size: 100% auto;
+}
+
+#catTinyWebDB.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database2.png') no-repeat;
+ background-size: 100% auto;
+}
+
#catAIOT.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/ai.png') no-repeat;
background-size: 100% auto;
diff --git a/boards/default_src/micropython_esp32c3/template.xml b/boards/default_src/micropython_esp32c3/template.xml
index 52fb6c22..6cc6d719 100644
--- a/boards/default_src/micropython_esp32c3/template.xml
+++ b/boards/default_src/micropython_esp32c3/template.xml
@@ -2623,6 +2623,77 @@
+
+
+
+
+ https://mixio.mixly.cn
+
+
+
+
+ username
+
+
+
+
+ password
+
+
+
+
+
+
+ mqtt_client
+
+
+
+
+
+
+ mixly
+
+
+
+
+ hello
+
+
+
+
+
+
+ mixly
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ mixly
+
+
+
+
+
+
+ mixly
+
+
+
+
diff --git a/boards/default_src/micropython_esp32s2/css/color_esp32s2_mixgoce.css b/boards/default_src/micropython_esp32s2/css/color_esp32s2_mixgoce.css
index 5544f629..c3d44391 100644
--- a/boards/default_src/micropython_esp32s2/css/color_esp32s2_mixgoce.css
+++ b/boards/default_src/micropython_esp32s2/css/color_esp32s2_mixgoce.css
@@ -408,6 +408,16 @@ div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTr
background-size: 100% auto;
}
+#catTinyWebDB.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database.png') no-repeat;
+ background-size: 100% auto;
+}
+
+#catTinyWebDB.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database2.png') no-repeat;
+ background-size: 100% auto;
+}
+
#catAIOT.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/ai.png') no-repeat;
background-size: 100% auto;
diff --git a/boards/default_src/micropython_esp32s2/template.xml b/boards/default_src/micropython_esp32s2/template.xml
index 2100b5c2..49b170a7 100644
--- a/boards/default_src/micropython_esp32s2/template.xml
+++ b/boards/default_src/micropython_esp32s2/template.xml
@@ -2661,6 +2661,77 @@
+
+
+
+
+ https://mixio.mixly.cn
+
+
+
+
+ username
+
+
+
+
+ password
+
+
+
+
+
+
+ mqtt_client
+
+
+
+
+
+
+ mixly
+
+
+
+
+ hello
+
+
+
+
+
+
+ mixly
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ mixly
+
+
+
+
+
+
+ mixly
+
+
+
+
diff --git a/boards/default_src/micropython_esp32s3/css/color_esp32s2_mixgoce.css b/boards/default_src/micropython_esp32s3/css/color_esp32s2_mixgoce.css
index 62adb26c..bb528804 100644
--- a/boards/default_src/micropython_esp32s3/css/color_esp32s2_mixgoce.css
+++ b/boards/default_src/micropython_esp32s3/css/color_esp32s2_mixgoce.css
@@ -388,6 +388,16 @@ div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTr
background-size: 100% auto;
}
+#catTinyWebDB.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database.png') no-repeat;
+ background-size: 100% auto;
+}
+
+#catTinyWebDB.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database2.png') no-repeat;
+ background-size: 100% auto;
+}
+
#catAIOT.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/ai.png') no-repeat;
background-size: 100% auto;
diff --git a/boards/default_src/micropython_esp32s3/template.xml b/boards/default_src/micropython_esp32s3/template.xml
index cfe1c8bf..df850542 100644
--- a/boards/default_src/micropython_esp32s3/template.xml
+++ b/boards/default_src/micropython_esp32s3/template.xml
@@ -3153,6 +3153,77 @@
+
+
+
+
+ https://mixio.mixly.cn
+
+
+
+
+ username
+
+
+
+
+ password
+
+
+
+
+
+
+ mqtt_client
+
+
+
+
+
+
+ mixly
+
+
+
+
+ hello
+
+
+
+
+
+
+ mixly
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ mixly
+
+
+
+
+
+
+ mixly
+
+
+
+
diff --git a/boards/default_src/micropython_robot/css/color_esp32_mixgo.css b/boards/default_src/micropython_robot/css/color_esp32_mixgo.css
index 70d5446b..82c2b422 100644
--- a/boards/default_src/micropython_robot/css/color_esp32_mixgo.css
+++ b/boards/default_src/micropython_robot/css/color_esp32_mixgo.css
@@ -409,6 +409,16 @@ div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTr
background-size: 100% auto;
}
+#catTinyWebDB.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database.png') no-repeat;
+ background-size: 100% auto;
+}
+
+#catTinyWebDB.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
+ background: url('../../../../common/media/mark/database2.png') no-repeat;
+ background-size: 100% auto;
+}
+
#catFactory.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/factory3.png') no-repeat;
background-size: 100% auto;
diff --git a/boards/default_src/micropython_robot/template.xml b/boards/default_src/micropython_robot/template.xml
index 6fda6653..ac878294 100644
--- a/boards/default_src/micropython_robot/template.xml
+++ b/boards/default_src/micropython_robot/template.xml
@@ -2423,6 +2423,77 @@
+
+
+
+
+ https://mixio.mixly.cn
+
+
+
+
+ username
+
+
+
+
+ password
+
+
+
+
+
+
+ mqtt_client
+
+
+
+
+
+
+ mixly
+
+
+
+
+ hello
+
+
+
+
+
+
+ mixly
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ mixly
+
+
+
+
+
+
+ mixly
+
+
+
+
diff --git a/common/media/mark/database.png b/common/media/mark/database.png
new file mode 100644
index 0000000000000000000000000000000000000000..220e72298bd25f5fb4d44ac155577b282073a428
GIT binary patch
literal 868
zcmV-q1DpJbP)L~_jkMd
z`^WFw?Q^i(ZkIL2eA%((b3y3oqyWw!D3Z;xJWtE=uuRika2R~dm)%t0!?$CUs6+dV
z_XLELGYHCXo~D;+p1;DcdHxh^ce@!f*0O>2nWm{@lptbMrl$6uA;97xselMR?{=TI
zPfw5V<>~1qNTiIlY@mHgATbTbCxo;B?mZx;5ix=h^13aXHMxu_XLAb>
zvaW_L?+P?o?eR4-?pSADYY`u+5}TC17tT0db17U7=%_$%#Wh*Z#9DI=0V=UxIOG4W
zCHsymLEZ$IsXe)+2p=U^9aZoqpblYA65%sj*W?;vWQ^E{$euSxxN0y2I2i8#`kE*e
z#}4o+NWh@{`^i{KG_+48BI6MI#<=RZ+Ob|kK=u2vxF@7$J3v*2AOQp7AY&~XXrJ;8
zDPrH4!>fKIpnUp?5MnrYWvX-nLL04K<^r~S_=fb5IIc$mluuU586(ausQw=a2!gL+
zE?~eB@9IciLM(l8IY9f4V-4dOxeoUB1fJ_|_N#92zHA>EIT`s*J-S
zP5dFi1QGUMi5Q!^2E;<_mf&z$6L$!3pq$=bs4K@fVhHN_zj%doP2BFa#SUxt>oo*a
ze{y>5{}5ub#3)&dsSk^QKvZBH#7+XT1z}_@HV)%pPk>4L&uCPn6mzx)0s>Kiali)n
zK$F(5Az6!UZH*%VN+&Z$Eu?M(XMzL^x=JNZo4K@X`M@bsv4bN4N+&ZyVw6^}AmX%{
zOB?%3+KncP>TwIrV{;^TE$zJx%@<4>{
zE#Ri~77JdSlI=5~vnQgi8zI2KjzhlIFR
zZr=(@7!U^;Yl(*TDd&z+8M~sV&eo_v+3r0m!eLaUf~Zah+_QWeSOazl`F4!@mh@SB
uGabF(00030|El94a{vGU21!IgR09CU{OQ}rClmPq0000-rd+f|ngKJ&fKH
z2ajK%9`6bWt%87b4be;R93X9Ec^K^%2bCKx_H>BcEe-+_Tt&05ARx_hypA#cPCUgH
zmig=Tv>hiWuJJg=cn-I5C1ewjU7MFhpJomAlsUY{7D8O3*VBptIZFasP^Q;HO290x
zZGw=8YeCSb;QtYpWg!NZ5D*hnLL7KJToivwg7yl!Il`^zUc_T{U{?B@fM1_@a(!r0
z;~;{7YW>{!F!7cfyISWC%tvv{Iv;ZFYw17-x+>b!>$}(#uWQ-ldjWiR6_MhuIjB|G
z3)sJ%iCuk8PZjlxKOw4*TdXgt(_`ye=TEU0BRJgEMCyp#`kZD$6v9IGYs6pcX~lpX
zMV+_{yJfEWcCdX1iYy{7KN|c9+!jDsNWmHjsP(jBKu%nvijFZ92J0-}#+86K_ZTfC
zR#$wSv<(ozxcKok#3?47^>wv(kuuJYpm%a4?TcCa1jHcF89)fg_uy-Yd$(ZMX}fhG
z6}#Y{x!LQvyq!s{ci#ceO_grn7Q}fkY#m4eZ}Lles@-2|Uvj=Ra`LK?q(1D`J0Ku&
ztM}k$k06A2`=;RC4!Ct7CtspW`(p-$b&r!w%!%_mNM03<-4{mTUtPD#{MdnrP{?Kr
z5k$;$h(};#B3!{4Qfx>y-cn6>{o6(WkAG@DrrC&U$a8|9jBZ
z%nl;5zRO5)j~DQ}jwc=PkB#>4MI?4T<aL6svI|L;^no&kYb3QmjS-YCWwO
zkQ3Ly;ZO>L_2}P~fZmuwBy?Ahz=5FSr?m&-DmOf=?()yDv-uAI0RR8