UPS PIco HV3.0A Firmware Code 040 Print Date 18.08.2017
Designed and Manufactured by PiModules and ModMyPi
www.pimodules.com www.modmypi.com
Events Triggered RTC Based System Actions Scheduler
The
E
vents
T
riggered
R
TC Based
S
ystem
A
ctions
S
cheduler (
ETR SAS
) is a very advanced
functionality that allows user to implement a simple timed Actions (usually ON/OFF) of the
Raspberry Pi®
, but also a very complicated Actions Schedules depended to External Events
and Time without or with
involvement of Raspberry Pi®
. This functionality can be perfectly
combined with
IoT
or any other time dependent applications. The time resolution of the
ETR
SAS
is based on
1 minute
, however everything is adjusted with 1 second accuracy, as each
action start/stop is executed at the beginning (first second) of internal RTC counted minute.
There are implemented 4 parallel working
ETR SAS
running with different Set-up
’s
. That
means that i.e. user can set the 1
st
ETR SAS
running at night (00:00
–
06:00) every 10 minutes
(repeated 20 times), the 2
nd
ETR SAS
to run at morning time (06:00
–
10:00) every 30 minutes,
and the rest of the day every 1 minute based on 3
rd
ETR SAS
. The
ETR SAS
can be based on
the
RTC
, but can be also time independent and execute Action triggered by external Event (i.e.
A/D). The
Action
can be simple ON/OFF the Raspberry Pi® but also independent of the
Raspberry PI® (without switching it ON)
just activate the Auxiliary 5V@750mA or Bi-Stable
Relay switching. Combination of all
ETR SAS
produce in the result a very complicated state
machine able to implement practically any schedule is needed by user.
ETR SAS Definitions
There are some definitions that need to be specified to have better understanding of the
ETR
SAS
functionality. There are:
Scheduler
–
A State
Machine that maintains the schedules (states)
Schedules
–
Set of
Sequences
that contains number of
Actions
, which execution of them is
based on
Events
or
RTC
, and are executing by
Scheduler
. In example
Action
is ON/OFF
Raspberry Pi® and
Event
is A/D data that fires the
Action (
ON/OFF Raspberry Pi®
).
Action
is
ON/OFF Raspberry Pi®
on requested date and time.
Sequences
contains these
Actions
that
can be repeated within one Schedule (i.e. every day) or can happens only once. The definition
of Sequence is required to specify the Repetition Time of Sequences.
Sequences
–
contain one or more
Actions
.
RTC
–
Real Time Clock (the hardware clock/calendar used/embedded by the
UPS PIco HV3.0A
HAT
), synchronized with Raspberry Pi® RTC. It is mandatory to have the PIco RTC synchronized
with Raspberry Pi® RTC. It can be easy check with
sudo i2cdetect -y 1
the address
0x68
must be
UU
.
Event
–
Occurrence that is used for triggering the
Scheduler
. It can be A/D level, IR, 1-wire,
RS232, etc.
Action
–
Result of the
Scheduler
activity. It can be ON/OFF the Raspberry PI®, ON/OFF the
Auxiliary 5V@750mA, Set/Reset of the Bi-Stable Relay, 1-wire, RS232 data, etc. The Action