Announcement

Collapse
No announcement yet.

Feature request - LAN polling

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

  • Feature request - LAN polling

    Is there any way we could move to LAN based polling? This would enable more rapid polling (instantaneous) updates and eliminate the reliance on Rainforest's cloud servers.

    Here's a link to the API docs from Rainforest: https://rainforestautomation.com/wp-...ST_API-1.0.pdf

    From my experience with other automation software, the "enable security" checkbox needs to be unchecked to allow local access. If there's anything I can do to help, let me know Cheers!

  • #2
    I added LAN polling for legacy Eagle in version 3.0.0.5 of the plugin, available in the Beta section of the updater.

    I don't have a legacy eagle box to test with so some things may not work yet. Please test and post your debug logs if you have any problem.

    In the web portal you need to uncheck the "security box" like explained here: https://github.com/openhab/openhab1-...inforest-EAGLE
    Then from the config page of the plugin choose "Legacy EAGLE - Local" as the device type then enter the local ip of your box and it's mac id (16 alpha numeric characters without 0x at the beginning)

    Let me know how it goes. Thanks!

    Comment


    • #3
      Thanks for the update! Gave it a try, but getting the following error:
      Jan-09 7:19:59 AM RainforestEagle ERROR System.Net.WebException: The remote server returned an error: (417) Expectation Failed. at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x00146] in :0 at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in :0 at System.Net.HttpWebRequest.GetResponse () [0x00016] in :0 at HSPI_RainforestEagle.Eagle100GatewayLocal.SendCommand (System.String command) [0x00084] in <695829b3882b415a876ce3cee15cef13>:0
      Jan-09 7:19:59 AM RainforestEagle DEBUG get_usage_data0xD8D5B9xxxxxx
      Jan-09 7:19:59 AM RainforestEagle DEBUG Sending 'POST' request:

      Let me know if there's any other info you need!

      Comment


      • #4
        Originally posted by baudfather View Post
        Thanks for the update! Gave it a try, but getting the following error:
        Jan-09 7:19:59 AM RainforestEagle ERROR System.Net.WebException: The remote server returned an error: (417) Expectation Failed. at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x00146] in :0 at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in :0 at System.Net.HttpWebRequest.GetResponse () [0x00016] in :0 at HSPI_RainforestEagle.Eagle100GatewayLocal.SendCommand (System.String command) [0x00084] in <695829b3882b415a876ce3cee15cef13>:0
        Jan-09 7:19:59 AM RainforestEagle DEBUG get_usage_data0xD8D5B9xxxxxx
        Jan-09 7:19:59 AM RainforestEagle DEBUG Sending 'POST' request:

        Let me know if there's any other info you need!
        Please test version 3.0.0.6 that I just posted

        Also, enable log to File, and copy paste from the log file (Logs/Rainforesteagle.txt), because HS logs strips out the xml tags

        thanks

        Comment


        • #5
          Okay, error's gone, but the HS device isn't getting updated.

          Jan-09 08:54:38 DEBUG Sending 'POST' request: Jan-09 08:54:38 DEBUG <LocalCommand><Name>get_usage_data</Name><MacId>0xD8D5B9xxxxxx</MacId></LocalCommand> Jan-09 08:54:38 DEBUG Response Code : OK Jan-09 08:54:38 DEBUG {}

          Comment


          • #6
            Originally posted by baudfather View Post
            Okay, error's gone, but the HS device isn't getting updated.

            Jan-09 08:54:38 DEBUG Sending 'POST' request: Jan-09 08:54:38 DEBUG <LocalCommand><Name>get_usage_data</Name><MacId>0xD8D5B9xxxxxx</MacId></LocalCommand> Jan-09 08:54:38 DEBUG Response Code : OK Jan-09 08:54:38 DEBUG {}
            Are you sure the MAC ID is correct? It is supposed to be 16 characters
            Where did you find it?
            Also, please try with lower case for letters

            Comment


            • #7
              Originally posted by spud View Post

              Are you sure the MAC ID is correct? It is supposed to be 16 characters
              Where did you find it?
              Also, please try with lower case for letters
              Maybe this isn't a MAC but a MAC is 48bits, so in hex 12 characters not 16...

              Comment


              • #8
                This is not the ethernet MAC Address, I think this is what is referred as the Smart Meter Mac on the smart meter subpage:

                Click image for larger version

Name:	macid.png
Views:	1
Size:	160.0 KB
ID:	1274273
                If the "Smart Meter MAC" doesn't work, try the "Eagle Zigbee MAC"
                thanks

                Comment


                • #9
                  Originally posted by spud View Post
                  This is not the ethernet MAC Address, I think this is what is referred as the Smart Meter Mac on the smart meter subpage:

                  Click image for larger version

Name:	macid.png
Views:	1
Size:	160.0 KB
ID:	1274273
                  If the "Smart Meter MAC" doesn't work, try the "Eagle Zigbee MAC"
                  thanks
                  Sorry, saw MAC and assumed ethernet (oops!)

                  Comment


                  • #10
                    Okay, now using the Eagle Zigbee MAC, looks to be pulling all the info, but only populating the Instantaneous Demand HS device:

                    Code:
                    Jan-09 11:43:49 ERROR System.Collections.Generic.KeyNotFoundException: The given key 'usage_timestamp' was not present in the dictionary. at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <69599a71bc4d4cd3a8a6e4323fa57b86>:0 at HSPI_RainforestEagle.Eagle100GatewayLocal.PollUsageData () [0x00068] in <eec508a36f6645a993a9db8e6bc4ade0>:0 at HSPI_RainforestEagle.Eagle100GatewayLocal.Poll () [0x0001a] in <eec508a36f6645a993a9db8e6bc4ade0>:0 at HSPI_RainforestEagle.RainforestEagleApp.OnPollTimerEvent (System.Object sender, System.Timers.ElapsedEventArgs e) [0x00000] in <eec508a36f6645a993a9db8e6bc4ade0>:0 Jan-09 11:44:04 DEBUG Sending 'POST' request: Jan-09 11:44:04 DEBUG <LocalCommand><Name>get_usage_data</Name><MacId>0xd8d5bxxxxxxxxxx</MacId></LocalCommand> Jan-09 11:44:05 DEBUG Response Code : OK Jan-09 11:44:05 DEBUG {"meter_status":"Connected", "demand":"1.7250", "demand_units":"kW", "demand_timestamp":"1547034240", "summation_received":"0.000", "summation_delivered":"99157.220", "summation_units":"kWh", "price":"0.1326", "price_units":"124", "price_label":"Block 2", "message_timestamp":"946684800", "message_confirmed":"N", "message_confirm_required":"N", "message_id":"0", "message_queue":"active", "message_read":"Y", "threshold_upper_demand":"18.260000", "threshold_lower_demand":"-2.000000", "fast_poll_frequency":"0x30", "fast_poll_endtime":"0x00000000"}
                    Edit: any way to paste the log without losing the formatting?

                    Comment


                    • #11
                      NVM, switched editor. Here's the log text (bit easier to read):

                      Jan-09 12:14:43 DEBUG Sending 'POST' request:
                      Jan-09 12:14:43 DEBUG <LocalCommand><Name>get_usage_data</Name><MacId>0xd8d5bxxxxxxxxxx</MacId></LocalCommand>
                      Jan-09 12:14:43 DEBUG Response Code : OK
                      Jan-09 12:14:44 DEBUG {"meter_status":"Connected",
                      "demand":"1.5080",
                      "demand_units":"kW",
                      "demand_timestamp":"1547036080",
                      "summation_received":"0.000",
                      "summation_delivered":"99157.979",
                      "summation_units":"kWh",
                      "price":"0.1326",
                      "price_units":"124",
                      "price_label":"Block 2",
                      "message_timestamp":"946684800",
                      "message_confirmed":"N",
                      "message_confirm_required":"N",
                      "message_id":"0",
                      "message_queue":"active",
                      "message_read":"Y",
                      "threshold_upper_demand":"18.260000",
                      "threshold_lower_demand":"-2.000000",
                      "fast_poll_frequency":"0x30",
                      "fast_poll_endtime":"0x00000000"}

                      Jan-09 12:14:44 ERROR System.Collections.Generic.KeyNotFoundException: The given key 'usage_timestamp' was not present in the dictionary.
                      at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <69599a71bc4d4cd3a8a6e4323fa57b86>:0
                      at HSPI_RainforestEagle.Eagle100GatewayLocal.PollUsageData () [0x00068] in <eec508a36f6645a993a9db8e6bc4ade0>:0
                      at HSPI_RainforestEagle.Eagle100GatewayLocal.Poll () [0x0001a] in <eec508a36f6645a993a9db8e6bc4ade0>:0
                      at HSPI_RainforestEagle.RainforestEagleApp.OnPollTimerEvent (System.Object sender, System.Timers.ElapsedEventArgs e) [0x00000] in <eec508a36f6645a993a9db8e6bc4ade0>:0

                      Comment


                      • #12
                        Please try version 3.0.0.7, it should fix the error and populate all the devices.

                        Can you confirm that the "Smart Meter MAC" didn't work, i.e it only works with "Eagle Zigbee MAC"?
                        thanks

                        Comment


                        • #13
                          Awsome! Errors are gone, and Demand and Price/kWh are working, just not the to/from grid items. Let me know if I you need anything else.

                          Cheers!

                          Comment


                          • #14
                            Oh, also double checked and yes, needs to be Eagle Zigbee MAC (Smart Meter MAC throws error).

                            Comment


                            • #15
                              Cancel that, looks like it just took a while - from grid is updating now!

                              Edit - just needed a reboot to get Eagle to show up in Energy DB.

                              Cheers spud ! Love having ability of instant polling Now just to figure out who keeps leaving the non smart lights on

                              Comment

                              Working...
                              X