Difference between revisions of "IonoPiMax"

From HSYCO
Jump to navigation Jump to search
 
(49 intermediate revisions by the same user not shown)
Line 1: Line 1:
[http://www.sferalabs.cc/iono-pi-max/ Iono Pi Max] is an extremely versatile industrial server with a huge variety of Input/Output lines and standard communication interfaces, all routed to the incredibly powerful quad-core processor of the Raspberry Pi.
+
[http://www.sferalabs.cc/iono-pi-max/ Iono Pi Max] is an extremely versatile industrial server with a huge variety of Input/Output lines and standard communication interfaces, all routed to the quad-core processor of the Raspberry Pi.
  
[[File:iono_pi_module_board.png|200px|thumb|iono Pi]]
+
[[File:Iono-pi-max-1.png|200px|thumb|Iono Pi Max]]
  
This driver provides support for a local installation of HSYCO on Iono Pi Max itself.
+
This driver provides support for both a local installation of HSYCO on Iono Pi Max itself, or a remote Iono Pi Max unit connected via SSH. In both cases, the Raspberry Pi OS Kernel module for Iono Pi Max must be installed. The kernel module documentation is available at [https://github.com/sfera-labs/iono-pi-max-kernel-module GitHub] and the Iono Pi Max [https://www.sferalabs.cc/files/ionopimax/doc/ionopimax-user-guide.pdf User Guide].
  
  
Line 14: Line 14:
  
 
=== Communication ===
 
=== Communication ===
*'''IP Address''': the IP address assigned to Iono Pi, leave blank for a local installation;
+
*'''IP Address''': the IP address assigned to Iono Pi Max, leave blank for a local installation
*'''Port''': TCP port configured on Iono Pi, leave blank for a local installation;
+
*'''Port''': SSH port configured on Iono Pi Max (defaults to 22), leave blank for a local installation.
 +
 
 +
=== Authentication ===
 +
*'''User''': username to access the remote Iono Pi Max via SSH, leave blank for a local installation
 +
*'''Password''': password to access the remote Iono Pi Max via SSH, leave blank for a local installation.
  
 
=== High Availability ===
 
=== High Availability ===
Line 31: Line 35:
  
 
|rowspan="2"|startupevents
 
|rowspan="2"|startupevents
|rowspan="2"|true
+
|rowspan="2"|false
 
|true
 
|true
 
|generate IO events also during the driver’s start-up phase
 
|generate IO events also during the driver’s start-up phase
Line 40: Line 44:
 
|-
 
|-
  
|rowspan="2"|wiegandbits
+
|pollinterval
|rowspan="2"|false
+
|250
 +
|10 <= n <= 30000
 +
|the data acquisition interval, in milliseconds
 +
 
 +
|-
 +
 
 +
|rowspan="3"|dualsdsync
 +
|rowspan="3"|false
 
|true
 
|true
|the wiegand datapoints report bits count and data value
+
|enables the files synchronisation process that copies all HSYCO files and some operating system configuration files to the alternate SD card (SD1). Synchronisation occurs automatically once a minute. SD1 is enabled and its root file system mounted to /mnt/alt
 
|-
 
|-
 
|false
 
|false
|the wiegand datapoints report the data value only
+
|disables the files synchronisation process
 +
|-
 +
|manual
 +
|doesn't change the watchdog configuration parameters
  
 
|-
 
|-
  
|rowspan="2"|https
+
|rowspan="4"|watchdog
|rowspan="2"|false
+
|rowspan="4"|always
 +
|always
 +
|enables the hardware watchdog and automatically generates the heartbeat signal (when the HSYCO main control loop is running normally, approximately every 10 seconds). The watchdog timeout is set to 60 seconds while HSYCO is running, or to 1 hour when HSYCO is manually stopped (sysctl stop hsyco) and when it is starting. If dualsdsync is set to true or manual, the watchdog is configured to boot from the alternate SD card if there is no heartbeat after the first reboot
 +
|-
 
|true
 
|true
|use HTTPS to communicate with a remote Iono Pi
+
|enables the hardware watchdog only while HSYCO is running, and automatically generates the heartbeat signal (when the HSYCO main control loop is running normally, approximately every 10 seconds). The watchdog timeout is temporarily set to 1 hour when HSYCO is starting. If dualsdsync is set to true or manual, the watchdog is configured to boot from the alternate SD card
 
|-
 
|-
 
|false
 
|false
|use HTTP to communicate with a remote Iono Pi
+
|disables the hardware watchdog
 +
|-
 +
|ignore
 +
|doesn't change the watchdog configuration parameters
  
 
|-
 
|-
  
|readinterval
+
|rowspan="2"|shutdown_minutes
|2000
+
|rowspan="2"|0
|<ms>
+
|0
|For local installation only. Interval, in milliseconds, between subsequent readings of analog inputs and 1-Wire devices. If the value is set below 2000 (i.e. less than 2 seconds) the specified interval is only applied to analog inputs; 1-Wire devices will be polled with a 2 seconds interval. Set to 0 to disable analog inputs polling
+
|no automatic shutdown after power failure
 +
|-
 +
|N > 0
 +
|the driver will command the operating system shutdown and hardware power off after N minutes of back-up battery operations during a power failure. Iono Pi Max will be turned back on when power is restored
  
 
|-
 
|-
  
|analogminvariation
+
|skip
|100
+
|
|<mV>
+
|&lt;list&gt;
|For local installation only. Minimum voltage variation (in millivolts) to be measured on analog inputs, after an event has been triggered, for a new one to occur. Defaults to 0
+
|Space or semicolon separated list of datapoints or prefixes (not including the I/O Server id). Datapoints starting with one of the keywords defined in the skip list are not polled. Skipping unused datapoints improves polling performance on both local and remote configurations
  
|-  
+
|-
  
|rowspan="2"|digitalinputs
+
|rowspan="2"|quiet
|rowspan="2"|true
+
|rowspan="2"|false
 
|true
 
|true
|For local installation only. Enable digital inputs monitoring
+
|enables audible alarms on power failure
 
|-
 
|-
 
|false
 
|false
|For local installation only. Disable digital inputs monitoring
+
|disables audible alarms on power failure
  
|-
+
|}
  
|digitaldebounce
+
{{tip|The following configuration options are only used for local installations, and ignored on remote Iono Pi Max units: dualsdsync, watchdog, shutdown_minutes, quiet.}}
|30
 
|<ms>
 
|For local installation only. Time, in milliseconds, required for digital inputs to maintain a value, after a variation, before an event is triggered
 
  
|-
+
== Datapoints ==
  
|rowspan="2"|wiegand1
+
The Iono Pi Max implements all data points provided by the underlying Iono Pi Max kernel module. Refer to the documentation available at [https://github.com/sfera-labs/iono-pi-max-kernel-module Iono Pi Max Kernel Module].
|rowspan="2"|false
 
|true
 
|For local installation only. Enable and monitor Wiegand interface 1
 
|-
 
|false
 
|For local installation only. Disable Wiegand interface 1
 
  
|-  
+
Each readable file name exposed by the kernel module under the /sys/devices/virtual/ionopimax/ sub-directories appears as a data point with id <subdir>.<file>. For example, as the buzzer's status file is /sys/devices/virtual/ionopimax/buzzer/status, the corresponding data point is "buzzer.status".
 
 
|rowspan="2"|wiegand2
 
|rowspan="2"|false
 
|true
 
|For local installation only. Enable and monitor Wiegand interface 2
 
|-
 
|false
 
|For local installation only. Disable Wiegand interface 2
 
  
|-
+
Command files that are marked as write only in the documentation (W), are not shown as visible data points in HSYCO, but can be used in the IO events action or ioSet() methods to send a command.
  
|rowspan="3"|onewirebus
+
For example, if "max" is the id assigned to the Iono Pi Max I/O Server, then:
|rowspan="3"|
+
TIME : IO max.buzzer.beep = 1000
|true
+
will make the buzzer beep for 1 second (1000 ms).
|For local installation only. Enable reading of the 1-Wire bus devices connected on TTL1
 
|-
 
|false
 
|For local installation only. Disable reading of the 1-Wire bus devices connected on TTL1
 
|-
 
|
 
|If not specified the monitoring will be enabled if the 1-Wire interface is enabled in the Raspberry Pi OS configuration
 
  
|}
+
Note that "max.buzzer.beep" is not visible in the Status Browser and doesn't generate events, because it is write only, and only the "max.buzzer.status" data point will be visible, with a value of 0 if the buzzer is not active, or 1 if active.
  
== Datapoints ==
+
=== Additional datapoints ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 145: Line 144:
 
|-
 
|-
  
|rowspan="3" |driverstate
+
|shutdown
|init
+
|1
|R
 
|Sfera driver is initializing
 
|-
 
|quit
 
|R
 
|Sfera driver quit
 
|-
 
|running
 
|R
 
|Sfera driver is running (normal state)
 
 
 
|-
 
 
 
|rowspan="4" |led
 
|rowspan="2" |0
 
|R
 
|LED L1 is off
 
|-
 
|W
 
|turn LED L1 off
 
|-
 
|rowspan="2" |1
 
|R
 
|LED L1 is on
 
|-
 
 
|W
 
|W
|turn LED L1 on
+
|initiate a power cycle
  
 
|-
 
|-
  
|rowspan="4" |o<1-4>
+
|rowspan="3" |dualsdsync
|rowspan="2" |0
+
|0
|R
 
|relay <1-4> is off
 
|-
 
|W
 
|switch off relay <1-4>
 
|-
 
|rowspan="2" |1
 
|R
 
|relay <1-4> is on
 
|-
 
|W
 
|switch on relay <1-4>
 
 
 
|-
 
 
 
|rowspan="4" |oc<1-3>
 
|rowspan="2" |0
 
 
|R
 
|R
|open collector output <1-3> is off (not grounded)
+
|manual SD synchronisation completed
|-
 
|W
 
|switch off open collector output <1-3>
 
 
|-
 
|-
 
|rowspan="2" |1
 
|rowspan="2" |1
 
|R
 
|R
|open collector output <1-3> is on (grounded)
+
|manual SD synchronisation pending or in progress
 
|-
 
|-
 
|W
 
|W
|switch on open collector output <1-3>
+
|initiate SD synchronisation (only available when the dualsdsync option is set to "manual"
 
 
|-
 
 
 
|rowspan="2" |di<1-6>
 
|0
 
|R
 
|digital input <1-6> is low
 
|-
 
|1
 
|R
 
|digital input <1-6> is high
 
 
 
|-
 
 
 
|ai<1-4>
 
|<val>
 
|R
 
|analog input <1-4> is reading a voltage equal to <val> (in Volts)
 
  
 
|-
 
|-
  
|rowspan="2" |wiegand.<1-2>
+
|dualsdsync.status
|<val>
+
|N
|R
 
|if option "wiegandbits" set to false. Value as an unsigned integer in base 16 (hex) read on the specified Wiegand interface (e.g. "2c646a2")
 
|-
 
|<bits>/<val>
 
 
|R
 
|R
|if option "wiegandbits" set to true. Number of bits and value (hex) read on the specified Wiegand interface (e.g. "26/2c646a2")
+
|status of the last SD synchronisation run:
 +
* >=0: number of files synchronised
 +
* -1: error while updating files (see logs)
 +
* -2: alternate SD card not available or file system error
  
 
|-
 
|-
  
|onewire.bus.<id>
+
|dualsdsync.time<br>(cm duo only)
|<val>
+
|<timestamp>
 
|R
 
|R
|1-Wire device <id> value
+
|positive integer number representing the time in seconds since 00:00:00 UTC on 1 January 1970 of when the last synchronization run ended (with or without errors)
  
 
|}
 
|}
  
== User Interface ==
+
{{tip|The shutdown, dualsdsync and dualsdsync.status datapoints are only available for local installations.}}
  
To control a digital output (O1 ... O4, OC1 ... OC3, LED), add a [[button]] or a [[buttonicon]] object to your project page and set its address field to the corresponding datapoint:
+
== Release Notes ==
  
[[File:IonoPi_UI_Button.png|500px|border]]
+
=== 3.8.0 ===
 
+
*dual µSD card support
== Release Notes ==
+
*improved watchdog and UPS support
 +
*new "skip" option
 +
*added support for remote Iono Pi Max units via SSH access
 +
*new "connection" datapoint
  
 
=== 3.7.0 ===
 
=== 3.7.0 ===

Latest revision as of 17:51, 13 July 2022

Iono Pi Max is an extremely versatile industrial server with a huge variety of Input/Output lines and standard communication interfaces, all routed to the quad-core processor of the Raspberry Pi.

Iono Pi Max

This driver provides support for both a local installation of HSYCO on Iono Pi Max itself, or a remote Iono Pi Max unit connected via SSH. In both cases, the Raspberry Pi OS Kernel module for Iono Pi Max must be installed. The kernel module documentation is available at GitHub and the Iono Pi Max User Guide.

HSYCO Configuration

Add a IONO Pi Max I/O Server in the I/O Servers section of the Settings and set its parameters:

Note that the IONO Pi Max I/O Server doesn't count in the I/O servers license total, so you don't need an extra I/O Server license to use IONO Pi Max with HSYCO.


Communication

  • IP Address: the IP address assigned to Iono Pi Max, leave blank for a local installation
  • Port: SSH port configured on Iono Pi Max (defaults to 22), leave blank for a local installation.

Authentication

  • User: username to access the remote Iono Pi Max via SSH, leave blank for a local installation
  • Password: password to access the remote Iono Pi Max via SSH, leave blank for a local installation.

High Availability

  • Shutdown when inactive: defaults to false.

Options

ID Default Values Description
startupevents false true generate IO events also during the driver’s start-up phase
false start generating events only after HSYCO is aligned with the current status of the system
pollinterval 250 10 <= n <= 30000 the data acquisition interval, in milliseconds
dualsdsync false true enables the files synchronisation process that copies all HSYCO files and some operating system configuration files to the alternate SD card (SD1). Synchronisation occurs automatically once a minute. SD1 is enabled and its root file system mounted to /mnt/alt
false disables the files synchronisation process
manual doesn't change the watchdog configuration parameters
watchdog always always enables the hardware watchdog and automatically generates the heartbeat signal (when the HSYCO main control loop is running normally, approximately every 10 seconds). The watchdog timeout is set to 60 seconds while HSYCO is running, or to 1 hour when HSYCO is manually stopped (sysctl stop hsyco) and when it is starting. If dualsdsync is set to true or manual, the watchdog is configured to boot from the alternate SD card if there is no heartbeat after the first reboot
true enables the hardware watchdog only while HSYCO is running, and automatically generates the heartbeat signal (when the HSYCO main control loop is running normally, approximately every 10 seconds). The watchdog timeout is temporarily set to 1 hour when HSYCO is starting. If dualsdsync is set to true or manual, the watchdog is configured to boot from the alternate SD card
false disables the hardware watchdog
ignore doesn't change the watchdog configuration parameters
shutdown_minutes 0 0 no automatic shutdown after power failure
N > 0 the driver will command the operating system shutdown and hardware power off after N minutes of back-up battery operations during a power failure. Iono Pi Max will be turned back on when power is restored
skip <list> Space or semicolon separated list of datapoints or prefixes (not including the I/O Server id). Datapoints starting with one of the keywords defined in the skip list are not polled. Skipping unused datapoints improves polling performance on both local and remote configurations
quiet false true enables audible alarms on power failure
false disables audible alarms on power failure

Note The following configuration options are only used for local installations, and ignored on remote Iono Pi Max units: dualsdsync, watchdog, shutdown_minutes, quiet.

Datapoints

The Iono Pi Max implements all data points provided by the underlying Iono Pi Max kernel module. Refer to the documentation available at Iono Pi Max Kernel Module.

Each readable file name exposed by the kernel module under the /sys/devices/virtual/ionopimax/ sub-directories appears as a data point with id <subdir>.<file>. For example, as the buzzer's status file is /sys/devices/virtual/ionopimax/buzzer/status, the corresponding data point is "buzzer.status".

Command files that are marked as write only in the documentation (W), are not shown as visible data points in HSYCO, but can be used in the IO events action or ioSet() methods to send a command.

For example, if "max" is the id assigned to the Iono Pi Max I/O Server, then:

TIME : IO max.buzzer.beep = 1000

will make the buzzer beep for 1 second (1000 ms).

Note that "max.buzzer.beep" is not visible in the Status Browser and doesn't generate events, because it is write only, and only the "max.buzzer.status" data point will be visible, with a value of 0 if the buzzer is not active, or 1 if active.

Additional datapoints

ID Value R/W Description
connection online R connection established
offline R HSYCO can't connect to the device
shutdown 1 W initiate a power cycle
dualsdsync 0 R manual SD synchronisation completed
1 R manual SD synchronisation pending or in progress
W initiate SD synchronisation (only available when the dualsdsync option is set to "manual"
dualsdsync.status N R status of the last SD synchronisation run:
  • >=0: number of files synchronised
  • -1: error while updating files (see logs)
  • -2: alternate SD card not available or file system error
dualsdsync.time
(cm duo only)
<timestamp> R positive integer number representing the time in seconds since 00:00:00 UTC on 1 January 1970 of when the last synchronization run ended (with or without errors)

Note The shutdown, dualsdsync and dualsdsync.status datapoints are only available for local installations.

Release Notes

3.8.0

  • dual µSD card support
  • improved watchdog and UPS support
  • new "skip" option
  • added support for remote Iono Pi Max units via SSH access
  • new "connection" datapoint

3.7.0

  • initial release


Iono Pi Max is a registered trademark of Sfera Labs Srl