Dear Paul,
thank you for this great work! I copied the jar-File into my openhab “addons” folder and restarted the openhab docker container on my Synology NAS.
Then I got the following entries in “openhab.log”:
2019-11-10 13:49:13.776 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.teslapowerwall-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.teslapowerwall [216]
Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
I not sure weather this is a bug in the binding or I missed something.
Hi Paul,
thank you for your helpful answer. I installed OH 2.5 milestone 4 and finally after configuring the binding (providing local credentials) in Paper UI it is working! Now testing can begin
Cheers,
Manfred
That’s great to hear! the local credentials are optional, but required to retrieve the operating mode and current reserve level.
On my todo list is to enable changing the operating mode, and changing the reserve settings. I’ll try get to this soon, and hopefully get the binding in a fit state before the release of 2.5 so it can be included.
This should be a debug message, not a warning - sorry about that. I keep meaning to fix it
Once I add support for changing the operating mode and reserve level, it will go away once and for all - I just need to find time to do that.
I’d like to try and get the binding finalised before the release of 2.5 in mid-December - but not sure that’s going to be possible - perhaps I should clean up the code with the current functionality; and changing mode and reserve can be added down the track?
seems with 2.5M6 Powerwall binding is not working any longer.
Any ideas?
2019-12-07 11:35:23.402 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Convert JSON to Item Type Number': The name 'PW_InstPower_Site' cannot be resolved to an item or type; line 8, column 5, length 17
Hey Paul, first off thanks for working on this! I am a relative noob to openhab and have setup a raspberry pi 3 following the most basic instructions. I then installed your binding and set it up using the IP address for my powerwall2 gateway which is 192.168.1.70 in my case. I get “Status: OFFLINE - COMMUNICATION_ERROR Tesla Powerwall returned error while invoking https://192.168.1.70/api/login/Basic” If I go to this address in chrome it returns “Method Not Allowed” as text. Has something changed? Do you have an updated version of your binding? Appreciate any help otherwise will start from scratch…
The binding is working for me. I get the same error if I try and access the URL you gave directly in Chrome.
Have you put valid credentials in for login email and password? Perhaps there’s a glitch if these are left blank? If I get a chance tonight, I’ll do some testing without the login/password and make sure the binding doesn’t report errors with this setup - I probably didn’t test that use case thoroughly.
I also need to find some time to allow changing the operating mode and reserve settings from within the binding.
@shaneprobinson I confirmed your error occurs if the username/password aren’t passed to the powerwall. I’ll try fix this ASAP so that it doesn’t try that command if the username/password are blank
Thanks for the quick reply. I tried several options:
1.) no credentials
2.) My installer login details
3.) My customer user details.
None seemed to work… All had the same error. For what I am using this for I don’t need to set the reserve level or change settings. I just want to read the battery SOE and site power for hot water proportional heating control. I already have this implemented in my house with a Loxone home automation controller and a seperate stand alone meter. Loxone however refuses to work with the self signed SSL certificate so can’t talk directly to the powerwall gateway which would be ideal. I’m basically using openhab and a raspberry pi as a gateway. Plus its a great chance to learn another platform.
anyways, your help is greatly appreciated and it seems like if we can ignore that authentication in the binding that would be a good option to have to simplify things. Happy to help anyway I can. I’ve just ordered some python books so I can touch up on that side of things as my history is in embedded C and assembler languages.
yup working sweet now. Thanks paul! Now to learn the rest of Openhab… and python… and linux… sigh. Definitely a lot to learn for a noob! I will get there… step by step.
hahah that’s how I started. As an example of what you can do with rules, here’s the rule I have to notify me if there’s a power outage:
rule "Grid down"
when
Item TeslaPowerwall_GridStatus changed
then
if(TeslaPowerwall_GridStatus.state == "SystemIslandedActive")
{
sendBroadcastNotification("Grid is not connected")
}
if(TeslaPowerwall_GridStatus.state == "SystemGridConnected")
{
sendBroadcastNotification("Grid power restored")
}
end
I keep thinking of things when battery state is 100% a well, but never get around to it