Cars added, not showing status

Posted on
Mon Jun 11, 2018 2:08 am
shapa offline
Posts: 366
Joined: Sep 08, 2014
Location: Swindon

Cars added, not showing status

Two cars on my account added with no issues. Remote control works well.

Statuses are not shown. Maybe an issue for >1 car?
Attachments
Screenshot 2018-06-11 09.06.13.png
Screenshot 2018-06-11 09.06.13.png (241.8 KiB) Viewed 825 times

Posted on
Mon Jun 11, 2018 2:17 am
shapa offline
Posts: 366
Joined: Sep 08, 2014
Location: Swindon

Re: Cars added, not showing status

OK, found the reason. In case of no "work address" is specified - the status is not shown.

I don't have a working address, working remotely from home :)

Is it possible to update to make it not compulsory?
Last edited by shapa on Mon Jun 11, 2018 2:24 am, edited 1 time in total.

Posted on
Mon Jun 11, 2018 2:21 am
durosity offline
User avatar
Posts: 3827
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Cars added, not showing status

Two Tesla’s? Greedy!


Sent from my iPhone using Tapatalk

Computer says no.

Posted on
Mon Jun 11, 2018 8:16 am
kw123 offline
User avatar
Posts: 6643
Joined: May 12, 2013
Location: Dallas, TX

Re: Cars added, not showing status

Have 2 bikes


Sent from my iPhone using Tapatalk

Posted on
Mon Jun 11, 2018 2:49 pm
howartp offline
Posts: 3754
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Cars added, not showing status

shapa wrote:
OK, found the reason. In case of no "work address" is specified - the status is not shown.

I don't have a working address, working remotely from home :)

Is it possible to update to make it not compulsory?

Ah, I think that's coincidence of tidying up the looping/efficiency - the status update line is right in the middle of where I was working. :-)


Sent from my iPad using Tapatalk Pro

Posted on
Thu Jul 19, 2018 9:22 am
brianlloyd offline
User avatar
Posts: 205
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Cars added, not showing status

I have a repeating sechdule polling loop to check battery level every 10 minutes. It doesn't update. (Value never changes and I never see the debug stream in the log showing that anything has been fetched from the Tesla server.) When I went to the actual device (I named the device Nicola, my car name), edited the device, clicked on "Edit Device Settings", then clicked "Save", the server is polled and all the states come back. It seems to me that doing a variable action, i.e. "Insert Device State into Variable (Variable actions)", should force the plugin to poll Tesla's servers.

There is a LOT of stuff that comes back when the server is polled, at least according to the debug entry in the log. Is it possible to get the Tesla server to push state changes to the plugin?

So, how DO you think this plug-in should behave? If Tesla won't push state to Indigo then it means that Indigo must poll for state. How often? When do we really want to know state changes? Without a way to get the server to push state data I would do the following:

Poll for state every 10 minutes. Store everything.
If a command is issued, poll for state immediately following the command.
Add a command to poll for state so the user can force a poll for state whenever they want updated data.

FWIW, I was going to use writing this plugin as a way to teach myself Python. You beat me to it.

Posted on
Thu Jul 19, 2018 9:29 am
brianlloyd offline
User avatar
Posts: 205
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Cars added, not showing status

durosity wrote:
Two Tesla’s? Greedy!


Why? I have never liked a car as much as I do my new M3. My girlfriend is trying to decide what to get for a car to keep here at my house and I am encouraging her to get an M3 too. It is not unusual for a family to have more than one car. Why shouldn't they be Teslas? I know people with more than one Ford or more than one Chevy. (Mercedes, BMW, Toyota, Lexus, Infinity, Honda, etc.)

Posted on
Thu Jul 19, 2018 9:30 am
durosity offline
User avatar
Posts: 3827
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Cars added, not showing status

I was only kidding dude ;) I’m actually thinking of getting a second Zoe when funds allow because it’s a nice car!


Sent from my iPhone using Tapatalk

Computer says no.

Posted on
Thu Jul 19, 2018 9:44 am
brianlloyd offline
User avatar
Posts: 205
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Cars added, not showing status

durosity wrote:
I was only kidding dude ;) I’m actually thinking of getting a second Zoe when funds allow because it’s a nice car!


No worries. I'm just humor-impaired.

Zoe? First I've heard of it. Cute car. That would be precisely what my girlfriend would like. I don't think they import them to the USA tho'. Too bad.

But then there is the issue that it is a Renault. I haven't had particularly good luck with Renault in my life. :wink:

Posted on
Thu Jul 19, 2018 9:51 am
durosity offline
User avatar
Posts: 3827
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Cars added, not showing status

Yeah it definitely is a “cute” car.. I think it looks a bit like a hamster.

And yeah.. french Cars And Electric’s are not exactly a good combo! But that said.. it’s not been bad!


Sent from my iPhone using Tapatalk

Computer says no.

Posted on
Thu Jul 19, 2018 4:35 pm
howartp offline
Posts: 3754
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Cars added, not showing status

brianlloyd wrote:
. Is it possible to get the Tesla server to push state changes to the plugin?

So, how DO you think this plug-in should behave? If Tesla won't push state to Indigo then it means that Indigo must poll for state. How often? When do we really want to know state changes? Without a way to get the server to push state data I would do the following:

Poll for state every 10 minutes. Store everything.
If a command is issued, poll for state immediately following the command.
Add a command to poll for state so the user can force a poll for state whenever they want updated data.

Hi Brian.

It’s not possible for Tesla to push changes.

If a Command is issued, I do poll for the result.

A user can poll the states already - in fact you indicate you’re already doing this if I understand correctly.

There’s no way for a plugin developer to know when one of their states is being inserted to a variable. Instead you’d have a trigger on “device state changed” and an action to insert it. Though it’s debatable whether you need to do this depending on your need - you can see the states in the Indigo software, control pages or Indigo Touch already without inserting them in a variable.

I’m wondering if Tesla is refusing to respond to a 10 minute poll. I don’t know?

Peter


Sent from my iPhone using Tapatalk Pro

Posted on
Thu Jul 19, 2018 6:40 pm
brianlloyd offline
User avatar
Posts: 205
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Cars added, not showing status

howartp wrote:
brianlloyd wrote:
. Is it possible to get the Tesla server to push state changes to the plugin?

So, how DO you think this plug-in should behave? If Tesla won't push state to Indigo then it means that Indigo must poll for state. How often? When do we really want to know state changes? Without a way to get the server to push state data I would do the following:

Poll for state every 10 minutes. Store everything.
If a command is issued, poll for state immediately following the command.
Add a command to poll for state so the user can force a poll for state whenever they want updated data.

Hi Brian.

It’s not possible for Tesla to push changes.


I figured they weren't but there is always the off-chance they might.

If a Command is issued, I do poll for the result.


Ah, OK.

A user can poll the states already - in fact you indicate you’re already doing this if I understand correctly.


I do, but I can see from the log that nothing is actually happening to update the state data. What events can you trigger on?

There’s no way for a plugin developer to know when one of their states is being inserted to a variable. Instead you’d have a trigger on “device state changed” and an action to insert it. Though it’s debatable whether you need to do this depending on your need - you can see the states in the Indigo software, control pages or Indigo Touch already without inserting them in a variable.


Well, it did seem to me that there is an event that occurs, i.e. there is a call to fetch the state. But I freely admit that I don't know enough about how actions become events inside Indigo so I was just guessing.

Seeing the state data in Indigo Touch is something new (for me). I didn't realize it could do that.

I’m wondering if Tesla is refusing to respond to a 10 minute poll. I don’t know?


So how do I force an update of state?

Posted on
Wed Dec 19, 2018 9:55 am
brianlloyd offline
User avatar
Posts: 205
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Cars added, not showing status

The plugin seems to be broken now. I am not sure when it stopped working but it no longer successfully polls for battery charge state. I have a schedule that runs every 10 minutes to poll for charge state and then move that into a variable. Every time it runs I get this:

Action Collection Error State id (battery_level) isn't available for device model Tesla Vehicle - action not configured correctly


I do know that I changed my password and reentered it when configuring the plugin. So I deleted the device for my car 'Nicola' and recreated it. Got this:

Dec 19, 2018 at 09:40:36
Tesla EV Control Debug carListGenerator: [(u'51432506199105159', u'Nicola (5YJ3E1EA4JF018669)')]
Tesla EV Control Debug Device ID: 608999703
Tesla EV Control Tesla request doRefresh for vehicle 51432506199105159
Tesla EV Control Debug doRefresh
Tesla EV Control Tesla request charge_state for vehicle 51432506199105159
Tesla EV Control Debug charge_state
Tesla EV Control Error Error in plugin execution UiClosed2:

Traceback (most recent call last):
File "plugin.py", line 73, in closedDeviceConfigUi
File "plugin.py", line 133, in vehicleStatus2
File "plugin.py", line 140, in vehicleStatus2
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 118, in data_request
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 131, in get
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 69, in get
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 78, in post
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 96, in __open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
HTTPError: HTTP Error 408: Request Timeout

Stopped and restarted the plugin. Got this:

Dec 19, 2018 at 09:44:14
Tesla EV Control Fetching vehicles...
Tesla EV Control Error Error in plugin execution GetUiDynamicList:

Traceback (most recent call last):
File "plugin.py", line 65, in carListGenerator
File "plugin.py", line 57, in getVehicles
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 65, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 69, in get
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 75, in post
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Tesla Control.indigoPlugin/Contents/Server Plugin/teslajson.py", line 96, in __open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
HTTPError: HTTP Error 401: Unauthorized

Suggestions?

Posted on
Wed Dec 19, 2018 9:57 am
howartp offline
Posts: 3754
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Cars added, not showing status

I’m trying not to touch my plugins till March/April but I’ll try look at this given its currently broke.

Can someone send me their credentials by pm?


Sent from my iPhone using Tapatalk Pro

Posted on
Wed Dec 19, 2018 12:32 pm
howartp offline
Posts: 3754
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Cars added, not showing status

Hi Brian.

Ok, I've tested it with Martin's credentials as yours are currently not working.

At first I had the same problem as you, with the log stating it was going to request charge_state (for example) but then never doing so.

I'm not sure why that was, but restarting the plugin (which itself checks and populates all the states) then made the actions start working again.

I'll look at my logic for what vehicle identifiers etc I store differently at startup to other times to see why the plugin crashes, but once it's working, it should be ok - nobody else has reported issues.

Once your password is sorted, can you try again?

Peter

Who is online

Users browsing this forum: No registered users and 1 guest