rhodesman / teslaPowerDash

GNU General Public License v3.0
85 stars 11 forks source link

Live Data Not Populating #12

Closed alvies closed 3 years ago

alvies commented 4 years ago

Thanks for this project, I just got a Powerwall and have been using the app obsessively and am excited to have the data on a bigger screen. I've got the Historical dashboard working well, but I'm getting "No Data" for the main graph and every gauge on the Live Graph dashboard. Since Historical is working, I assume the issue is in the dashboard config, but I'm not seeing any problems with my info there. Any troubleshooting tips? Thanks!

knewmania commented 4 years ago

I am seeing a similar issue. I thought it may be the OAuth token expiring, but the Historical data is still working.

rhodesman commented 4 years ago

Can you post a query that is setup for a couple of the the graphs that are not showing data?

knewmania commented 4 years ago

I am leaning towards the OAuth token expiring. I noticed the Historical data does not utilize the OAuth. Here are the query examples you requested.

http://:3301/api/tesla//energy_sites//live_status Select field(response_battery_power) last()

http://:3301/api/tesla//energy_sites//live_status Select field(response_solar_power) last()

knewmania commented 4 years ago

It was in fact the OAuth token expiring in my instance. I updated the telegraf.conf with the new token and then changed the graph details and its working. Was kind of a painful process for me.

alvies commented 4 years ago

@rhodesman the queries mentioned by @knewmania look like similar ones to what I am seeing fail. It could be the OAuth token expiring for me as well, but I just started setting this up yesterday and I wouldn't have thought the token would have expired so quickly.

Additionally, if I hit the Tesla API at the :3301 URL, with the current token and device ID, I get JSON data back that looks correct. It seems like in my case it's a disconnect somewhere between Influx, Telegraf, and Grafana, but I'm not knowledgable enough to know where to look.

rhodesman commented 4 years ago

@knewmania & @alvies I have a new build I'll be pushing here later today. I did away with the oAuth token being part of the API URL as that just makes it difficult to track data historically. The new build will store the oAuth in the NodeJS API and will check if the oAuth is still valid and if not, will acquire a new oAuth automatically.
I just need to scrub my personal data from the app and write up some new instructions.

knewmania commented 4 years ago

@rhodesman any update on the new build?

rhodesman commented 3 years ago

@knewmania I have not really had much time to touch it. The issue I have right now is every so often, the nodeJS API server will crash and stop sending data to InfluxDB. If anyone has the ability to help troubleshoot the issue, I can add in the branch to GitHub.

My Apologies to all for my lack of support in recent months. Since the Pandemic, my company has gone through a couple layoffs and I'm now doing the work of 6 people instead of my normal 2-3 people. This has hit me hard in my freetime because I'm mentally exhausted and don't have the energy to put into this project ATM ;)

knewmania commented 3 years ago

@rhodesman I understand your lack of time, I hope your workload decreases soon. I am willing to help troubleshoot in anyway possible, but I wouldn't say I am an expert on any of this. Please let me know if you need anything.