Requirements
Two levels of trigger for digital outputs
Ability to view DO1 or DO2 state
Ability to set levels from dashboard
Method
- Ensure that the device has digital outputs enabled in the toolkit
- Create two raw variables in the device on the Sensorspace platform, DO1, DO2
- Create two raw variables in the device on the Sensorspace platform, Level1, Level2
- Create two switch widgets on dashboard referencing DO1, DO2
- Create two manual input widgets on dashboard (could be one widget doing both)
- Set up event on Sensorspace platform to trigger DO1. Name it suitably
- Triggers
- Trigger: variable that you want to trigger the switching of DO1
- Condition: Greater than or equal to
- Trigger value (variable): Level1
- Trigger after: 0 minutes
- Actions- Add Action- Set variable
- Target variable: Selected variables
- Device Group: N/A
- Variable labels: device: DO1
- Active Trigger: Payload: {"value":1,"context":{}}
- Back to Normal: Payload: {"value":0,"context":{}}
- Triggers
- Repeat 6 for Level2 and DO2
Now trigger levels can be manually set from dashboard and digital output states can be changed. Event logs are available on the events page.