You can install our site as a web app on your iOS device by utilizing the Add to Home Screen feature in Safari. Please see this thread for more details on this.
Note: This feature may not be available in some browsers.
I think you may be okay in the other instances. The charge_state is confusing as charge_state is part of the URL that you send to Tesla to get the whole dump of info on the charge, but the key in the JSON data is actually called 'charging_state'.That resolved the error, but 2 things: I noticed that there are several references to 'charge_state' in application.py - I wonder if they all need to be changed? Also, although this resolved the error, it returns the temperature of the car -- only in the Amazon Service Simulator though. It works as it should with an actual Alexa. Weird.
I got the 401 error until I just switched to using my oauth key instead. (still haven't been able to get it to work with the username and password)
Unfortunately, I made those changes and still no luck. I've run out of brain power for the day but tomorrow I'll take a shot at getting the oauth method working.@wayner reports that dropping the quote marks around TESLA_USER and TESLA_PASSWORD in Line 36 of application.py may fix this. It should read:
tesla_connection = teslajson.Connection(TESLA_USER, TESLA_PASSWORD)
The Dedham Service Center is holding my Model X "hostage" (routine service that turned into a two-week stay), so I can't readily test this. But I will update the application.py file in the repository
@wayner revealed to me something overnight that affects Model S users of the Nikola skill code quite a bit. He reports that Model S does not report internal or external temperatures with the climate controls off via API, thought Model X does. Since Nikola was developed for my Model X, the functions work great -- but they can fail on the Model S. I was frankly not aware there was a difference, though I also wonder whether that is still true for newly-built Model S vehicles.
This affects all of the temperature, climate, and status functions.
Fair warning -- some refactoring will be necessary to get this skill fully working for Model S.
Thanks for that additional info. I'm going to make a change today that can handle the case where a temperature query returns "None", so that the app reports that "Temperatures for your car are currently unavailable." That's better than failing.When my S has been idle for long, the interior/exterior temp doesn't report in TeslaFi. That said, I know my Model S will periodically check that data because sometimes I'll open the app in the middle of the day and a temp is displayed rather than be unavailable until I turn on climate controls. I have a classic/pre-autopilot S.
Ok, I think I got this - you can redownload the nikola.py file or just remove the quotes from around tempunits in line 370 of the file.I found one already. The full status returns temperatures in F as expected, but the quick status is returning them in C (more accurately, the value is in C although it says "Fahrenheit" afterwards).
BTW, I'm watching this thread with lots of interest as I don't have an Amazon Echo, but a Google Home is in the mail as a delayed Christmas present.
Have you guys seen this? Oh I WANT it
I'm a bit confused, as now it's not working for any case (even after changing it back). I have no Python experience (although I do know a few languages) so I haven't yet figured out what's going on, but I'm still poking around.Ok, I think I got this - you can redownload the nikola.py file or just remove the quotes from around tempunits in line 370 of the file.
File "C:\Tools\TeslaEcho\nikola.py", line 343, in GetStatus
FetchTemps(tempunits)
File "C:\Tools\TeslaEcho\nikola.py", line 204, in FetchTemps
inside_temp= ConvertTemp(data['inside_temp'], scale)
File "C:\Tools\TeslaEcho\nikola.py", line 194, in ConvertTemp
temperature = (temperature * 1.8) + 32
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'