-
Notifications
You must be signed in to change notification settings - Fork 1
2.0 Command reference
Provides access and control to NETIO-230 (A/B/C models) Power Distribution Unit (see: NETIO-230A / NETIO-230B / NETIO-230C on koukaam.se)
Notes
-
Requirements: perl modules Net::Telnet lately. There is reduced functionality if they are not installed, but it will work with basic functions. One notice will be logged if modules are not installed while loading the modul.
-
If you are going to use multiple instances of this module with the same physical device and using secure login then all instances have to use the same username.
Define
define <name> NETIO230 <ip> [s:<sockets>] [i:<interval>] [h:<http_port>] [t:<telnet_port>] [u:<user>] [p:<pass>]
Mandatory:
-
<name>
A name of your choice.
possible value:string
-
NETIO230
Module name, must be: NETIO230 -
<ip>
IPv4 address of your NETIO-230 device eg.172.16.4.100
Optional (in any order):
-
s:<sockets>
Specifies your sockets to be used with this device. Default: all ports eg. s:1, s:23, s:134 or s:4321 -
h:<http_port>
Http port to be used. Default: 80 -
t:<telnet_port>
Telnet port to be used. Default: 1234 -
i:<interval>
Interval in seconds for device polling (statusRequest). Default: 300 -
u:<user>
a username for http and telnet login. Default: admin -
p:<passs>
Matching password for username. Default: admin
Define Examples:
define MyNetio NETIO230 172.16.4.100
define Socket3 NETIO230 172.16.4.100 s:3
define Socket3_4 NETIO230 172.16.4.100 s:34 i:3600 h:80 t:1234 u:admin p:admin
Get
-
alias
returns the system name of device.
possible value:string
-
discover
returns whether the device can be discovered by Netio's config software.
possible values:enable|disable
-
dns
returns current dns server.
possible value:ip address
-
dst
returns daylight saving time settings.
possible values:enable|disable dst_start dst_end
eg.enabled 2010/01/08,10:21:20 - 2010/10/31,03:00:00
-
eth
returns ipv4 network settings.
possible values:dhcp|manual [ip_address mask gateway]
-
ntp
returns sntp settings.
possible values:enable|disable ip|hostname [synchronized]
-
presence
returns presence of device.
possible values:present|absent
-
smtp
returns ip address or domain name of the SMTP server.
possible values:ip|fqdn
-
state
returns the state of the socket(s). state will be on unless ALL ports are off. Use stateFormat if you need another option.
passible values:on|off
-
socketX
returns state of socketX
X is number from 1-4 which represents the socket number.
possible values:on|off
-
socketX_setup
returns setup of socketX
X is number from 1-4 which represents the socket number.
possible values:output_name mod: manual|timer interrupt_delay power_on_status
-
socketX_timer
returns timer for socketX
X is number from 1-4 which represents the socket number.
possible values:mode: once|daily|weekly on-time off-time week_schedule: 1111100
-
socketX_wd
returns watchdog settings for socketX, where X is a defined socket number.
possible values:enable|disable ip_address timeout pon_delay ping_refresh max_retry _<small>max_retry_poff:</small>_enable|disable _<small>email:</small>_enable|disable
-
swdelay
returns delay between triggering two outputs.
possible value:time in ms,s,m,h
-
time
returns current local system time
possible value:YYYY/MM/DD,HH:MM:SS
-
timediff
returns time dissension between Netio PDU and FHEM. A notice will be logged if there is a difference of more than 120 sec. An error will be logged if difference is greater than half an hour. Use ntp server and check dst settings if there are inconsistencies.
possible value:seconds
-
timezone
returns current local time zone.
possible value:from UTC-12 till UTC+14
-
uptime
returns current NETIOs uptime
possible value:X years X days X hours X min X sec
-
_lastNotice
returns system notice or http/telnet error code received from device.
Set
-
alias
Set device alias name.
required parameter: string (use quote marks if name contains a space)
eg.set myNetio alias newName
-
discover
Enables / disables visibility of the device for the network Discover utility.
required parameter: enable|disable
eg.set myNetio discover enable
-
dns
Sets IP address of the DNS server. To allow changed values to take effect you must restart the device.
required parameter: ip_address
eg.set myNetio dns 8.8.8.8
-
dst
Sets dayligh saving time.
required parameter: enable|disable|begin|end [YYYY/MM/DD,hh:mm:ss]
eg.set myNetio dst enable
eg.set myNetio dst disable
eg.set myNetio dst begin 2016/03/27,02:00:00
eg.set myNetio dst end 2016/10/30,03:00:00
-
eth
Setup of the network interface parameters: IP address, subnet mask and gateway parameters are needed to pass only if manual mode is entered. To allow changed values to take effect you must restart the device.
required parameter: dhcp|manual [ip_address mask gateway]
eg.set myNetio net manual 172.16.4.150 255.255.252.0 192.168.10.1
-
help
Show set command usage and notes.
required parameter: set cmd
eg.set myNetio help timer
-
ntp
SNTP client settings, enables or disables time synchronization with SNTP server. Server address can be entered both as IP address or domain name.
required parameter: sntp ip|fqdn
eg.set myNetio time_ntp ptbtime1.ptb.de
-
on
Switch all assigned sockets on.
eg.set myNetio on
-
off
Switch all assigned sockets off.
eg.set myNetio off
-
port
Alias command for socket -
reboot
Restarts PDU.
required parameter: n/a
eg.set myNetio reboot
-
setup
Setup socket parameters like name, manual/timer control, interruption interval and power on state. Name must be enclosed in quotation marks.
possible parameters: socket_num|socket_alias output_name mod: manual|timer interrupt_delay pon_status
eg.set MyNetio setup 1 "output_1“ manual 2 1
Will set socket1 name output_1, enable manual control, interruption interval to 2 seconds and power on state to on -
smtp
Sets IP address or domain name of the SMTP server.
required parameter: ip|fqdn
eg.set myNetio smtp mail.guerrillamail.com
-
socket
Each single socket can also be switched on or off instead of all sockets together. See 'set setup' for how to setup socket_alias names.
required parameters: socket_number|socket_alias on|off
eg.set myNetio socket 1 on
eg.set myNetio socket socket_1 off
-
statusRequest
Polls the PDU for current state and settings. Periodical updates can be configured with intervalPresent and intervalAbsent attributes. Default: every 5min. See attribute section below.
eg.set myNetio statusRequest
-
swdelay
Sets delay between triggering two outputs. Unit is 1/10s without suffix. Possible suffixes are: s,m
required parameter: number[s|m] (max: 65535 (~109m/6553s))
eg.set myNetio swdelay 2
eg.set myNetio swdelay 3s
eg.set myNetio swdelay 2m
-
time
Sets local system time.
required parameter: YYYY/MM/DD,HH:MM:SS
eg.set myNetio time 2015/01/12,15:00:00
-
timer
Sets a hardware timer for a socket. Times in the past will not be accepted. Reading timediff will not be taken into consideration. See 'set setup' for how to setup socket_alias names.
required parameter: socket_num|socket_alias time_format: t|dt|ux mode: once|daily|weekly on-time off-time [week_schedule]
Where time_format is:
t: HH:MM:SS dt: YYYY/MM/DD,HH:MM:SS ux: xxxxxxxx (unsigned long with prefix 0x<hex>, 0 <octal>or decimal)</octal></hex>
eg.set myNetio timer mySock3 weekly 10:00:00 11:30:00 1111100
eg.set myNetio timer 3 weekly 10:00:00 11:30:00 1111100
Switches the timer on at socket 3. From Monday to Friday, socket 3 will always be switched on at 10:00 and switched off at 11:30. -
timezone
Sets local time zone. UTC syntax has to be used.
required parameter: fromUTC-12
tillUTC+14
eg.set myNetio timezone UTC+1
-
watchdog
Used to set a watchdog per socket.
required parameters: socket_num|socket_alias enable|disable ip_address timeout pon_delay ping_refresh max_retry _max_retry_poff:_enable|disable _email:_enable|disable
eg.set myNetio watchdog 2 enable 192.168.10.101 10 30 1 3 enable enable
eg.set myNetio watchdog mySock2 enable 192.168.10.101 10 30 1 3 enable enable
Will enable the Watchdog feature on output 2. Device on address 192.168.10.101 will be monitored, max Ping response time 10 seconds. Ping commands will be sent in 1 second intervals. If the monitored device won't respond in 10 seconds, output 2 will be turned OFF for 30 seconds. If the device will fail to respond to Ping commands after the third restart the output will stay OFF. You will be notified by warning e-mail after each reset of the output. -
- on-for-timer seconds
- on-till timedet
- on-till-overnight timedet
- off-for-timer seconds
- off-till timedet
- off-till-overnight timedet
- blink number blink-period
- intervals from1-till1 from2-till 2...
Attributes
-
disable
Used to disable device polling and set commands.
Possible values: 0,1 -
disable_fork
Used to switch off the so called forking for non-blocking functionality, in this case for telnet queries. It is not recommended to use this attribute but some operating systems seem to have a problem due to forking a FHEM process (Windows?). Http requests are not affected by this attribute. Http communication will work non-blocking with this module version in all cases.
Possible values:0,1
-
disable_telnet
Disable the use of telnet at all.
Possible values:0,1
-
enable_timeEvents
Enable events for readings 'time' and 'uptime'.
Possible values:0,1
-
intervalPresent
Used to set device polling interval in seconds when device is present.
Possible value:integer >= 30
-
intervalAbsent
Used to set device polling interval in seconds when device is absent.
Possible value:integer >= 30
-
secureLogin
A md5 hash will be used instead of a plain text password. Perl modul Digest::MD5 must be installed to be able use this feature.
Possible value:0,1
-
readingFnAttributes
Attributes like event-on-change-reading, event-on-update-reading, event-min-interval, event-aggregator, stateFormat, userReadings, ... are working, too.