mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-29 01:52:51 +00:00
add more example commands
This commit is contained in:
@@ -318,10 +318,10 @@ function updateMask(entity: any, de: any, dd: any) {
|
||||
const old_custom_name = dd.nodes[dd_objIndex].cn;
|
||||
console.log(
|
||||
'comparing names, old (' +
|
||||
old_custom_name +
|
||||
') with new (' +
|
||||
new_custom_name +
|
||||
')'
|
||||
old_custom_name +
|
||||
') with new (' +
|
||||
new_custom_name +
|
||||
')'
|
||||
);
|
||||
if (old_custom_name !== new_custom_name) {
|
||||
changed = true;
|
||||
@@ -438,9 +438,9 @@ function upgradeImportantMessages(version: string) {
|
||||
|
||||
console.log(
|
||||
'upgradeImportantMessageType: version=' +
|
||||
version +
|
||||
' type=' +
|
||||
upgradeImportantMessageType_n
|
||||
version +
|
||||
' type=' +
|
||||
upgradeImportantMessageType_n
|
||||
);
|
||||
return { upgradeImportantMessageType: upgradeImportantMessageType_n };
|
||||
}
|
||||
@@ -487,17 +487,17 @@ function get_versions() {
|
||||
|
||||
console.log(
|
||||
'getVersions: current=' +
|
||||
THIS_VERSION +
|
||||
' stable=' +
|
||||
LATEST_STABLE_VERSION +
|
||||
' (upgradeable=' +
|
||||
(STABLE_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
|
||||
') dev=' +
|
||||
LATEST_DEV_VERSION +
|
||||
' (upgradeable=' +
|
||||
(DEV_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
|
||||
')' +
|
||||
(MOCK_OFFLINE ? ' [offline]' : '')
|
||||
THIS_VERSION +
|
||||
' stable=' +
|
||||
LATEST_STABLE_VERSION +
|
||||
' (upgradeable=' +
|
||||
(STABLE_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
|
||||
') dev=' +
|
||||
LATEST_DEV_VERSION +
|
||||
' (upgradeable=' +
|
||||
(DEV_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
|
||||
')' +
|
||||
(MOCK_OFFLINE ? ' [offline]' : '')
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -4147,6 +4147,21 @@ let emsesp_customentities = {
|
||||
value_type: 0,
|
||||
writeable: true,
|
||||
value: 21
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
ram: 1,
|
||||
device_id: 0,
|
||||
type_id: 0,
|
||||
offset: 0,
|
||||
factor: 1,
|
||||
name: 'message',
|
||||
uom: 0,
|
||||
value_type: 9,
|
||||
writeable: true,
|
||||
hide: false,
|
||||
value:
|
||||
'{"stable":{"version":"3.8.2","date":"2026-05-12"},"dev":{"version":"3.8.3-dev.5","date":"2026-05-28T09:55:29Z"}}'
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -4189,6 +4204,18 @@ let emsesp_commands = {
|
||||
cmd: 'system/message',
|
||||
value: '"hello world"',
|
||||
name: 'send_message'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
cmd: 'custom/message',
|
||||
value: '{"url":"http://emsesp.org/versions.json"}',
|
||||
name: 'get_versions'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
cmd: 'system/sendmail',
|
||||
value: '"test email with version " + custom/message',
|
||||
name: 'sendmail'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user