runnane / node-red-contrib-easee

Node-Red module for streaming Easee charger data.
Apache License 2.0
7 stars 4 forks source link

Request: add start / stop / pause / resume commands #2

Closed iPeel closed 1 year ago

iPeel commented 1 year ago

Thanks for a really useful API, however I see there's no ability to control the charger. Maybe this could be added permanently?

I'm no good at Git but have in the meantime added the following cases to easee-rest-client.js to support this, which are working for me now:

       case "stop_charging":
          node.doAuthRestCall("/chargers/" + node.charger + "/commands/stop_charging", "post");
        break;

        case "start_charging":
          node.doAuthRestCall("/chargers/" + node.charger + "/commands/start_charging", "post");
        break;

        case "pause_charging":
          node.doAuthRestCall("/chargers/" + node.charger + "/commands/pause_charging", "post");
        break;

        case "resume_charging":
          node.doAuthRestCall("/chargers/" + node.charger + "/commands/resume_charging", "post");
        break;

Thanks,

Neil.