Užitečné příkazy

#363

Vzdálený restart

mosquitto_pub -t "shp/iot-boxes/IOT-BOX-ID/cmd:reboot" -m ""

Nastavní úrovně logování

Úroveň logování je číslo od 1 (jen závažné chyby) až po 7 (všechno) a zadává se jako obsah zprávy.

mosquitto_pub -t "shp/iot-boxes/IOT-BOX-ID/cmd:logLevel" -m "7"

Upgrade firmware

Upgrade firmware se provádí obvykle z místního shipard-node.

Do obsahu zprávy se zadává velikost souboru s firmwarem v bajtech a URL na soubor. URL musí být s protokolem http a obvykle je ve formátu http://<IP-ADRESA-NODE-SERVERU>/<cesta-na-soubor>; upgrade přes https není podporován.

mosquitto_pub -t shp/iot-boxes/IOT-BOX-ID/cmd:fwUpgrade -m "826384 http://10.11.9.2/fw/ib/stable/iot-box-lan-core/0.91.1-9302944/iot-box-lan-core-esp32-poe-0.91.1-9302944-fw.bin"

Seznam lokálně dostupného firmware lze získat příkazem shipard-node fw-list:

### ib ###
 * stable
   - iot-box-lan-core; 0.91.1-9302944
         826400 fw/ib/stable/iot-box-lan-core/0.91.1-9302944/iot-box-lan-core-esp32-gateway-0.91.1-9302944-fw.bin
         826384 fw/ib/stable/iot-box-lan-core/0.91.1-9302944/iot-box-lan-core-esp32-poe-0.91.1-9302944-fw.bin
         922144 fw/ib/stable/iot-box-lan-core/0.91.1-9302944/iot-box-lan-core-esp32-wifi-0.91.1-9302944-fw.bin
### nextion ###
 * stable
   - rfid-access-tester; 0.8.1-7499b38
         943080 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX3224T024-0-0.8.1-7499b38.tft
         943080 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX3224T024-180-0.8.1-7499b38.tft
         942996 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX3224T024-270-0.8.1-7499b38.tft
         942996 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX3224T024-90-0.8.1-7499b38.tft
        1139544 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX8048T070-0-0.8.1-7499b38.tft
        1139544 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX8048T070-180-0.8.1-7499b38.tft
        1139580 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX8048T070-270-0.8.1-7499b38.tft
        1139580 fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX8048T070-90-0.8.1-7499b38.tft
   - rfid-access-terminal; 0.2.1-7499b38
        1740200 fw/nextion/stable/rfid-access-terminal/0.2.1-7499b38/rfid-access-terminal-NX4832T035-0-0.2.1-7499b38.tft
        1740200 fw/nextion/stable/rfid-access-terminal/0.2.1-7499b38/rfid-access-terminal-NX4832T035-180-0.2.1-7499b38.tft
        1741732 fw/nextion/stable/rfid-access-terminal/0.2.1-7499b38/rfid-access-terminal-NX4832T035-270-0.2.1-7499b38.tft
        1741732 fw/nextion/stable/rfid-access-terminal/0.2.1-7499b38/rfid-access-terminal-NX4832T035-90-0.2.1-7499b38.tft
   - rfid-reader; 0.3.1-7499b38
         946516 fw/nextion/stable/rfid-reader/0.3.1-7499b38/rfid-reader-NX3224T024-0-0.3.1-7499b38.tft
         946516 fw/nextion/stable/rfid-reader/0.3.1-7499b38/rfid-reader-NX3224T024-180-0.3.1-7499b38.tft
         946532 fw/nextion/stable/rfid-reader/0.3.1-7499b38/rfid-reader-NX3224T024-270-0.3.1-7499b38.tft
         946532 fw/nextion/stable/rfid-reader/0.3.1-7499b38/rfid-reader-NX3224T024-90-0.3.1-7499b38.tft

Upgrade firmware NEXTION displejů

mosquitto_pub -t shp/iot-boxes/IOT-BOX-ID/DISPLAY-PORT-ID:firmware -m "826384 http://10.11.9.2/fw/nextion/stable/rfid-access-tester/0.8.1-7499b38/rfid-access-tester-NX3224T024-90-0.8.1-7499b38.tft"