MQTT: Unterschied zwischen den Versionen
Lh (Diskussion | Beiträge) |
Ps (Diskussion | Beiträge) |
||
Zeile 10: | Zeile 10: | ||
<br />{"type": "portswitch", "idx": 2, "port": "2", "state": 1, "cause": {"id": 2, "txt": "http"}, "ts": 1632} | <br />{"type": "portswitch", "idx": 2, "port": "2", "state": 1, "cause": {"id": 2, "txt": "http"}, "ts": 1632} | ||
<br /> | <br /> | ||
− | <br />Dies ist ein Schalten des zweiten Ports in den Zustand ("state") on. Die Quelle des Schaltkommando ist CGI ("http"). Der Index ist immer numerisch, "port" kann bei Geräten mit mehreren Banks auch alphanumerisch sein, z.B. "A2". Am Ende folgt ein timestamp ("ts"), der die | + | <br />Dies ist ein Schalten des zweiten Ports in den Zustand ("state") on. Die Quelle des Schaltkommando ist CGI ("http"). Der Index ist immer numerisch, "port" kann bei Geräten mit mehreren Banks auch alphanumerisch sein, z.B. "A2". Am Ende folgt ein timestamp ("ts"), der die Anzahl der Sekunden anzeigt, die das Gerät eingeschaltet ist, oder im Unix Format in der lokalen Zeitzone, wenn das Gerät sich mit einem NTP-Server synchronisiert hat. |
='''MQTT Topic Prefix'''= | ='''MQTT Topic Prefix'''= |
Aktuelle Version vom 25. November 2024, 09:03 Uhr
Dieses Gerät unterstützt MQTT 3.1.1 um konfigurierte Nachrichten zu verschicken, und auch Kommandos entgegenzunehmen. Dieses Kapitel ist für alle Gude Geräte allgemein gehalten, manche Gude Modelle haben keine schaltbaren Ports.
- Default Port für eine unverschlüsselte Verbindung ist Port 1883.
- Default Port für eine TLS gesicherte Verbindung ist Port 8883.
- Wenn der Broker einen anonymen Login erlaubt, sind Benutzername und Passwort beliebig, aber ein Benutzername muss angegeben werden.
- Wenn mehrere MQTT Clients mit einem Broker verbunden sind, müssen die Namen der Clients verschieden sein. Aus diesem Grund wird als Default Name "client_xxxx" generiert. Dabei sind "xxxx" die 4 letzten Stellen der MAC-Adresse.
Nachrichtenformat
Die MQTT Nachrichten des Gerätes werden immer im JSON Format verschickt. Z.B.
{"type": "portswitch", "idx": 2, "port": "2", "state": 1, "cause": {"id": 2, "txt": "http"}, "ts": 1632}
Dies ist ein Schalten des zweiten Ports in den Zustand ("state") on. Die Quelle des Schaltkommando ist CGI ("http"). Der Index ist immer numerisch, "port" kann bei Geräten mit mehreren Banks auch alphanumerisch sein, z.B. "A2". Am Ende folgt ein timestamp ("ts"), der die Anzahl der Sekunden anzeigt, die das Gerät eingeschaltet ist, oder im Unix Format in der lokalen Zeitzone, wenn das Gerät sich mit einem NTP-Server synchronisiert hat.
MQTT Topic Prefix
Das Topic Prefix für die Nachrichten ist in der MQTT Konfiguration einstellbar. Ein Default wäre z.B. "de/gudesystems/epc/[mac]". Hier steht "[mac]" als Platzhalter für die MAC-Adresse des Gerätes, ein weiterer möglicher Platzhalter ist "[host]", der den Host-Namen beinhaltet. Ein Beispiel Topic für eine Schaltnachricht des zweites Ports wäre dann:
"de/gudesystems/epc/00:19:32:01:16:41/switch/2".
Ausführen von Konsolen Kommandos
Das Gerät kann über MQTT komplett mit Konsolen Kommandos ferngesteuert werden. Eine Liste aller Kommandos findet sich im Kapitel Konsole . Je nach Topic werden die Kommandos in verschiedenen Formaten angenommen.
Als Default ist das Ausführen vom Kommandos nicht erlaubt, sondern muss in der MQTT Konfiguration ("Permit CLI commands") freigeschaltet werden!
Format 1: Kommando in JSON Syntax
Publish Topic: "de/gudesystems/epc/00:19:32:01:16:41/cmd"
Publish Message: "{"type": "cli", "cmd": "port 2 state set 1", "id": 10}"
Antwort vom Gerät an "de/gudesystems/epc/00:19:32:01:16:41/cmdres"
"{"type": "cli", "cmdres": ["OK."], "result": {"num": 0, "hint": "ok"}, "id": 10}"
Das JSON Objekt "result" gibt zurück, ob das Kommando valide war. Das Objekt "id" im Kommando ist optional und wird in der Antwort vom Gerät durchgereicht. Die Übergebene Nummer kann helfen eine Synchronizität zwischen Kommando und Antwort über den Broker herzustellen.
Format 2: Raw Text
Publish Topic: "de/gudesystems/epc/00:19:32:01:16:41/cmd/cli"
Publish Message: "port 2 state set 1"
Antwort vom Gerät an "de/gudesystems/epc/00:19:32:01:16:41/cmdres/cli"
"OK."
Format 3: Vereinfachtes Port schalten
Publish Topic: "de/gudesystems/epc/00:19:32:01:16:41/cmd/port/2"
Publish Message: "0" oder "1"
Antwort vom Gerät an "de/gudesystems/epc/00:19:32:01:16:41/cmdres/port/2"
"0" oder "1"
Diese Spezialform existiert nur für die Port Schaltbefehle.
Device Data Summary
In der Device Data Summary werden in einem JSON Objekt die wichtigsten Daten des Gerätes zusammengefasst und in einem konfigurierbaren Zeitintervall periodisch verschickt. Diese Zusammenfassung hängt von den Eigenschaftes des Gerätes und der angeschlossenen Sensoren ab, und könnte z.B. so aussehen:
Topic: de/gudesystems/epc/00:19:32:01:16:41/device/telemetry
Nachricht:
Befehlsliste
logout | go to login prompt when enabled |
quit | quits telnet session - nothing in serial console |
back | back one cmd level |
help | show all cmds from this level |
help all | show all cmds |
clock | enters cmd group "clock" |
clock ntp enabled set {OFF=0|ON=1} | enables ntp |
clock ntp enabled show | shows if ntp enabled |
clock timezone set {minutes} | sets timezone |
clock timezone show | shows timezone |
clock dst enabled set {OFF=0|ON=1} | enables dst |
clock dst enabled show | shows if dst is enabled |
clock manual set "{hh:mm:ss yyyy-mm-dd}" | sets time and date manually |
clock show | shows actual time and date |
clock ntp server {PRIMARY=0|BACKUP=1} set "{dns_name}" | sets ntp server name |
clock ntp server {PRIMARY=0|BACKUP=1} show | shows ntp server name |
console | enters cmd group "console" |
console version | shows unique console version number |
console telnet enabled set {OFF=0|ON=1} | enables telnet on/off |
console telnet enabled show | shows if telnet enabled |
console telnet port set {ip_port} | sets telnet port |
console telnet port show | shows telnet port |
console telnet raw set {OFF=0|ON=1} | sets raw mode (disables editing) on/off |
console telnet raw show | shows if raw mode enabled |
console telnet echo set {OFF=0|ON=1} | enables echo on/off |
console telnet echo show | shows if echo enabled |
console telnet activeneg set {OFF=0|ON=1} | enables telnet active negotiation (IAC) on/off |
console telnet activeneg show | shows if active negotiation enabled |
console telnet login set {OFF=0|ON=1} | enables login on/off |
console telnet login show | shows if login enabled |
console telnet login local set {OFF=0|ON=1} | enables local login on/off |
console telnet login local show | shows if local login enabled |
console telnet login radius set {OFF=0|ON=1} | enables login for RADIUS on/off |
console telnet login radius show | shows if RADIUS login enabled |
console telnet login delay set {OFF=0|ON=1} | enables delay (after 3 login fails) on/off |
console telnet login delay show | shows if login delay enabled |
console telnet pushmsgs config set {OFF=0|ON=1} | enables persistent push msgs |
console telnet pushmsgs config show | shows if persistent push msgs are enabled |
console telnet pushmsgs set {OFF=0|ON=1} | enables temporary push msgs |
console telnet pushmsgs show | shows if temporary push msgs are enabled |
console telnet user set "{username}" | sets login user name |
console telnet user show | shows login user name |
console telnet passwd set "{passwd}" | sets login password |
console telnet passwd hash set "{passwd}" | sets login hashed password |
console ssh enabled set {OFF=0|ON=1} | enables SSH |
console ssh enabled show | shows if SSH enabled |
console ssh port set {ip_port} | sets SSH port |
console ssh port show | shows SSH port |
console ssh echo set {OFF=0|ON=1} | enables echo on/off |
console ssh echo show | shows if echo enabled |
console ssh pushmsgs config set {OFF=0|ON=1} | enables persistent push msgs |
console ssh pushmsgs config show | shows if persistent push msgs are enabled |
console ssh pushmsgs set {OFF=0|ON=1} | enables temporary push msgs |
console ssh pushmsgs show | shows if temporary push msgs are enabled |
console ssh public hash set "{passwd}" | sets hash of SSH public key |
console ssh public hash show | shows hash of SSH public key |
console serial enabled set {OFF=0|ON=1} | enables serial console on/off |
console serial enabled show | shows if serial console enabled |
console serial raw set {OFF=0|ON=1} | sets raw mode (disables editing) on/off |
console serial raw show | shows if raw mode enabled |
console serial echo set {OFF=0|ON=1} | enables echo on/off |
console serial echo show | shows if echo enabled |
console serial kvm set {OFF=0|ON=1} | enables binary KVM cmds on serial port on/off |
console serial kvm show | shows if binary KVM cmds enabled |
console serial utf8 set {OFF=0|ON=1} | enables UTF8 support |
console serial utf8 show | shows if UTF8 enabled |
console serial login set {OFF=0|ON=1} | enables login on/off |
console serial login show | shows if login enabled |
console serial login local set {OFF=0|ON=1} | enables local login on/off |
console serial login local show | shows if local login enabled |
console serial login radius set {OFF=0|ON=1} | enables login for RADIUS on/off |
console serial login radius show | shows if RADIUS login enabled |
console serial login delay set {OFF=0|ON=1} | enables delay (after 3 login fails) on/off |
console serial login delay show | shows if login delay enabled |
console serial pushmsgs config set {OFF=0|ON=1} | enables persistent push msgs |
console serial pushmsgs config show | shows if persistent push msgs are enabled |
console serial pushmsgs set {OFF=0|ON=1} | enables temporary push msgs |
console serial pushmsgs show | shows if temporary push msgs are enabled |
console serial user set "{username}" | sets login user name |
console serial user show | shows login user name |
console serial passwd set "{passwd}" | sets login password |
console serial passwd hash set "{passwd}" | sets login hashed password |
enters cmd group "email" | |
email enabled set {OFF=0|ON=1} | enables email on/off |
email enabled show | shows if email is enabled |
email sender set "{email_addr}" | sets email sender address |
email sender show | shows email sender address |
email recipient set "{email_addr}" | sets email recipient address |
email recipient show | shows email recipient address |
email server set "{dns_name}" | sets email SMTP server address |
email server show | shows email SMTP server address |
email port set {ip_port} | sets email SMTP port |
email port show | shows email SMTP port |
email security set {NONE=0|STARTTLS=1|SSL=2} | sets SMTP connection security |
email security show | shows SMTP connection security |
email auth set {NONE=0|PLAIN=1|LOGIN=2} | sets email authentication |
email auth show | show email authentication |
email user set "{username}" | sets SMTP username |
email user show | shows SMTP username |
email passwd set "{passwd}" | sets SMTP password |
email passwd hash set "{passwd}" | sets crypted SMTP password |
email testmail | send test email |
ethernet | enters cmd group "ethernet" |
ethernet mac show | shows MAC address |
ethernet link show | shows ethernet link state |
ethernet phyprefer set {10MBIT_HD=0|10MBIT_FD=1|100MBIT_HD=2|100MBIT_FD=3} | sets preferred speed for PHY Auto Negotiation |
ethernet phyprefer show | shows preferred speed for PHY Auto Negotiation |
extinput | enters cmd group "extinput" |
extinput {port_num} {inp_num} state show | shows input state |
extinput all state {MODE0=0|MODE1=1|MODE2=2} show | shows input state of all ports in 3 different view modes |
extinput {port_num} {inp_num} name set "{name}" | sets sensor name to label |
extinput {port_num} {inp_num} name show | shows label of sensor |
extinput {port_num} {inp_num} invert enabled set {OFF=0|ON=1} | inverts input on/off |
extinput {port_num} {inp_num} invert enabled show | shows if input inverted |
extinput {port_num} {inp_num} label {LOW=0|HIGH=1} set "{name}" | sets input low/high text |
extinput {port_num} {inp_num} label {LOW=0|HIGH=1} show | shows input low/high text |
extinput {port_num} {inp_num} events set {OFF=0|ON=1} | enables input events on/off |
extinput {port_num} {inp_num} events show | shows if input events are enabled |
extinput {port_num} {inp_num} events type set "{EVT_SYSLOG=0,EVT_SNMP=1,EVT_EMAIL=2
,EVT_BEEPER=5,EVT_DISPLAY=6,EVT_CONS OLE=7,EVT_MQTT=8}" |
enables different event types |
extinput {port_num} {inp_num} events type show | shows what event types are enabled |
extinput {port_num} {inp_num} publish mode set
{NONE=0|INTERVAL=1|DELTA=2| INTERV_DELTA=3} |
sets publish mode |
extinput {port_num} {inp_num} publish mode show | showshows publish mode |
extinput {port_num} {inp_num} publish mqtt retain set {OFF=0|ON=1} | sets mqtt retain |
extinput {port_num} {inp_num} publish mqtt retain show | shows if mqtt retain set |
extinput {port_num} {inp_num} publish timer set {num_secs} | sets publish time interval |
extinput {port_num} {inp_num} publish timer show | shows publish time interval |
extinput {port_num} {inp_num} {LOW=0|HIGH=1} port set {port_num} | sets Port for Power Port Switching actions |
extinput {port_num} {inp_num} {LOW=0|HIGH=1} port show | shows Port for Power Port Switching actions |
extinput {port_num} {inp_num} {LOW=0|HIGH=1 state set {OFF=0|ON=1|DISABLED=2} | sets Port state for Power Port Switching actions |
extinput {port_num} {inp_num} {LOW=0|HIGH=1} state show | shows Port state for Power Port Switching actions |
extsensor | enters cmd group "extsensor" |
extsensor all show | shows all values from connected external sensors |
extsensor all show | shows all plugged sensors and fields |
extsensor {port_num} {sen_field} value show | shows sensor value |
extsensor {port_num} {sen_type} label set "{name}" | sets sensor name to label |
extsensor {port_num} {sen_type} label show | shows label of sensor |
extsensor {port_num} type show | shows type of sensor |
extsensor {port_num} {sen_type} {sen_field} events set {off=0|on=1} | enables sensor events on/off |
extsensor {port_num} {sen_type} {sen_field} events show | shows if sensor events are enabled |
extsensor {port_num} {sen_type} {sen_field}
events type set "{EVT_SYSLOG=0,EVT_SNMP=1,EVT_EMAIL=2 ,EVT_SMS=3,EVT_GSMEMAIL=4,EVT_BEEPER =5,EVT_DISPLAY=6,EVT_CONSOLE=7,EVT_M QTT=8}" |
enables different event types |
extsensor {port_num} {sen_type} {sen_field} events type show | shows what event types are enabled |
extsensor {port_num} {sen_type} {sen_field}
events beeper mode set {CONTINOUS=0| INTERMITTENT=1} |
sets beeper tone |
extsensor {port_num} {sen_type} {sen_field} events beeper mode show | shows beeper tone |
extsensor {port_num} {sen_type} {sen_field} maxval set {num} | sets maximum value for sensor |
extsensor {port_num} {sen_type} {sen_field} maxval show | shows maximum value for sensor |
extsensor {port_num} {sen_type} {sen_field} minval set {num} | sets minimum value for sensor |
extsensor {port_num} {sen_type} {sen_field} minval show | shows minimum value for sensor |
extsensor {port_num} {sen_type} {sen_field} hyst set {num} | sets hysterese value for sensor |
extsensor {port_num} {sen_type} {sen_field} hyst show | shows hysterese value for sensor |
extsensor {port_num} {sen_type} {sen_field}
publish mode set {NONE=0|INTERVAL=1| DELTA=2|INTERV_DELTA=3} |
sets publish mode |
extsensor {port_num} {sen_type} {sen_field} publish mode show | shows publish mode |
extsensor {port_num} {sen_type} {sen_field} publish mqtt retain set {OFF=0|ON=1} | sets mqtt retain |
extsensor {port_num} {sen_type} {sen_field} publish mqtt retain show | shows if mqtt retain set |
extsensor {port_num} {sen_type} {sen_field} publish timer set {num_secs} | sets publish time interval |
extsensor {port_num} {sen_type} {sen_field} publish timer show | shows publish time interval |
extsensor {port_num} {sen_type} {sen_field} publish delta set {float} | sets publish delta value |
extsensor {port_num} {sen_type} {sen_field} publish delta show | shows publish delta value |
extsensor {port_num} {sen_type} {sen_field}
{BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2| BELOWMAX=3} port set {port_num} |
sets Port for Power Port Switching actions |
extsensor {port_num} {sen_type} {sen_field}
{BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2| BELOWMAX=3} port show |
shows Port for Power Port Switching actions |
extsensor {port_num} {sen_type} {sen_field}
{BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2| BELOWMAX=3} state set {OFF=0|ON=1| DISABLED=2} |
sets Port state for Power Port Switching actions |
extsensor {port_num} {sen_type} {sen_field}
{BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2| BELOWMAX=3} state show |
shows Port state for Power Port Switching actions |
extsensor period set {24H=0|12H=1|2H=2|1H=3|30MIN=4} | sets sensor Min/Max measurement period |
extsensor period show | shows sensor Min/Max measurement period |
extsensor beeper set {OFF=0|ON=1} | enables beeper sensor alarms |
extsensor beeper show | shows if beeper sensor alarms are enabled |
extsensor {port_num} {sen_field} calib set {float} | sets calibration offset for temperature or humidity |
extsensor {port_num} {sen_field} calib show | shows calibration offset for temperature or humidity |
http | enters cmd group "http" |
http server set {HTTP_BOTH=0|HTTPS_ONLY=1|HTTP_ONLY=22|HTTPS_REDIR=3} | sets accepted connection types |
http server show | shows accepted connection types |
http port set {ip_port} | sets http port |
http port show | shows http port |
http portssl set {ip_port} | sets https port |
http portssl show | shows https port |
http tls mode set {TLS12=0|TLS13_12=1|TLS13=2|TLS13_12_11=3} | restricts TLS mode |
http tls mode show | shows TLS mode restriction |
http auth mode set {BASIC=0|SESSION=1|SESSION_EXT=2} | sets http session authentication mode |
http auth mode show | shows http session authentication mode and compatibility |
http passwd enabled set {OFF=0|ON=1} | enables http password on/off |
http timeout admin set {num_secs} | sets admin session timeout |
http timeout admin show | shows admin session timeout |
http timeout user set {num_secs} | sets user session timeout |
http timeout user show | shows user session timeout |
http passwd enabled show | shows if http password enabled |
http passwd local set {OFF=0|ON=1} | enables local login on/off |
http passwd local show | shows if local login enabled |
http passwd radius set {OFF=0|ON=1} | enables login for RADIUS on/off |
http passwd radius show | shows if RADIUS login enabled |
http passwd user set "{passwd}" | sets http user password |
http passwd admin set "{passwd}" | sets http admin password |
http passwd hash user set "{passwd}" | sets hashed http user password
http passwd hash admin set "{passwd}" sets hashed http admin password |
ip4 | enters cmd group "ip4" |
ip4 hostname set "{name}" | sets device hostname |
ip4 hostname show | shows device hostname |
ip4 address set "{ip_address}" | sets IPv4 address |
ip4 address show | shows IPv4 address |
ip4 netmask set "{ip_address}" | sets IPv4 netmask |
ip4 netmask show | shows IPv4 netmask |
ip4 gateway set "{ip_address}" | sets IPv4 gateway address |
ip4 gateway show | shows IPv4 gateway address |
ip4 dns set "{ip_address}" | sets IPv4 DNS server address |
ip4 dns show | shows IPv4 DNS server address |
ip4 dhcp enabled set {OFF=0|ON=1} | enables IPv4 DHCP on/off |
ip4 dhcp enabled show | shows IPv4 DHCP state |
ip6 | enters cmd group "ip6" |
ip6 enabled set {OFF=0|ON=1} | enables IPv6 on/off |
ip6 enabled show | shows if IPv6 is enabled |
ip6 routadv enabled set {OFF=0|ON=1} | enables IPv6 router advertisement |
ip6 routadv enabled show | shows IPv6 router advertisement state |
ip6 dhcp enabled set {OFF=0|ON=1} | enables IPv6 DHCP on/off |
ip6 dhcp enabled show | shows if IPv6 DHCP is enabled |
ip6 address show | show all IPv6 addresses |
ip6 gateway show | show all IPv6 gateways |
ip6 dns show | show all IPv6 DNS server |
ip6 manual enabled set {OFF=0|ON=1} | enables manual IPv6 addresses |
ip6 manual enabled show | shows if manual IPv6 addresses are enabled |
ip6 manual address {1..4} set "{ip_address}" | sets manual IPv6 address |
ip6 manual address {1..4} show | shows manual IPv6 address |
ip6 manual gateway set "{ip_address}" | sets manual IPv6 gateway address |
ip6 manual gateway show | shows manual IPv6 gateway address |
ip6 manual dns {1..2} set "{ip_address}" | sets manual IPv6 DNS server address |
ip6 manual dns {1..2} show | shows manual IPv6 DNS server address |
ipacl | enters cmd group "ipacl" |
ipacl ping enabled set {OFF=0|ON=1} | enables ICMP ping on/off |
ipacl ping enabled show | shows if ICMP ping enabled |
ipacl enabled set {OFF=0|ON=1} | enable IP filter on/off |
ipacl enabled show | shows if IP filter enabled |
ipacl filter {ipacl_num} set "{dns_name}" | sets IP filter {ipacl_num} |
ipacl filter {ipacl_num} show | shows IP filter {ipacl_num} |
linesensor | enters cmd group "linesensor" |
linesensor all {field_list} show | shows energy sensors according field list of all line sensors |
linesensor {line_num} {field_list} show | shows energy sensors according field list of one line sensor |
linesensor {line_num} {energy_sensor} value show | shows energy sensor of given line |
linesensor {line_num} ovp show | show state of Overvoltage Protection |
linesensor {line_num} counter reset | resets energy metering counter |
linesensor {line_num} label set "{name}" | sets line meter to label |
linesensor {line_num} label show | shows label of line meter |
linesensor {line_num} {energy_sensor} events set {OFF=0|ON=1} | enables events on/off |
linesensor {line_num} {energy_sensor} events show | shows if events are enabled |
linesensor {line_num} {energy_sensor} events type set "{EVT_SYSLOG=0,EVT_SNMP=1,EVT_EMAIL=2,EVT_SMS=3,EVT_GSMEMAIL=4,EVT_BEEPER =5}" | enables different event types |
linesensor {line_num} {energy_sensor} events type show | shows what event types are enabled |
linesensor {line_num} {energy_sensor} events beeper mode set {CONTINOUS=0| INTERMITTENT=1} | sets beeper tone |
linesensor {line_num} {energy_sensor} events beeper mode show | shows beeper tone |
linesensor {line_num} {energy_sensor} maxval set {float} | sets maximum value for line meter |
linesensor {line_num} {energy_sensor} maxval show | shows maximum value for line meter |
linesensor {line_num} {energy_sensor} minval set {float} | sets minimum value for line meter |
linesensor {line_num} {energy_sensor} minval show | shows minimum value for line meter |
linesensor {line_num} {energy_sensor} hyst set {float} | sets hysterese value for line meter |
linesensor {line_num} {energy_sensor} hyst show | shows hysterese value for line meter |
linesensor {line_num} {energy_sensor} publish mode set {NONE=0|INTERVAL=1|DELTA=2| INTERV_DELTA=3} | sets publish mode |
linesensor {line_num} {energy_sensor} publish mode show | shows publish mode |
linesensor {line_num} {energy_sensor} publish mqtt retain set {OFF=0|ON=1} | sets mqtt retain |
linesensor {line_num} {energy_sensor} publish mqtt retain show | shows if mqtt retain set |
linesensor {line_num} {energy_sensor} publish timer set {num_secs} | sets publish time interval |
linesensor {line_num} {energy_sensor} publish timer show | shows publish time interval |
linesensor {line_num} {energy_sensor} publish delta set {float} | sets publish delta value |
linesensor {line_num} {energy_sensor} publish delta show | shows publish delta value |
linesensor {line_num} {energy_sensor}
{BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2| BELOWMAX=3} port set {port_num} |
sets Port for Power Port Switching actions |
linesensor {line_num} {energy_sensor} {BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2|
BELOWMAX=3} port show |
shows Port for Power Port Switching actions |
linesensor {line_num} {energy_sensor} {BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2|
BELOWMAX=3} state set {OFF=0|ON=1| DISABLED=2} |
sets Port state for Power Port Switching actions |
linesensor {line_num} {energy_sensor} {BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2|
BELOWMAX=3} state show |
shows Port state for Power Port Switching actions |
linesensor {line_num} events set {OFF=0|ON=1} | LEGACY - enables events on/off |
linesensor {line_num} events show | LEGACY - shows if events are enabled |
linesensor {line_num} events type set "{EVT_SYSLOG=0,EVT_SNMP=1,EVT_EMAIL=2
,EVT_SMS=3,EVT_GSMEMAIL=4,EVT_BEEPER=5,EVT_DISPLAY=6,EVT_CONSOLE=7,EVT_M QTT=8}" |
LEGACY - enables different event types |
linesensor {line_num} events type show | LEGACY - shows what event types are enabled |
linesensor {line_num} maxval set {float} | LEGACY - sets maximum value for line meter |
linesensor {line_num} maxval show | LEGACY - shows maximum value for line meter |
linesensor {line_num} minval set {float} | LEGACY - sets minimum value for line meter |
linesensor {line_num} minval show | LEGACY - shows minimum value for line meter |
linesensor {line_num} hyst set {float} | LEGACY - sets hysterese value for line meter |
linesensor {line_num} hyst show | LEGACY - shows hysterese value for line meter |
linesensor {line_num} {BELOWMIN=0| ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3}
port set {port_num} |
LEGACY - sets Port for Power Port Switching actions |
linesensor {line_num} {BELOWMIN=0| ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3}
port show |
LEGACY - shows Port for Power Port Switching actions |
linesensor {line_num} {BELOWMIN=0|ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3}
state set {OFF=0|ON=1|DISABLED=2} |
LEGACY - sets Port state for Power Port Switching actions |
linesensor {line_num} {BELOWMIN=0| ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3}
state show |
LEGACY - shows Port state for Power Port
Switching actions |
linesensor beeper set {OFF=0|ON=1} | enables beeper for line meter alarms |
linesensor beeper show | shows if beeper for line meter alarms is enabled |
modbus | enters cmd group "modbus" |
modbus enabled set <off=0/on=1> | enables Modbus TCP support |
modbus enabled show | shows if Modbus is enabled |
modbus port set <ip_port> | sets Modbus TCP port |
modbus port show | shows Modbus TCP port |
mqtt | enters cmd group "mqtt" |
mqtt {broker_idx} enabled set {OFF=0|ON=1} | enable mqtt |
mqtt {broker_idx} enabled show | shows if mqtt enabled |
mqtt {broker_idx} server set "{dns_name}" | sets broker name |
mqtt {broker_idx} server show | shows broker name |
mqtt {broker_idx} tls enabled set {OFF=0|ON=1} | enable TLS |
mqtt {broker_idx} tls enabled show | shows if TLS enabled |
mqtt {broker_idx} port set {ip_port} | set broker TCP/IP port |
mqtt {broker_idx} port show | shows broker TCP/IP port |
mqtt {broker_idx} user set "{username}" | sets username |
mqtt {broker_idx} user show | shows username |
mqtt {broker_idx} passwd set "{passwd}" | sets password |
mqtt {broker_idx} passwd hash set "{passwd}" | sets hashed passwd |
mqtt {broker_idx} client set "{name}" | sets client name |
mqtt {broker_idx} client show | shows client name |
mqtt {broker_idx} qos set {QOS0=0|QOS1=1} | sets QoS level |
mqtt {broker_idx} qos show | shows QoS level |
mqtt {broker_idx} keepalive set {num_secs} | sets keep-alive time |
mqtt {broker_idx} keepalive show | shows keep-alive time |
mqtt {broker_idx} topic set "{name}" | sets topic prefix |
mqtt {broker_idx} topic show | shwos topic prefix |
mqtt {broker_idx} console enabled set {OFF=0| ON=1} | permit console cmds |
mqtt {broker_idx} console enabled show | shows if console cmds allowed |
mqtt {broker_idx} device data timer set {num_secs} | sets telemetry interval |
mqtt {broker_idx} device data timer show | shows telemetry interval |
port | enters cmd group "port" |
port {port_num} state set {OFF=0|ON=1} | sets port to new state |
port {port_num} state show | shows port state |
port all state set "{port_list}" {OFF=0|ON=1} | sets several ports in one cmd - e.g. port all state set "1,3,5" 1 |
port all state {MODE0=0|MODE1=1|MODE2=2} show | shows all port states in 3 different view modes |
port all set {OFF=0|ON=1|OFF_REV=2|ON_REV=3} | switch all ports on/off forward or reverse |
port restart all set {REINIT=0| OFF_REV_REINIT=1,OFF_REINIT=2} | reinit coldstart sequence (optional first all off) |
port {port_num} reset | start reset sequence for port |
port {port_num} toggle | toggles port |
port {port_num} batch set {OFF=0|ON=1} wait {num_secs} {OFF=0|ON=1} | starts batch mode for port |
port {port_num} batch cancel | cancels batch mode |
port {port_num} label set "{name}" | sets port label name |
port {port_num} label show | shows port label name |
port {port_num} initstate coldstart set {OFF=0| ON=1|REMEMBER=2} | sets port coldstart initialization |
port {port_num} initstate coldstart show | shows port coldstart initialization |
port {port_num} initstate delay set {num} | sets port init delay |
port {port_num} initstate delay show | shows port init delay |
port {port_num} repowerdelay set {num} | sets port repower delay |
port {port_num} repowerdelay show | shows port repower delay |
port {port_num} resettime set {num} | sets port reset duration |
port {port_num} resettime show | shows port reset duration |
port {port_num} watchdog enabled set {OFF=0| ON=1} | sets port watchdog to on/off |
port {port_num} watchdog enabled show | shows port watchdog state |
port {port_num} watchdog mode set {OFF=0| PORT_RESET=1|IP_MS=2|IP_MS_INV=3} | sets port watchdog mode |
port {port_num} watchdog mode show | shows port watchdog mode |
port {port_num} watchdog type set {WD_ICMP=0| WD_TCP=1} | sets port watchdog type |
port {port_num} watchdog type show | shows port watchdog type |
port {port_num} watchdog link down set {OFF=0| ON=1} | sets if watchdog active when eth link down |
port {port_num} watchdog link down show | shows if watchdog active when eth link down |
port {port_num} watchdog host set "{dns_name}" | sets port watchdog host target |
port {port_num} watchdog host show | shows port watchdog host target |
port {port_num} watchdog port set {ip_port} | sets port watchdog TCP port |
port {port_num} watchdog port show | shows port watchdog TCP port |
port {port_num} watchdog pinginterval set {num} | sets port watchdog ping interval |
port {port_num} watchdog pinginterval show | shows port watchdog ping interval |
port {port_num} watchdog pingretries set {num} | sets port watchdog ping retries |
port {port_num} watchdog pingretries show | shows port watchdog ping retries |
port {port_num} watchdog retrybooting set {OFF=0|ON=1} | sets port watchdog retry booting to on/off |
port {port_num} watchdog retrybooting show | shows port watchdog retry booting state |
port {port_num} watchdog bootretries set {num} | sets port watchdog retry boot timeout |
port {port_num} watchdog bootretries show | hows port watchdog retry boot timeout |
radius | enters cmd group "radius" |
radius {PRIMARY=0|SECONDARY=1} enabled set <off=0/on=1> | enables radius client |
radius {PRIMARY=0|SECONDARY=1} enabled show | show if radius client enabled |
radius {PRIMARY=0|SECONDARY=1} server set "<dns_name>" | sets radius server address |
radius {PRIMARY=0|SECONDARY=1} server show | shows radius server address |
radius {PRIMARY=0|SECONDARY=1} password set "{passwd}" | sets radius server shared secret |
radius {PRIMARY=0|SECONDARY=1} password hash set "{passwd}" | sets radius server crypted shared secret |
radius {PRIMARY=0|SECONDARY=1} auth timeout set {num_secs} | sets server request timeout |
radius {PRIMARY=0|SECONDARY=1} auth timeout show | shows server request timeout |
radius {PRIMARY=0|SECONDARY=1} retries set {0..99} | sets server number of retries |
radius {PRIMARY=0|SECONDARY=1} retries show | shows server number of retries |
radius chap enabled set <off=0/on=1> | enables CHAP |
radius chap enabled show | shows if CHAP is enabled |
radius message auth set <off=0/on=1> | enables request message authentication |
radius message auth show | shows if request message authentication is enabled |
radius default timeout set {num_secs} | sets default session timeout (when not returned as Session-Timout Attribute) |
radius default timeout show | shows default session timeout |
rcmb | enters cmd group "rcmb" |
rcmb {mod_num} state show | show rcmb module state |
rcmb {mod_num} {RMS=0|DC=1} value show | shows RMS/DC RC values |
rcmb {mod_num} {RMS=0|DC=1} output show | shows module RMS/DC outputs |
rcmb {mod_num} {RMS=0|DC=1} events set {OFF=0|ON=1} | enables sensor events on/off |
rcmb {mod_num} {RMS=0|DC=1} events show | shows if sensor events are enabled |
rcmb {mod_num} {RMS=0|DC=1} events type set "{EVT_SYSLOG=0,EVT_SNMP=1,EVT_EMAIL=2,EVT_BEEPER=5,EVT_DISPLAY=6,EVT_CONS
OLE=7,EVT_MQTT=8}" |
enables different event types |
rcmb {mod_num} {RMS=0|DC=1} events type show | shows what event types are enabled |
rcmb {mod_num} {RMS=0|DC=1} events beeper mode set {CONTINOUS=0|INTERMITTENT=1} | sets beeper tone |
rcmb {mod_num} {RMS=0|DC=1} events beeper mode show | shows beeper tone |
rcmb {mod_num} {RMS=0|DC=1} maxval set {float} | sets maximum value for sensor |
rcmb {mod_num} {RMS=0|DC=1} maxval show | shows maximum value for sensor |
rcmb {mod_num} {RMS=0|DC=1} minval set {float} | sets minimum value for sensor |
rcmb {mod_num} {RMS=0|DC=1} minval show | shows minimum value for sensor |
rcmb {mod_num} {RMS=0|DC=1} hyst set {float} | sets hysterese value for sensor |
rcmb {mod_num} {RMS=0|DC=1} hyst show | shows hysterese value for sensor |
rcmb {mod_num} {RMS=0|DC=1} publish mode set {NONE=0|INTERVAL=1|DELTA=2|
INTERV_DELTA=3} |
sets publish mode |
rcmb {mod_num} {RMS=0|DC=1} publish mode show | shows publish mode |
rcmb {mod_num} {RMS=0|DC=1} publish mqtt retain set {OFF=0|ON=1} | sets mqtt retain |
rcmb {mod_num} {RMS=0|DC=1} publish mqtt retain show | shows if mqtt retain set |
rcmb {mod_num} {RMS=0|DC=1} publish timer set {num_secs} | sets publish time interval |
rcmb {mod_num} {RMS=0|DC=1} publish timer show | shows publish time interval |
rcmb {mod_num} {RMS=0|DC=1} publish delta set {float} | sets publish delta value |
rcmb {mod_num} {RMS=0|DC=1} publish delta show | shows publish delta value |
rcmb {mod_num} {RMS=0|DC=1} {BELOWMIN=0| ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3} port set {port_num} | sets power port for sensor values action |
rcmb {mod_num} {RMS=0|DC=1} {BELOWMIN=0| ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3} port show | shows power port for sensor values action |
rcmb {mod_num} {RMS=0|DC=1} {BELOWMIN=0| ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3} state set {OFF=0|ON=1|DISABLED=2} | sets state for sensor values action |
rcmb {mod_num} {RMS=0|DC=1} {BELOWMIN=0|
ABOVEMIN=1|ABOVEMAX=2|BELOWMAX=3} state show |
shows state for sensor values action |
snmp | enters cmd group "snmp" |
snmp port set {ip_port} | sets SNMP UDP port |
snmp port show | shows SNMP UDP port |
snmp snmpget enabled set {OFF=0|ON=1} | enables SNMP GET cmds on/off |
snmp snmpget enabled show | show if SNMP GET cmds are enabled |
snmp snmpset enabled set {OFF=0|ON=1} | enables SNMP SET cmds on/off |
snmp snmpset enabled show | show if SNMP SET cmds are enabled |
snmp snmpv2 enabled set {OFF=0|ON=1} | enables SNMP v2 on/off |
snmp snmpv2 enabled show | show if SNMP v2 is enabled |
snmp snmpv2 public set "{text}" | enables SNMP v3 on/off |
snmp snmpv2 public show | show if SNMP v3 isenabled |
snmp snmpv2 private set "{text}" | sets SNMP v2 public cummnity |
snmp snmpv2 private show | shows SNMP v2 public community |
snmp system {CONTACT=0|NAME=1| LOCATION=2} set "{text}" | sets sysLocation/sysName/sysContact |
snmp system {CONTACT=0|NAME=1|LOCATION=2} show | gets sysLocation/sysName/sysContact |
snmp snmpv3 enabled set {OFF=0|ON=1} | sets SNMP v2 private community |
snmp snmpv3 enabled show | shows SNMP v2 private community |
snmp snmpv3 username set "{text}" | sets SNMP v3 username |
snmp snmpv3 username show | shows SNMP v3 username |
snmp snmpv3 authalg set {NONE=0|MD5=1| SHA1=2|SHA256=3|SHA384=4|SHA512=5} | sets SNMP v3 authentication |
snmp snmpv3 authalg show | show SNMP v3 authentication algorithm |
snmp snmpv3 privalg set {NONE=0|DES=1| 3DES=2|AES128=3|AES192=4|AES256=5| AES192*=6|AES256*=7} | sets SNMP v3 privacy algorithm |
snmp snmpv3 privalg show | show SNMP v3 privacy algorithm |
snmp snmpv3 authpasswd set "{passwd}" | sets SNMP v3 authentication password |
snmp snmpv3 privpasswd set "{passwd}" | sets SNMP v3 privacy password |
snmp snmpv3 authpasswd hash set "{passwd}" | sets SNMP v3 authentication hashed password |
snmp snmpv3 privpasswd hash set "{passwd}" | sets SNMP v3 privacy hashed password |
snmp trap type set {NONE=0|V1=1|V2=2|V3=3} | sets type of SNMP traps |
snmp trap type show | show SNMP trap type |
snmp trap receiver {trap_num} set "{dns_name}" | sets address and port of SNMP trap receiver {trap_num} |
snmp trap receiver {trap_num} show | show address and port of SNMP trap receiver {trap_num} |
syslog | enters cmd group "syslog" |
syslog enabled set {OFF=0|ON=1} | enables syslog msgs on/off |
syslog enabled show | show if syslog enabled |
syslog server set "{dns_name}" | sets address of syslog server |
syslog server show | shows address of syslog server |
system | enters cmd group "system" |
system beeper manual set {OFF=0|ON=1} {millisec} | manually sets beeper with optional duration |
system beeper manual show | shows beeper state |
system restart | restarts device |
system fabsettings | restore fab settings and restart device |
system bootloader | enters bootloader mode |
system flushdns | flush DNS cache |
system uptime | number of seconds the device is running |
system name show | shows device name |
system version show | shows actual firmware version |
system display {disp_num} default extsensor {port_num} {sen_type} set {sen_field} | shows external sensor |
system display {disp_num} default linesensor {line_num} set {sen_field} | shows energy line sensor |
system display {disp_num} default set {BLANK=0,LOCAL_TIME=1,UTC_TIME=2} | shows other contents |
system display {disp_num} default show | shows default setting for display |
system display default hash set "{data}" | sets hashed display setting |
system display default hash show | shows hashed display setting |
system sensor {VSYS=0|VAUX=1|VMAIN=2| TCPU=3} show | shows internal sensors if model supports it |
system {SWITCH_PORT=0} events set {OFF=0| ON=1} | enable global events |
system {SWITCH_PORT=0} events show | shows if global events enabled |
system {SWITCH_PORT=0} events type set "{EVT_SYSLOG=0,EVT_SNMP=1,EVT_EMAIL=2,EVT_SMS=3,EVT_GSMEMAIL=4,EVT_BEEPER
=5,EVT_DISPLAY=6,EVT_CONSOLE=7,EVT_MQTT=8}" |
enables different event types |
system {SWITCH_PORT=0} events type show | shows what event types are enabled |
system {SWITCH_PORT=0} events mqtt retain set {OFF=0|ON=1} | sets mqtt retain |
system {SWITCH_PORT=0} events mqtt retain show | shows if mqtt retain set |
system panel enabled set {OFF=0|ON=1} | blocks panel buttons when not enabled |
system panel enabled show | shows if panel buttons are enabled |
system panel port all set {OFF=0|ON=1} | enable siwtch all relays from panel buttons |
system panel port all show | shows if siwtch all relays from panel buttons enabled |
timer | enters cmd group "timer" |
timer enabled set {OFF=0|ON=1} | enables timer functions |
timer enabled show | shows if timer a enabled |
timer syslog facility set {0..23} | sets facility level for timer syslog |
timer syslog facility show | shows facility level for timer syslog |
timer syslog verbose set {0..7} | sets verbose level for timer syslog |
timer syslog verbose show | shows verbose level for timer syslog |
timer {rule_num} enabled set {OFF=0|ON=1} | enables rule |
timer {rule_num} enabled show | shows if rule is enabled |
timer {rule_num} name set "{name}" | sets name of rule |
timer {rule_num} name show | shows name of rule |
timer {rule_num} {FROM=0|UNTIL=1} set "{yyyymm-dd}" | sets date range of rule |
timer {rule_num} {FROM=0|UNTIL=1} show | shows date range of rule |
timer {rule_num} trigger jitter set {0..65535} | sets jitter for rule |
timer {rule_num} trigger jitter show | show jitter of rule |
timer {rule_num} trigger random set {0..100} | sets probability for rule |
timer {rule_num} trigger random show | shows rule probability |
timer {rule_num} trigger {HOUR=0|MIN=1|SEC=2| DAY=3|MON=4|DOW=5} set "{time_date_list}" | sets time date list |
timer {rule_num} trigger {HOUR=0|MIN=1|SEC=2| DAY=3|MON=4|DOW=5} show | shows time date list |
timer {rule_num} action mode set {SWITCH=1| CLI=2} | sets switch or cli cmd |
timer {rule_num} action mode show | shows if switch or cli cmd |
timer {rule_num} action {SWITCH1=0| SWITCH2=1} {OFF=0|ON=1} set "{port_list}" | sets port list for switch cmd |
timer {rule_num} action {SWITCH1=0| SWITCH2=1} {OFF=0|ON=1} show | shows port list for switch cmd |
timer {rule_num} action delay set {0..65535} | delay between cmds |
timer {rule_num} action delay show | shows delay between cmds |
timer {rule_num} action console set "{cmd}" | sets cmd string |
timer {rule_num} action console show | shows cmd string |
timer {rule_num} action hash set "{data}" | sets action binary form |
timer {rule_num} action hash show | shows action binary form |
timer {rule_num} delete | delete one timer |
timer delete all | delete all timer |
vt100 | enters cmd group "vt100" |
vt100 echo set {OFF=0|ON=1} | sets console echo state |
vt100 echo show | shows console echo state |
vt100 numeric set {OFF=0|ON=1} | sets numeric mode |
vt100 numeric show | shows numeric mode state |
vt100 reset | resets terminal |