Announcement

Collapse
No announcement yet.

Manual / help for Tesla Powerwall

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Manual / help for Tesla Powerwall

    Is there a manual / help for this plugin? I am getting spammed with the debug messages every couple seconds:
    01:21:05:9890:[Tesla Powerwall Debug]->debug: Powerwall data retrieved successfully
    01:21:08:0931:[Tesla Powerwall Debug]->debug: Retrieving Powerwall data

    The second question is how do I access the Powerwall data?

    % more "Tesla Powerwall.ini"
    [GatewayNetwork]
    ip=10.0.10.70

    Date/time=9/7/2020 11:07:40 PM PDT
    Version=HS4 Pro Edition 4.1.3.0 (Linux)
    License=Registered
    Uptime=0 Days 3 Hours 57 Minutes 52 Seconds
    Lan IP=10.0.10.150 (HomeSeer-MacMini.local)
    Device Count=705
    Event Count=101
    Plugins Enabled=Z-Wave:,RFXCOM:,JowiHue:
    Modules/Threads=124 Modules, 10 Threads
    Available Threads=1199
    HomeSeer Memory Used=167 Mbytes
    Plugins Installed=Big5 1.38.0.0,Chromecast 4.0.13.0,JowiHue 4.0.2.0,Rachio 4.0.0.0,RFXCOM 30.0.0.41,SmartThings 4.0.15.0,Tesla Powerwall 1.0.7539.5945,weatherXML 3.0.1.19,Z-Wave 3.0.2.0

    % mono --version
    Mono JIT compiler version 6.10.0.104 (2019-12/5d03a6fe116 Wed Apr 29 20:51:09 EDT 2020)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:
    SIGSEGV: altstack
    Notification: kqueue
    Architecture: amd64
    Disabled: none
    Misc: softdebug
    Interpreter: yes
    LLVM: yes(610)
    Suspend: hybrid
    GC: sgen (concurrent by default)




    #2
    Ah! I didn't realize the fine HS folks created a forum for this plugin. Awful nice of them to auto-subscribe me to it so I got an email about this!

    Firstly, you shouldn't be seeing those debug messages; I guess I forgot to flip to release build config for the assembly I uploaded. Either way no big harm, it's just those extra log messages.

    The plugin creates status devices for your Powerwall. If you don't see them, you may need to check your device type filters. I haven't yet upgraded my install to HS4 so I'm not entirely sure if device filtering works radically differently in HS4. Hopefully it doesn't.

    Comment


      #3
      Cool. It would be super nice to have a flag in the config to flip debug on and off. May be define a debug levels.

      I checked everywhere I can't find Powerwall devices. Checked the device types (I think it is "Categories" in HS4) and nothing.

      Comment


        #4
        Can you toggle the plugin off and on, then post the log it records?

        Edit: Also make sure you check your floor/room filters. By default the Powerwall devices do not have either of those values configured.

        Edit 2: My mistake, I forgot how my own logging system worked. Debug logs are meant to be logged on release builds. I'll go ahead and move that particular message to a type that won't be logged on release builds.

        Comment


          #5
          Found the device!!! It was a tricky as it is not in "Unknown" room/floor. The only way to find it is to select all devices and all floor and then search for Tesla.

          It would be fantastic if you could disable the debugging messages in the log. They are generated every second and the log is getting very big. Thanks!

          Comment


            #6
            I will push an update to suppress those messages in a bit, but for now you could manually install this version.

            Comment


              #7
              Hello! I'm hoping to be able to use this plugin. However, on my HomeSeer SEL running HS4, I'm encountering a certificate issue due to the fact that the gateway does not have a valid certificate. Is this something that anybody else is encountering? I'm also running mono 5.20 in case that makes any difference

              homeseer@HomeTrollerSELv6:~$ /usr/bin/mono /usr/local/HomeSeer/HSPI_TeslaPowerwall.exe

              Connecting to HomeSeer...

              Connected to HomeSeer

              Waiting for initialization...




              Unhandled Exception:

              System.MissingMethodException: Method not found: System.Func`5<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificat e2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool> System.Net.Http.HttpClientHandler.get_DangerousAcceptAnyServ erCertificateValidator()

              at HSPI_TeslaPowerwall.HSPI.CheckGatewayConnection () [0x0009b] in <ea2e388fffb74491b81e5c8098fe3b88>:0

              at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.< ThrowAsync>b__6_1 (System.Object state) [0x00000] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.QueueUserWorkItemCallback.WaitCallback_Cont ext (System.Object state) [0x00007] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.QueueUserWorkItemCallback.System.Threading. IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <6649516e5b3542319fb262b421af0adb>:0

              [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: System.Func`5<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificat e2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool> System.Net.Http.HttpClientHandler.get_DangerousAcceptAnyServ erCertificateValidator()

              at HSPI_TeslaPowerwall.HSPI.CheckGatewayConnection () [0x0009b] in <ea2e388fffb74491b81e5c8098fe3b88>:0

              at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.< ThrowAsync>b__6_1 (System.Object state) [0x00000] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.QueueUserWorkItemCallback.WaitCallback_Cont ext (System.Object state) [0x00007] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.QueueUserWorkItemCallback.System.Threading. IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <6649516e5b3542319fb262b421af0adb>:0

              at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <6649516e5b3542319fb262b421af0adb>:0

              Comment


                #8
                You need to update mono.

                Comment


                  #9
                  I was able to get root certs installed and verified that I can establish SSL connections for other sites with valid certificates. However, I'm unable to get anything to work with the specific certificate on my gateway. Even an attempt to use certmgr (certmgr -ssl https://<ip address> to import the certificate doesn't appear to want to work.

                  If possible, can you allow / bypass the certificate validation in the http request?

                  Comment


                    #10
                    Hmmm... there's no mono build for ubuntu 14.01 trusty which is what the hometroller SEL is running on.

                    Comment


                      #11
                      You're not experiencing an untrusted certificate error; the plug-in accepts all certificates it's presented with. The version of mono you're using is missing the functionality to accept untrusted certificates.

                      You may need to build a new version of mono yourself.

                      Comment


                        #12
                        Just to share progress -- it looks like homeseer SEL does not work on mono 6.10. I manually built the version, but Homeseer just references whatever mono is on the path and if it encounters mono 6, it starts to throw a number of exceptions and won't start.

                        If you know of a way to explicitly pass the path to mono for a plugin, I can use that as a way to try it, but otherwise, I will have to find a way to work with mono 5.20 or just not use the plugin.

                        Comment


                          #13
                          Curious. I'm using mono 6.8 and both HS3 and HS4 work fine under it. Not on HomeSeer hardware though.

                          Comment


                            #14
                            I suspect it’s specific to the SEL hardware and I believe I also saw issues related to the HS pi versions.

                            is there any other method of bypassing the certificate check? I think the exception is complaining that the method doesn’t exist — unfortunately I can’t see which frameworks are included in mono 5.20 but perhaps there’s a way to switch .net framework when you build it with relatively minor code changes?

                            I do have an alternate way of potentially running the plugin by writing my own start routine to launch using the mono 6 binary but I’m hoping to get this “natively” supported and am happy to help explore or debug.

                            Comment


                              #15
                              I'm not heavily experienced in .NET, but when I first added certificate validation bypass (to my WebHook Notifications plugin), I wasn't able to find an alternative way of doing it without introducing any additional dll dependencies, which I'd really rather avoid doing.

                              Comment

                              Working...
                              X