Powerwall - Extended Parameters

Hi @bshep

First, THANKS for taking the extra effort to share your docker image!

I get this error in the setup when running your docker image on my Diskstation 1812+…I also get an error when just trying to ping the Powerwall2 gateway from my diskstation in a terminal window.

Any advice on how to get the proper network ports open to allow the communication? Is there a set of ports I need to map in the container config?

2019-07-16 23:08:06,571 INFO [main] (Controller.java:109) - *** Starting PVOutput Integration Service v1.5.4

2019-07-16 23:08:06,600 INFO [Thread-0] (Controller.java:130) - Install Directory: /usr/src/app

2019-07-16 23:08:06,621 INFO [Thread-0] (Controller.java:139) - Loaded Config: pvoutput.ini

2019-07-16 23:08:06,854 INFO [Thread-0] (AdminConsole.java:35) - Starting admin console on port: 8888

2019-07-16 23:08:10,705 INFO [Thread-0] (WebClient.java:133) - >>> http://pvoutput.org:80/service/r2/getsystem.jsp?donations=1

2019-07-16 23:08:11,228 INFO [Thread-0] (Controller.java:2136) - <<< Skyscraper of Panels & PW,10980,94028,36,305,Mission Solar 305W,4,2500,SMA SunnyBoy,N,11.0,No,20030109,37.374421,-122.213,5;;1

2019-07-16 23:08:13,231 INFO [Thread-0] (WebClient.java:133) - >>> http://pvoutput.org:80/service/r1/getstatus.jsp?d=20190716

2019-07-16 23:08:13,382 INFO [Thread-0] (Controller.java:323) - --------------------------

2019-07-16 23:08:13,384 INFO [Thread-0] (Controller.java:324) - System Name: Skyscraper of Panels & PW

2019-07-16 23:08:13,385 INFO [Thread-0] (Controller.java:325) - System Size: 10980

2019-07-16 23:08:13,386 INFO [Thread-0] (Controller.java:326) - Timezone: America/Los_Angeles

2019-07-16 23:08:13,387 INFO [Thread-0] (Controller.java:327) - Donation Mode: true

2019-07-16 23:08:13,389 INFO [Thread-0] (Controller.java:328) - Max History: 90

2019-07-16 23:08:13,391 INFO [Thread-0] (Controller.java:329) - Status Interval: 5-min

2019-07-16 23:08:13,392 INFO [Thread-0] (Controller.java:330) - Status Date Time: null

2019-07-16 23:08:13,394 INFO [Thread-0] (Controller.java:331) - Upload Temperature: true

2019-07-16 23:08:13,396 INFO [Thread-0] (Controller.java:332) - Upload Voltage: true

2019-07-16 23:08:13,398 INFO [Thread-0] (Controller.java:333) - Energy Generation: -1

2019-07-16 23:08:13,400 INFO [Thread-0] (Controller.java:334) - Energy Consumption: -1

2019-07-16 23:08:13,404 INFO [Thread-0] (Controller.java:335) - Create Local Graph: true

2019-07-16 23:08:13,406 INFO [Thread-0] (Controller.java:336) - Retry Limit: 60 to 80

2019-07-16 23:08:13,407 INFO [Thread-0] (Controller.java:337) - --------------------------

2019-07-16 23:08:13,438 INFO [Thread-0] (Controller.java:372) - Loaded Reader 1: powerwall

2019-07-16 23:08:13,440 INFO [Thread-0] (Controller.java:373) - Log Directory 1: [/logs]

2019-07-16 23:08:13,442 INFO [Thread-0] (Controller.java:384) - Loading Config 1: powerwall.ini

2019-07-16 23:08:13,446 INFO [Thread-0] (SimpleLogReader.java:428) - Read 0 log entries

2019-07-16 23:08:13,455 INFO [Thread-0] (AHttpLogReader.java:80) - URL 1: https://192.168.2.200/api/meters/aggregates

2019-07-16 23:08:13,464 INFO [Thread-0] (AHttpLogReader.java:97) - Poll Frequency: 300 seconds

2019-07-16 23:08:13,466 INFO [Thread-0] (AHttpLogReader.java:119) - v7 mapped: battery.instant_power

2019-07-16 23:08:13,468 INFO [Thread-0] (AHttpLogReader.java:125) - v8 mapped: load.energy_imported

2019-07-16 23:08:13,469 INFO [Thread-0] (AHttpLogReader.java:131) - v9 mapped: solar.energy_exported

2019-07-16 23:08:13,471 INFO [Thread-0] (AHttpLogReader.java:137) - v10 mapped: site.instant_apparent_power

2019-07-16 23:08:13,473 INFO [Thread-0] (AHttpLogReader.java:143) - v11 mapped: load.frequency

2019-07-16 23:08:13,475 INFO [Thread-0] (AHttpLogReader.java:149) - v12 mapped: load.instant_total_current

2019-07-16 23:08:13,499 INFO [Thread-0] (AHttpLogReader.java:189) - Id: 0, sensor: 0, channels: [], direction: Export, calibration: 1.0

2019-07-16 23:08:13,512 INFO [Thread-9] (WebClient.java:243) - >>> https://192.168.2.200:443/api/meters/aggregates

2019-07-16 23:08:13,523 INFO [Thread-0] (Controller.java:435) - Found 1 Sensors

2019-07-16 23:08:13,529 INFO [Thread-0] (Controller.java:536) - Added Reader: powerwall0

2019-07-16 23:08:13,542 INFO [Thread-0] (Controller.java:560) - Log File: powerwall0 [PW0-2019-07-16.log]

2019-07-16 23:08:13,545 INFO [Thread-0] (Controller.java:572) - Export Sensor: 0, id: 0

2019-07-16 23:08:13,589 INFO [Thread-0] (Controller.java:579) - Service: [http://pvoutput.org:80/service/r2/addbatchstatus.jsp] Test: false, End: 20:00

2019-07-16 23:08:13,590 INFO [Thread-0] (Controller.java:587) - Loaded 1 Readers (Import: 0, Export: 1)

2019-07-16 23:08:15,593 INFO [Thread-0] (Controller.java:731) - Startup Complete: Waiting for data…

2019-07-16 23:08:16,648 INFO [Thread-9] (DefaultRequestDirector.java:586) - I/O exception (java.net.NoRouteToHostException) caught when connecting to the target host: Host is unreachable (Host unreachable)

2019-07-16 23:08:16,650 INFO [Thread-9] (DefaultRequestDirector.java:593) - Retrying connect

2019-07-16 23:08:19,650 INFO [Thread-9] (DefaultRequestDirector.java:586) - I/O exception (java.net.NoRouteToHostException) caught when connecting to the target host: Host is unreachable (Host unreachable)

2019-07-16 23:08:19,651 INFO [Thread-9] (DefaultRequestDirector.java:593) - Retrying connect

2019-07-16 23:08:22,656 INFO [Thread-9] (DefaultRequestDirector.java:586) - I/O exception (java.net.NoRouteToHostException) caught when connecting to the target host: Host is unreachable (Host unreachable)

2019-07-16 23:08:22,657 INFO [Thread-9] (DefaultRequestDirector.java:593) - Retrying connect

2019-07-16 23:08:25,667 ERROR [Thread-9] (AHttpLogReader.java:463) - Http Error

java.net.NoRouteToHostException: Host is unreachable (Host unreachable)

at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)

at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)

at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)

at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)

at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:322)

at java.base/java.net.Socket.connect(Socket.java:591)

at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:285)

at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:375)

at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)

at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)

at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)

at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)

at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)

at org.pvoutput.integration.reader.AHttpLogReader$ASimpleLogFileWriter.get(AHttpLogReader.java:430)

at org.pvoutput.integration.reader.AHttpLogReader$ASimpleLogFileWriter.run(AHttpLogReader.java:354)

OK, the answer is pretty simple – my account, even though it was in the administrator group, did not have permission to run certain network commands at root privileges. If I “sudo ping 192.168.2.200” then everything worked fine from the terminal. Who knew that “ping” would be a restricted command!

So…had to log in as Admin, and run the docker image as Admin. It’s running now and I’ll see if it produces good data.

I’ll probably end up running two, one for solar generation and one for consumption, but for now I just want to see solar production.

1 Like

@pvpvpw

Sorry I didnt get a chance to reply to your message, I set this up for my brother who runs a powerwall and he does the same as you, he runs two instances, one for generation and one for consumption, i can modify the docker to run two instances in one image, but its probably cleaner to leave it as is and just run 2 dockers.

If anyone is interested for me to expose other config files in the config directory let me know.

1 Like

Sure, please do share that. I’ve not gotten around to setting up the second one…spent my time getting a Sense installed instead. That’s been fun, but haven’t tried interfacing to it.

In case anyone is interested I have updated the docker image to 1.5.5.1

Also I have an experimental image tagged ‘dual’ that will run 2 instances so you can have generation and usage on the same docker image, fair warning i have done some preliminary sanity checks but seems to work fine. If you decide to test it, i recommend you back up your configuration directory as it will move any config files it finds to the ‘in’ directory, you will of course have to configure the ‘out’ directory with the correct parameters.

Hope that helps!

1 Like

Hi bshep

Just wanted to let you know that I gave your dual docker image a go the other day and on my test system it’s working very nicely.

However, I have one small issue I haven’t been able to work out yet. Likely a simple one due to my inexperience - but it seems that my solar production is being reported incorrectly on my “in” config. It appears the values I’m getting reported in there is load.instant_power instead of what I’d expect to be solar.instant_power.

For anyone running two instances, are you able to confirm that the only difference in your powerwall.ini files is just “direction=out” instead of “direction=in” and that all other values (including the extended data ones) are identical?

Edit: Okay, worked this one out. The issue was the config path was the same for both in/out instances and so they were both fighting to update their respective data sources. Changed them to /config/in and /config/out.

1 Like

Resurrecting this thread. I am using the dual docker image successfully (thanks!!!). However, in the Synology Docker “details” of the container (bshep-pvoutput1), the log and terminal are reporting a “tail: read error: Is a directory” error about every second. The only thing I’ve done differently is map the pvoutput.ini log files in each instance to the /config/in and /config/out folders, respectively. Any ideas what could be causing this error?

Edit: I found this thread (https://github.com/jacobalberty/unifi-docker/issues/173) describing a docker-compose.yml logging error that can cause this tail error. Not sure if related. Would appreciate any thoughts or fix.

Edit2: I’m guessing this is an issue where the daily data logs are typically stored (c:/logs). I’ve already mapped /config to a proper folder. Have others mapped the c:/logs to a different folder or dealt with this a different way? If you comment out the daily data logs location the system doesn’t work.

Edit3: On the suggestion of a helpful Redditor, I deleted the log files and started over. This worked and I no longer get the Tail errors for those that care.

2 Likes