You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 111 Next »



Note, use the test version to get the lastest :  https://homey.app/no-no/app/no.bwa.easy-charger/Easy-Charge-Controller/test/

But normally you would use : : https://homey.app/no-no/app/no.bwa.easy-charger/Easy-Charge-Controller


This documentation is Work In Progress, and need a lot of rework after introducing v0.1.0, so please be patient


Release notes :

  • v0.1.0 is renaming capabilities and flows, and the controller device must be removed and created again when updating from a version older than v0.1.0


This page vil be updated regularly, so visit it daily


Be aware that this is a beta product, so a lot of typos and language mixups will be fixed as soon as possible



There is more to come. Stay tuned. And remember this is freeware, don't expect more than you would expecto to get for nothing. There is always a way to contribute, though.

Implemented features

  • Small step charging. You can choose to charge only 1 or 2 or a few hours, maybe because the windows of really cheap prices is less that you need to reach the target SoC.
  • Notifications. If important thing is happeing, you will get a notification for it.
  • Charger Control Strategy. Use built in schdeduler in charger, (i.e Easee) as an configurable option. This is probably more robust than trusting the cloud commands in real time
  • Support for different power grid prices during the day/night
  • Support for the Norweian Power Support feature
  • Optional to add tax and additional cost to the final price

Planned features

  • Ability to set upper level in powerprice, either in absolut amount or as a percentage of this days average
  • Alerting. If errors occurs or if price is low or high, to either remind you to charge your car or to advice you to not doing so

Migration from 0.0.x to 0.1.0 version

A lot of new capabilities is introduced, and due to how Homey is designed, you must remove and add the Easy Charge Controller device. Called ECC from now on.

Prior to this it's advicable to take a printscreen of your flow(s), because you will se that all the cards are gone after re-pairing the ECC.



Contents


Introduction

What it is and what it is not

Homey Easy Charge Controller is an Homey App than can control your eksisting Homey Charger App ( i.e EaseeHome), based on Nordpool prices, your prefererences and input from your existing Homey Car App (i.e myAudi) . It is intended to be 'wired' with Homey Flows or Advanced Flows to get information from other sources and to control other Homey Apps and Devices.


When a Controller device is created you should initialize it with some setup. I the drawing below all components are shown.

Overview picture

The mandatory components are drawn in green color. 


The minimum setup

The minimum setup is Easy Charge Controller and a Homey App for your charger. The Homey Car App is optional, but in most cases you would probably have that as well.

Using the minimum setup you must manually update the current SoC and target SoC using the Easy Carger App sliders. The daily power prices is downloaded from internet at 13.30 every day.

The typical setup

The typical setup is Easy Charge Controller and a Homey App for your charger and a Homey Car App.

Using this setup you are able to feed current SoC and Target SoC automatically by connecting the Car App to Easy Charge Controller using flows


Charger Strategy

If your charger has a built in scheduler available in the Homey App, this is the most reliable option for charging stragtegy. With that option enabled, every new charging schedule will be sent to the charger when you create it (via the cloud actually, but if that failes you will get a message and retry). Later, at night in most cases, when the charger is planned to charge, it will execute, even if it is offline. So this is the most realible solution, if your charger supports it.


If strategy is cloud commands, the Easy Charger will execute the start and stop commands in real time, and if the charger is offline, the charge session will fail. It's rare to happen, but it will happen when it's most unwanted. That is how Murphys Law is designed.



Suggested steps to start with

  1. Install the app from App Store
  2. Then add new Device, select Easy Charge Controller and the Controller device
  3. Select Connect
  4. You should get one Charge Controller device
  5. Add it
  6. You should see it like this 


  7. the selections in the bottom
  8. From left to right this is what you can do
    1. turn on/off the controller
    2. slider ot set current State of Charge (SoC) and target SoC
    3. you can set the amount of hours you want to charge and the ned time where the charing is supposed to be finished
    4. In section nr 4 from left alle values in the controller is displayed.
    5. Last is flows and state infomation

Mandatory Flows for Charger Strategy Build is Local Scheduler


If you want to utilize the built in local scheduler you must wire it with flows like this:

Here's also showed how you could utilize the Easy Logger to log what happened.


Sending schedule to the charger

This will fire when the car is connected and the strategy is local scheduler. It will also fire when important settings are changed. Like when charge target SoC is changed



Delete schedule

This will fire when a scheduled charging session is completed or car is disconnected, and the strategy is local scheduler



Starting and stopping the charger


About your Charge Robot

The charge robout I'm using is Easee, but most Charge Robotes will works as long as they have a Homey App. heres the known list of Charge Robot Apps for Homey

  • Easee HomeSupports Local Scheduler
  • Zaptech Go. Does not support Local Scheduler
  • Wallbox Charger. Does not support Local Scheduler
  • Garo. Seems to not have a lot of features. But may be able to be started og stopped by Homey. In that case it may work
  • Go-e Charger. Does not support Local Scheduler
  • ChargeAmps-HALO. Does not support Local Scheduler


So it's seems like Easee still is the king of robots ....


Did I miss a charge robot ? Notify me ...


The Controller Panes

To turn on or off your charger controll process. It will still load prices, and retrieve status information, but it will not start or stop the carger even if the schedule is due.

The 2 sliders to manually controll current SoC or the target SoC





The 2 dropdowns to control the abmout of charge and when to get finished.

Here's the first thing you need to be aware of. If 'Use Charge End' time is selected, the controller will use Current SoC, Target SoC, Battery Capacity, Nominal Charge Speed, and the current time to decide when to select the hours it will enable charing on.

If you select i.e 3 hours, the Controller will select the 3 cheapest hours between now and the Charge End time to  enable charging. 

Note: If the car is not connected, the time of now will be used in the calculation, but if the Car is connected, then the hours will be recalulated from the time of car connecting and the Charge End time. This is quite obviously, as the cheapest hour may be passed, and if the Car was not connected at that time, it cannot be used, so the i.e 3 cheapest hours from the car connect time and Charge End time will be used.



The next pane is long, but nice. It shows all you need to know about what the Controller is planning to do. This is the main idea of the App. There's a lot of smart chargers out there, but no one are telling in advance the whole story about chat is plans to do. This App do.

So the first row is about the current SoC and target SoC.

The next is showing the charge speed ( you set this with the settings tab ) and the Charge End time

Next is the count of hours to charge. If 0, it means use end time and current SoC, and the result of the calulation is shown as 00:24 in this picture. The Controller anly use whole hours when controlling, so the Start Charge Command will happen at the start of the hour, and the End Charge Command will execute at next hour. In case of 00:24, it rounds up to next whole hour.

If you choose i.e 3 hours, the number will show here, and that amount will be selected. and the Calulated Charge Time ids just to help you set the amount, if that is your desire. Sometimes you maybe only want to charge just 2 hours, because that is what you want. Well, here you can do that.

Nest is the amount of ampere and watt you charger is delivering. It's just to inform you, it you have the need of knowing, which the whole idea of the App really is....

And at last there is one row for each hour, from 13.00 todauy to 12.00 tomorrow, which is the scope of this Charge Controller.. The left is Yes or - ( dash) and the rigth is the price for that hours. So you can see with your own eyes whats going on, and what will happen from now to tomorrow at 13.00 when new Nordpool prices are loaded.


This is a sample of one hour where a charge session is planned to happen. It's by intention that No is a dash and not No. It's is you easier differ the charge hours for the ones that does not.


When you change the Charge End Time or The Count of Charge Hours, a recalucation will occur.



You can create as many devices you want for have different targets to control. You can even control charger at home and at your cabin, if you have both chargers available in Homeyas Apps and they ar cloud ready, such as the Easee charge robot. 


Settings

Price settings

If you want to utilize tax, additional fee or power grid fee, just fill inn the values. You may also want to check/uncheck the option for compensation for the Norwegian prisesupport. If that is checked all prices will be justed by subtraction the amout of support each hour.

Put 0 (zero) inn all fields to act on raw prices only.

Note To achieve real cheapest price calulation algorithm demands to enter values for at least Power grid feeif it's different in day or night. And the Norwegian prisesupport should be checked


How to connect the dottes

So above is hopefully a explanation how to set up the different values to have the Carge Controll selectin which hours to charge the next '24 hours'


You MUST do a minimum of wiring using Homey Flows to gather information (inbould flows) and to execute charge commands (outbound flows)


Lets call it inbound flows and outbound flows.

Inbound flows.

Actually this is not mandatory to have charing occur, but if not set you must manuallt update both Current SoC and Target SoC.

But there are very conventient. I will show the use of may own car Audi e-tron and my own charge robot Easee Home Charger.

Available inbound flowcard in the Easy Charge Controller is :


This is the way you can ensure the Controller is updated immediate after startup, with latest values from your Charger App (Easee) and you Car App (myAudi).



Flow like this will push status changes to the Controller every times it occurs. This is important to do:





You can update the charge session data when it changes, so the Controller Pane shown above is updated whit latest values.

Flow like this :





You can update the Current SoC and Target SoC

Flow like this:




Outbound flows

Thie is the flows you will create to run a command when the Charge Controller ask for it. Or some informations event you might want to log og alert.



Stop and Start a charging session. This is mandatory, without this nothing will happen.

Flow like this:






Homey Scripts


In addition you need to create a Homey Script to transeform the start and stop time hastags to real values. Thsi is duw to a missing feature in Easee Charger App. But hey, this is Homey, you can fix it yourselv in a easy way.

NOTE! You must find your device id, see script for it below

createEaseeChargerSchedule.js

createEaseeChargerSchedule.js - For Homey 2019
try {

  console.log("createEaseeChargerSchedule args", args);

  const obj = JSON.parse(args);

  await Homey.flow.runFlowCardAction({
    uri: 'homey:device:your-device-id-here',
    id: 'createSchedule',  
    args: {
      'startTime': ''+obj.start,
      'endTime': ''+obj.stop,
      'repeat': true
    }
  });

} catch (err) {
  throw Error("Error occured with createEaseeChargerSchedule : " + err + " args: '" + args + "'");
}




createEaseeChargerSchedule.js - For Homey 2023
try {
 
  console.log("createEaseeChargerSchedule args", args);

  const obj = JSON.parse(args[0]);

  await Homey.flow.runFlowCardAction({
    uri: 'homey:easee:home',
    id: 'homey:device:your-device-id-here:createSchedule',
    args: {
      'startTime': obj.start,
      'endTime': obj.stop,
      'repeat': true
    },
  });

} catch (err) {
  throw Error("Error occured with createEaseeChargerSchedule : " + err + " args: '" + args + "'");
}




find-easee-device-id.js


Create this script and execute it, and you will find the Easee device id

find-easee-device-id.js for any Homey version
const actionCards = await Homey.flow.getFlowCardActions();
for( const card of actionCards ) {
  if(card.id.indexOf('createSchedule')> -1) {
    log(card.titleFormatted || card.title)
    log(JSON.stringify({
      uri: card.uri,
      id: card.id,
      args: card.args,
      droptoken: card.droptoken,
      duration: card.duration,
    }, false, 2));

  }
}



Charger Status Mapping

Easy Charge Controller is using some local status codes, identically as Easee, but other charges need to map their statuses to match, here's how the logic inside is using them

Easy Charger Controller expected status valuesExplanation
ChargingThe car is charging
CompletedThe car is finished charing, but still connected to the charger
PausedCar is connected but is not charging, the charging sessin is stopped by Easee App or Easy Charge Controller
StandbyNo car connected, charger is up and ready
Car connectedCar connected, charging session not started yet, probably the status will change to Charging is short time

Enable Push Notifications

It may occur some notifications the could be important, so it's advicable to add Push notifications to Easy Charge Controlle. Otherwise it will only show up in timeline.

Set it here :

Utilize Homey Easy Logger

This app has a companion in Homey Easy Logger that will help you gain even more control over what's happening.


Case 1. Status logging.

I have set up a FlowCard to push imprtant happenings to my Google Spredsheet by utilizing Homey Easy Logger. As one example below.


This is this evening I returned to home and connected the car to my Easee Charger. The Charger starts charging immediate shown at 20:29:07. The Charge Controller receives this status update, and is checking the Shcedule, and will discover that this hour is not due for charging, and will issue a stop charge command. That happened 20:29:21, as we see Chargers stop and status resumes to Paused. It also shows that my car is reporting it's charge level and Easy Charge Controller will update it's state en recalculate the Charge Schedule.





In this flow I'm utilizing the Easy Logger. Look into Easy Logger documentation how to connect Google Spreadsheet. In the case below I have craeated a Sheet tab with the name of Event Log, and assignet the sheet-id to a variable of SHEET_ID_EVENT_LOG, and always insert the new entry at row 2, and that will push old entries down with the latest entry on top. See picture below. It shows also Time line logging if desired


Example of the EventLog sheet-tab



Charging Schedule Strategy

This is an option in setting (not finished implemented yet, but Work In Progress)

The default strategy is Cloud, and with that strategy the Charge Controller will invoke the Flow Card for Starting a SCharger Session. This will normally end up in a cloud based command to start the charing session, but this is very dependent of the charger to actually be availabel in cloud at the charging due time. If not, everything goes wrong.

Topic about Power Balancing

In Norway there is different prices for different amount of energy used for one hour. So if you as an example want to never use more than 10 kWh within one you need someting to control and constraing power usage to achieve this.

Easy Charge Controller is not designed for this. It's not it's purpose.

But it will work fine with a power controller such as Tibber. Actually Tibber has a very well working power constrain feature, but you need to buy electricity from them. Do do, and I can only recommend this.

So how does this work

In this example the max is 10 kWh. I'm using Easee and have set up 32A max load. If one-phase it gives 7200 W, using three phase you get 8200W. Normally this is not a problem, but in winter, even at nigth, other power consumers may hit, such as water heating, and some other room heaters. It will possible force the Tibber App to lower the power on the Easee charger. An it will do so. Easy Charge Controller is only turning the Charge Robot on and off, and does not alter the ampere of the Charger.

So how will you solve this ?

Here is how I solve it:

I'm setting the nominal charge speed to somthing lower, because it's only a advice to the calculation of which hours to start charging. By setting it a bit lower than the maximum, the calucation will add one hour or maybe two, into the charge plan, just to be safe.


The whole idea is to be safe and shure that you car WILL be finished charged, and you can verify the sanity of the calculation before it's really happening.


And also the ability to part charging is now so very easy. If you just want to charge a bit, you select a couple of yours to match your desire and the Controller will select the cheapest hours to charge that amount on.




  • No labels