Commands (cmd)
Commands are sent to m/<workspace>/c/<channel>/<mac>/cmd (or sentinel/<mac>/cmd on the rack LAN) as JSON with an action. The node replies on …/cmd/result.
{"action":"identify","seconds":60,"id":"req-1"}id is optional and returned in cmd/result. The result has the shape {"ok":true,"msg":"…"} or {"ok":false,"msg":"reason"}.
action |
Parameters | Function |
|---|---|---|
reboot |
restart the node | |
identify |
seconds |
buzzer and blue LED for that many seconds |
publish |
send data now (all telemetry groups) | |
rescan |
scan the DS18B20 bus; result: the discovered list and the bound map (slot → ROM) |
|
output |
output, state, seconds |
switch an output on or off (Digital outputs) |
ota |
url, sha256 |
one-off firmware install (Firmware and OTA) |
reset_config |
connection, keep_rules |
configuration back to default and reboot (Reset and moving racks) |
get_rules |
reply with the rules set content on rules/current |
|
rules_confirm |
hash |
make the pending rules set permanent |
rules_rollback |
cancel the pending set, or return to the previous set | |
get_sources, sources_confirm, sources_rollback |
hash for confirm |
like rules, for Modbus sources |
get_profiles, profiles_confirm, profiles_rollback |
hash for confirm |
like rules, for Modbus profiles |
get_tgroups, tgroups_confirm, tgroups_rollback |
hash for confirm |
like rules, for telemetry groups; get_tgroups also publishes tgroups/reported |
diag |
diagnostics (e.g. sensor reading quality) |
From a terminal:
python3 Tools/celestianctl.py cmd <mac> identify seconds=60python3 Tools/celestianctl.py cmd <mac> rebootpython3 Tools/celestianctl.py cmd <mac> rescanpython3 Tools/celestianctl.py cmd <mac> output output=o1 state=true seconds=30python3 Tools/celestianctl.py cmd <mac> ota url=/fw/snt-g1/edge-snt-g1-idf-0.21.1.binAn unknown command is answered with ok:false. The output command is rejected if the slot is not enabled or the PCF8574 does not answer.