Optional Services
Timezone
Overview
Provides device-wide timezone management exposed as a service named Time with parameters TZ (IANA timezone) and TZ-POSIX (POSIX TZ string). Both parameters are readable and writable.
Service and Parameters
Service name:
TimeParameters (under
params : Time):TZ(type string): IANA timezone name, e.g.,America/New_YorkTZ-POSIX(type string): POSIX timezone string, e.g.,EST5EDT,M3.2.0,M11.1.0
Both parameters have properties: read, write.
Behavior
Incoming parameter updates (from cloud)
When
TZis written:Node applies the timezone using the IANA name.
On success, node updates local state and derives the corresponding POSIX value, updating
TZ-POSIXas well.On failure, no state change is reported for either parameter.
When
TZ-POSIXis written:Node applies the timezone using the provided POSIX string.
On success, node updates local state for
TZ-POSIX.The IANA
TZwill not change since it cannot be derived from the POSIX string; onlyTZ-POSIXis guaranteed to update.
Whenever possible, it is preferred to update TZ instead of TZ-POSIX.
Local updates (from device)
When the device changes timezone locally (e.g., via internal API):
Node emits a timezone change event that updates the corresponding parameter(s) in the service state, ensuring shadows reflect the change.
State reporting
After successful changes (from cloud or local), node publishes updated parameters in the named shadow under
params : { "Time": { ... } }.Indexed shadow is not used for timezone parameters unless explicitly marked
indexedin node configuration (default: not indexed).
Examples
Write only
TZfrom cloud
// Incoming params request
{
"Time": {
"TZ": "America/New_York"
}
}
// Expected named shadow reported
{
"Time": {
"TZ": "America/New_York",
"TZ-POSIX": "EST5EDT,M3.2.0,M11.1.0"
}
}
Write only
TZ-POSIXfrom cloud
// Incoming params request
{
"Time": {
"TZ-POSIX": "CAT-2"
}
}
// Expected named shadow reported
{
"Time": {
"TZ-POSIX": "CAT-2"
}
}
Local update to IANA timezone
// Local API updates TZ to America/New_York
// Expected named shadow reported
{
"Time": {
"TZ": "America/New_York",
"TZ-POSIX": "EST5EDT,M3.2.0,M11.1.0"
}
}
Error Handling
If applying a timezone fails, the node should not update
TZorTZ-POSIXin reported state for that request.When
TZis accepted and applied but the POSIX string cannot be derived from it,TZis still updated in reported state andTZ-POSIXis left unchanged.
System
Overview
Provides device-wide system control operations exposed as a service named System with parameters for reboot, network reset, and factory reset. All parameters are boolean values that trigger actions when set to true.
Service and Parameters
Service name:
SystemParameters (under
params : System):Reboot(type boolean): Triggers device reboot when set totrueNetwork-Reset(type boolean): Triggers network reset when set totrueFactory-Reset(type boolean): Triggers factory reset when set totrue
All parameters have properties: read, write.
Behavior
Incoming parameter updates (from cloud)
When
Rebootis set totrue:Node initiates a reboot sequence after the configured delay
When
Network-Resetis set totrue:Node resets network configuration and may reboot after the configured delays
When
Factory-Resetis set totrue:Node performs a factory reset, clearing all configuration and may reboot after the configured delays
State reporting
After successful parameter writes, the node reports the parameter value back in the named shadow under
params : { "System": { ... } }Indexed shadow is not used for system parameters unless explicitly marked
indexedin node configuration (default: not indexed)
Configuration
The system service is enabled with a configuration struct whose flags field selects which params the service exposes. A param that is not selected is not created at all, so it does not appear in the node configuration:
SYSTEM_SERV_FLAG_REBOOT: Exposes theRebootparamSYSTEM_SERV_FLAG_NETWORK_RESET: Exposes theNetwork-ResetparamSYSTEM_SERV_FLAG_FACTORY_RESET: Exposes theFactory-ResetparamSYSTEM_SERV_FLAGS_ALL: All three
At least one flag is required. The rest of the configuration sets the timing and the platform hook:
reboot_seconds: delay before the reboot triggered byRebootreset_seconds: delay before a network/factory reset takes effectreset_reboot_seconds: delay before the reboot that follows a reset; a negative value means “do not reboot”network_reset_fn: callback that clears the platform’s network credentials. Required (non-NULL) whenever theNETWORK_RESETorFACTORY_RESETflag is set
Examples
Trigger reboot from cloud
{
"System": {
"Reboot": true
}
}
Trigger network reset from cloud
{
"System": {
"Network-Reset": true
}
}
Trigger factory reset from cloud
{
"System": {
"Factory-Reset": true
}
}
Error Handling
If a system operation fails to initiate, the parameter write should be rejected and no state change reported.
Local Control
Overview
Lets a client control the node over the local network, with no cloud round trip. This section covers the service the node reports to the cloud; the on-the-wire protocol a client speaks is specified separately in Local Control Endpoint Protocol, which is the authority on endpoints, framing and discovery.
Service name:
Local ControlTransport: HTTP (protocomm)
Service and Parameters
Parameter |
Type |
Access |
Description |
|---|---|---|---|
|
int |
read-only |
protocomm security version in use: |
|
string |
read-only |
Proof of Possession for the session |
|
string |
read-only |
SRP6a username; present only with security version |
POP is reported for both security versions. Whether a PoP is actually required comes
from the no_pop capability on the version endpoint, not from this parameter — a
security-1-without-PoP node reports an empty string here.
Security 0 is not supported.
Behavior
The service is added to the node when local control is enabled, and removed when it is disabled.
Challenge-response for on-network user-node association shares the same protocomm instance and session; it is an independently enable-able endpoint set, not a separate service. See the endpoint protocol spec for the four enabled/disabled combinations.
The HTTP port defaults to
CONFIG_ESP_RMAKER_LOCAL_CTRL_HTTP_PORT.The PoP is generated once and persisted, unless the application sets its own with
esp_rmaker_local_ctrl_set_pop()before enabling the service — which is how a device reuses the PoP printed on it (see the guides on factory provisioning).