Starts an emulator of a Shelly Gen3 relay with one switch (id 0) that only opens for a signed command. It answers
JSON-RPC at POST /rpc (Switch.Set, Switch.GetStatus, Shelly.GetDeviceInfo) and serves a status page at GET /.
Switch.Set needs an X-Umis-Command header whose signature comes from a trusted key and covers the exact body
(checked with verifyRelayCommand); a command works once. The output is derived from the clock, never from timers: it
is on while now is before the instant the flip-back timer ends. With digestPasswordEnv the call needs Shelly digest
authentication as well (user admin, SHA-256). Switch.GetStatus and Shelly.GetDeviceInfo need neither, so that
the status page can poll without credentials; they change nothing. Browser pages can call the emulator from the
origins in cors only.
Starts an emulator of a Shelly Gen3 relay with one switch (id 0) that only opens for a signed command. It answers JSON-RPC at
POST /rpc(Switch.Set,Switch.GetStatus,Shelly.GetDeviceInfo) and serves a status page atGET /.Switch.Setneeds anX-Umis-Commandheader whose signature comes from a trusted key and covers the exact body (checked withverifyRelayCommand); a command works once. The output is derived from the clock, never from timers: it is on whilenowis before the instant the flip-back timer ends. WithdigestPasswordEnvthe call needs Shelly digest authentication as well (useradmin, SHA-256).Switch.GetStatusandShelly.GetDeviceInfoneed neither, so that the status page can poll without credentials; they change nothing. Browser pages can call the emulator from the origins incorsonly.