add more example commands

This commit is contained in:
proddy
2026-06-25 22:02:31 +02:00
parent 1a603e70ec
commit 388b741d94

View File

@@ -318,10 +318,10 @@ function updateMask(entity: any, de: any, dd: any) {
const old_custom_name = dd.nodes[dd_objIndex].cn; const old_custom_name = dd.nodes[dd_objIndex].cn;
console.log( console.log(
'comparing names, old (' + 'comparing names, old (' +
old_custom_name + old_custom_name +
') with new (' + ') with new (' +
new_custom_name + new_custom_name +
')' ')'
); );
if (old_custom_name !== new_custom_name) { if (old_custom_name !== new_custom_name) {
changed = true; changed = true;
@@ -438,9 +438,9 @@ function upgradeImportantMessages(version: string) {
console.log( console.log(
'upgradeImportantMessageType: version=' + 'upgradeImportantMessageType: version=' +
version + version +
' type=' + ' type=' +
upgradeImportantMessageType_n upgradeImportantMessageType_n
); );
return { upgradeImportantMessageType: upgradeImportantMessageType_n }; return { upgradeImportantMessageType: upgradeImportantMessageType_n };
} }
@@ -487,17 +487,17 @@ function get_versions() {
console.log( console.log(
'getVersions: current=' + 'getVersions: current=' +
THIS_VERSION + THIS_VERSION +
' stable=' + ' stable=' +
LATEST_STABLE_VERSION + LATEST_STABLE_VERSION +
' (upgradeable=' + ' (upgradeable=' +
(STABLE_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') + (STABLE_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
') dev=' + ') dev=' +
LATEST_DEV_VERSION + LATEST_DEV_VERSION +
' (upgradeable=' + ' (upgradeable=' +
(DEV_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') + (DEV_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
')' + ')' +
(MOCK_OFFLINE ? ' [offline]' : '') (MOCK_OFFLINE ? ' [offline]' : '')
); );
return data; return data;
} }
@@ -4147,6 +4147,21 @@ let emsesp_customentities = {
value_type: 0, value_type: 0,
writeable: true, writeable: true,
value: 21 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', cmd: 'system/message',
value: '"hello world"', value: '"hello world"',
name: 'send_message' 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'
} }
] ]
}; };