Tesla Battery Gateway Plugin

petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

Woohoo!


Sent from my iPhone using Tapatalk
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

0.5.4

Some tidying up.

Give it a good test, few aspects to work out the UK differences etc.etc.
But can leave that for another time.
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

That works great - No errors anymore for me.

Yeah it seems the PW has an additional reserve in it, since setting it to 0% in the app actually sets it to 5% on the PW Directly.

Now to get really clever with Weather predictions for the next day so I don't have any days where the PW doesn't charge from cheap electric overnight as it's been sunny for the last 2 days... !
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

Also a quick thought - now we have the commands working would it be worth testing without the gateway restart?
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

petematheson wrote:Also a quick thought - now we have the commands working would it be worth testing without the gateway restart?
Morning!(or Evening as the case may be)

The gateway start, or more specifically the site master stop. This happens with installer login used to get token. Same thing happens with the web browser login. So the plugin doesn’t restart, but it does sitemaster/run after changing modes to restart.

Seems like no way around this, but maybe not as bad as it was.

Have paused querying for other results whilst the set operational mode is taking place. Removing those errors, which was marking the Powerwall offline. Probably also helps with risk of timeout from gateway.

Do need to sort out the UK difference with real-mode, as opposed to mode elsewhere.
Probably should also add a check for grid-offline and not run any commands if battery in backup mode otherwise will result no power until grid returns.

Glenn


Sent from my iPad using Tapatalk
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

All working great for me here thank you again for all your work on this.
I've used it to charge up when the grid has paid me to charge around 3 times in the last few weeks! It triggers the PowerWall and the Car to both charge. Winner ;)

With that said - I'm seeing these in the logs from time to time?

Tesla Battery Error Caught Exception in fillsiteinfo
Traceback (most recent call last):
File "plugin.py", line 786, in fillsiteinfo
device.updateStatesOnServer(stateList)
TypeError: state value type must be bool, int, real, or string

Doesn't seem to be causing any issues though.
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

Thanks

Seems like a state value doesn’t exist - (does check it is in the returned data but might be null?)

Have you the site info results from prior to error message?

Glenn


Sent from my iPhone using Tapatalk
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

It always seems to be just * (blank)
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

petematheson wrote:It always seems to be just * (blank)
Seen it myself - should have looked!
Will sort out soon (think it’s the new size of reported maximum watts)
Glenn


Sent from my iPad using Tapatalk
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

Should be fixed

Try 0.5.5 on GitHub

The new firmware had changed the data format


Sent from my iPhone using Tapatalk
colovin
Posts: 175
Joined: Tue Oct 27, 2009 11:55 pm

Re: Tesla Battery Gateway Plugin

Post by colovin »

I'm very new to this. I've had a medium system (24 panels) with 2 PowerWalls going for a week. I've got the new Interconnect, it's only the second one installed in Arizona USA. I don't know if the gateway is different also. I'm unable to connect.

Tesla Battery Debug HTTPS CURL result:
Tesla Battery Debug ReturnCode:7
Tesla Battery Debug ReturnCode:7
Tesla Battery Debug Text :<closed file '<fdopen>', mode 'rb' at 0x10ddd6660>
Tesla Battery Debug Error Running command. ?Powerwall offline
Tesla Battery Debug Offline
Tesla Battery Debug Connection cannot be Established

The IP address is correct, does this log indicate anything?
Indigo 7.1.1, OS 10.14.6, MacMini .3.2 GHz 6 Intel Core i7, 64 GB ram
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

Hi

Yeah - sorry log doesn’t really help at all.

Except to say can’t connect - could be one of many factors you mention.

Try:

https://ipaddress/api/meters/aggregates

Do double check IP address - put in web browser and see, and serial Number...

Glenn


Sent from my iPad using Tapatalk
colovin
Posts: 175
Joined: Tue Oct 27, 2009 11:55 pm

Re: Tesla Battery Gateway Plugin

Post by colovin »

Thanks for the rely. Yes I'm sure of the IP address, I've reserved the Mac address so it will be static in my system. I've googled about accessing the gateway and tried all the various address but have never been able to get in. I asked Tesla tech support about getting on the gateway with a computer and they just said there's an app for that, meaning use the app not the computer. I suspect they've locked it down.
Indigo 7.1.1, OS 10.14.6, MacMini .3.2 GHz 6 Intel Core i7, 64 GB ram
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

colovin wrote:Thanks for the rely. Yes I'm sure of the IP address, I've reserved the Mac address so it will be static in my system. I've googled about accessing the gateway and tried all the various address but have never been able to get in. I asked Tesla tech support about getting on the gateway with a computer and they just said there's an app for that, meaning use the app not the computer. I suspect they've locked it down.
You should be able to access it in a web-browser I would think regardless.

Have you tried the address posted above in web browser?


Sent from my iPhone using Tapatalk
colovin
Posts: 175
Joined: Tue Oct 27, 2009 11:55 pm

Re: Tesla Battery Gateway Plugin

Post by colovin »

Have you tried the address posted above in web browser?
Yes, I've attached a screen shot of the result.
Attachments
screenshot_574.jpg
screenshot_574.jpg (18.28 KiB) Viewed 12295 times
Indigo 7.1.1, OS 10.14.6, MacMini .3.2 GHz 6 Intel Core i7, 64 GB ram
Post Reply

Return to “Tesla Battery”