Using the equiwatt API integrations

The equiwatt open API & webhook triggers allow you to programatically control the turning on and off of your devices during equivents.

Open API

The Open API gives you access to an authentication token which can be used to make calls to our equivents API to know if an equivent is currently live. 

Step 1 - Turn on the Open API & get your auth token.


API Integration Screenshot

Step 2 - Retrieve equivent details using your auth token.

curl https://app.equiwatt.com/api/v3/equivents/ \
-X GET \
-H "Authorization: Bearer YOUR_TOKEN"

Step 3 - Example return

A successful call returns a 200 response with a  payload which gives you the current & past equivent details.

{
"msg" : "Error message in case of error",
"data" : {
"current_event" : {
"start_time" : 1667398769,
"end_time" : 1667400569
},
"previous_events" : [{
"start_time" : 1667398669,
"end_time" : 1667400469
}]
},
"success" : true
}

NOTE: The endpoint is rate limited at 1 call/second and 10 calls/minute.

Webhook Triggers

The webhook triggers allow you to set up triggers to call any custom HTTP URLs when specific events occur such as when an equivent starts or ends.

For example, you could use your Home Assistant Webhook trigger endpoint to automatically turn off your devices when an equivent starts & turn them back on when it ends.

Step 1: Navigate to the Webhook Tab 

Tap "Add New Device" under the Manage Tab and tap the "Webhook" Tab

Webhook Integration Screenshot

Step 2: Add your preferred trigger

Tap "Add a URL" and enter the URL you'd like to be called when an equivent starts or ends. You can test the functionality & your URL by tapping "Send a demo trigger"

Webhook Integration - Trigger Screenshot

TIP: If you need any help using equiwatt's API integrations, please visit the community forum - https://community.equiwatt.com/