Skip to content

Instantly share code, notes, and snippets.

View Thomptronics's full-sized avatar
💭
I may be slow to respond.

Thomptronics Thomptronics

💭
I may be slow to respond.
View GitHub Profile
@Thomptronics
Thomptronics / dischargeJobCodeForSHP1.mjs
Created September 20, 2024 21:15
Example JavaScript module for turning on or off an EcoFlow SHP1 discharge job
// https://developer.ecoflow.com/us/document/generalInfo
// https://www.npmjs.com/package/@ecoflow-api/rest-client
// https://rustyy.github.io/ecoflow-api/modules/_ecoflow_api_rest_client.html
import {RestClient} from '@ecoflow-api/rest-client';
const ecoflowAPI = new RestClient({
accessKey: "ENTERYOURACCESSKEYHERE",
secretKey: "ENTERYOURSECRETKEYHERE",
host: "https://api-a.ecoflow.com" // use api-e.ecoflow.com for the EU area
});