-
Notifications
You must be signed in to change notification settings - Fork 218
ActuatorScheduleRequest
For information on responses see AcutatorAgent responses to a schedule or cancel requests.
The actuator agent expects all messages to be JSON and will parse them accordingly. Use publish_json to send messages where possible.
An agent can request a task schedule by publishing to the "devices/actuators/schedule/request" topic with the following header:
#python
{
'type': 'NEW_SCHEDULE',
'requesterID': <Agent ID>, #The name of the requesting agent.
'taskID': <unique task ID>, #The desired task ID for this task. It must be unique among all other scheduled tasks.
'priority': <task priority>, #The desired task priority, must be 'HIGH', 'LOW', or 'LOW_PREEMPT'
}
with the following message (before converting to json):
#python
[
["campus/building/device1", #First time slot.
"2013-12-06 16:00:00", #Start of time slot.
"2013-12-06 16:20:00"], #End of time slot.
["campus/building/device1", #Second time slot.
"2013-12-06 18:00:00", #Start of time slot.
"2013-12-06 18:20:00"], #End of time slot.
["campus/building/device2", #Third time slot.
"2013-12-06 16:00:00", #Start of time slot.
"2013-12-06 16:20:00"], #End of time slot.
#etc...
]
- Everything in the header is required.
- A Task schedule must have at least one time slot.
- The start and end times are parsed with dateutil's date/time parser. The default string representation of a python datetime object will parse without issue.
- Two Tasks are considered conflicted if at least one time slot on a device from one task overlaps the time slot of the other on the same device.
- The start or end (or both) of a requested time slot on a device may touch other time slots without overlapping and not be conflicted.
- A request must not conflict with itself.
- If something goes wrong see this failure string list for an explanation of the error.
HIGH:: This Task cannot be preempted under any circumstance. This task may preempt other conflicting preemptable Tasks.
LOW:: This Task cannot be preempted once it has started. A Task is considered started once the earliest time slot on any device has been reached. This Task may not preempt other Tasks.
LOW_PREEMPT:: This Task may be preempted at any time. If the Task is preempted once it has begun running any current time slots will be given a grace period (configurable in the ActuatorAgent configuration file, defaults to 60 seconds) before being revoked. This Task may not preempt other Tasks.
A task may be canceled by publishing to the "devices/actuators/schedule/request" topic with the following header:
#python
{
'type': 'CANCEL_SCHEDULE',
'requesterID': <Agent ID>, #The name of the requesting agent.
'taskID': <unique task ID>, #The desired task ID for this task. It must be unique among all other scheduled tasks.
}
- The requesterID and taskID must match the original values from the original request header.
- After a Tasks time has passed there is no need to cancel it. Doing so will result in a "TASK_ID_DOES_NOT_EXIST" error.
- If something goes wrong see this failure string list for an explanation of the error.
- Platform Agent
- VOLTTRON Central Agent
- Platform Commands
- Platform Configuration
- [Platform Hardening Security Recommendations] (Linux-Platform-Hardening-Recommendations-for-VOLTTRON-users)
- ...
- [Building VOLTTRON] (Building-VOLTTRON)
- Example Agents
- Agent Development
- [Shortcut Scripts] (Scripts)
- [VOLTTRON Conventions] (Conventions)
- [sMAP Test Server] (sMAP-Test-Instance)
- [Design Discussions] (Design Discussions)
- VIP
- VIP - VOLTTRON Interconnect Protocol
- RPC by example
- VIP - Known Identities
- VIP - Authentication
- VIP - Authorization
- Protecting Pub/Sub Topics
- Setup Eclipse for VOLTTRON
- Deployment Walkthrough
- Forward Historian Walkthrough
- [Create New Historian Agent] (Developing-Historian-Agents)
- [Create New Driver Agent] (Develop-Driver-Agent)
- [Developing With Eclipse] (Eclipse)
- Migrations
- [2.x to 3.x Migration](2.x-to 3.x-Migration)
- 1.2 to 2.0 Migration
- [Deployment Recommendations](Recommendations for Deployments)
VOLTTRON Versions and Features
Transactional Network Platform Overview
- Established Topics
- Working with the Actuator Agent
- Logging
- [Multi-Node Communication] (MultiBuildingMessaging)
Information Exchange Standards