[APP][Pro] Tesla Smart Charger

Hi @FEY

  1. Think you can use the “Charging state” capability (“charging_state”) and test for a “Disconnected” value

  2. No such capability in the app just now

And generally: It is not that easy to create triggers for such attributes, since the car must be awake and polled very often to be useful. Eg. polling the car every 60 seconds leads to an average delay of 30 seconds before you see the change, and that is too much for most users.

OK, I will check this in a future fix.

v. 1.7.0 with fixes:

  • Final charge period is now a full hour
  • Fix ‘Is software update available’ condition

Link to install the test-version:

cc: @Sportswagoneer @JaccoStraaijer

Works like a charm!

Hi @balmli ,
I have a problem with a flow that is started by a trigger of your app.
The flow is triggered 20-30 times in a row.
Athom said it might have something to do with your app.
This is what the flow looks like.

Hi @copiis

Might be since you call the condition “Is at XXX” twice. I’m not sure.

Can you try something like this ?

  • WHEN: Vehicle entered location
  • AND: Logic: Panther auf Arbeid
  • AND: Logic name Exactly R8
  • AND: Logic: name Exactly TB II
  • THEN: —

This might lead to fewer calls to the Tesla API.

I will try, it should also be mentioned that everything worked wonderfully up to the Homey Update 8.1.1

I have a feature request:
It seems like the only way to control the current for the Tesla charger is by using a flow card. Unfortunately, this makes it impossible for it to be directly controlled by other Homey apps. The only way for other Homey apps to be able to control the charge current through the ‘homey:manager:api’ is if the charge current is exposed as a capability.

Can you please expose the following as capabilities:

  • The target charge current
  • The measured charge current (if available)

If you don’t want it exposed this way because it clutters the UI experience, then adding it with uiComponent: null will also work fine.

I would happily write a patch to the tesla app for you but I couldn’t find the app on github.

1 Like

Hi @balmli
I haven’t had a chance to try out the new flow variant yet, but I got an answer from Athom, so maybe you can do something with it.

Hi Rick,

Thank you for your reply.

If the flow is triggered faster than it would take to complete the Flow (and change the conditions) it is possible that the Flow can be triggered multiple times.

Best Regards,

Dennis

The Athom support team.

Stay posted on Facebook by liking our page: https://www.facebook.com/homey !

l have rebuilt the flow according to your suggestion and tested it today. Unfortunately, the old behaviour is still current, the flow is triggered 20-30 times.

Hello, can anyone tell me how the smart charging works or what I have to do for it?

I have set charging to “Automatic”.
Filled in the Charge settings and set Utility price settings.

When I plug in my Tesla, it will start charging immediately. So I have set planned charging from the Tesla app to 03:00.

But how do I get the app to smart charge my Tesla based on the lowest prices?
I don’t see any charge plan.

Data is fetched every 1440 minutes.

Can anyone help me?

@balmli hello, just to inform you: this night the app stopped working. Probably it was due to the update. For me it has been a problem since your app manages the maximum Ampere adsorbtion based on the apartment adsorbtion, and the energy provider cut off the current. This has been the first problem after more than one month.

@balmli , time to time, this morning I receive the message that the app is not working. This comes from a notification in an advanced flow, when the cards doesn’t work.

Hi Frode,

What about exposing state and control as an API instead ? And maybe some sort of standard that several charger apps could use ?

1 Like

I don’t think this is what I suggested. I meant using Logic cards for checking the name of the location. Not using Tesla app conditions.

1 Like

Might be that the refresh token is invalid. Try repairing by creating a new refresh token and paste into the repair screen.

1 Like

I would argue that the standard way of doing it would be to use capabilities in the first place instead of “flows only” because this not only gives you an ui-component but it also create insights and let you see the history which is impossible with “flows only”. As a bonus the flows are also created automatically so you don’t have to do that at all. Though, in your case I see that this causes some minor complications as to how to adapt to the legacy code to avoid non-breaking changes and avoid having multiple flows doing the same thing.

I understand that the main points against adding it as capabilities could be that:

  • It creates an unwanted ui-component
    • but that can be disabled with uiComponent: null
  • It creates unwanted extra flows
    • This can be avoided if you create the capabilities as sub-capabilities (so measure_current.offered would be fine)

If you would want to go for a standard, I suggest that you do the same as the Easee app, which has this exposed as capabilities with names:

  • measure_current.offered and
  • target_charger_current (though, if you don’t want the flows you could name it target_current.charger instead

I would much rather have it exposed as a capability because having it as an API will need the other applications to ask for permission in app.json, which when added will disable automatic updates of the app, which is an unwanted situation for me because the big majority of my app users doesn’t even have Tesla chargers. In fact, any API’s for doing this, no matter how standardized it is made, will not make communication with other apps work out of the box as everyone needs to add the permission and push new updates of the app just to make it compatible with the Tesla charger, which defeats the purpose of a standard, it will not work out of the box. And I would argue that the Tesla app users would appreciate having the insights for the target current as well, so it’s better for you to have it as a capability as well.

1 Like

Ok so am I right understanding that the parameter “charge hours per period” doesn’t have to be set by the user in “Automatic” mode, since the app calculates it? From the app description I thought that parameter always had to be user-defined :slight_smile:

I would recommend to correct the text in the Advanced Settings which currently says “Prices from Utility Bill” to “Prices from Norwegian Electricity Bill app”
I looked for a “Utility Bill” app and couldn’t find it until I randomly bumped onto the “Norwegian Electricity Bill (Strømregning)” and realized it was this one!

Also, is there any way to choose for the power (W) reported by the device NOT to be included in the house total consumption? I already have a power meter within the EV charger so currently the power consumption of the car is double counted in the Energy widget… Thx

Hello everybody, it seems I don’t undestand how to add locations. Can anyone share the flow you use to add locations. It seems I don’t undestand the tokens use.