Announcement

Collapse
No announcement yet.

How To: weatherXML and PHLocation

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

  • #31
    Originally posted by slbuck View Post
    I'm running the latest beta and still seeing this issue. Is there a setting somewhere that is rounding the lat/lon coming from phlocation?

    Current Date/Time: 2/13/2018 11:20:07 PM
    HomeSeer Version: HS3 Pro Edition 3.0.0.368
    Operating System: Microsoft Windows 10 Pro - Work Station
    System Uptime: 25 Days 11 Hours 6 Minutes 8 Seconds
    IP Address: 192.168.22.11
    Number of Devices: 597
    Number of Events: 512
    Available Threads: 400

    Enabled Plug-Ins
    3.0.0.43: EasyTrigger
    3.0.0.29: EnvisaLinkAdemco
    1.1.12.0: Honeywell WiFi Thermostat
    3.0.0.6: HSZigBee
    3.0.0.14: NetCAM
    2.1.6.0: OpenSprinkler
    3.0.1.114: PHLocation
    3.1.0.22: Sonos
    3.0.6601.28887: UltraLighting3
    3.0.0.80: weatherXML
    3.0.1.193: Z-Wave
    I have this same issue as well.

    Comment


    • #32
      Originally posted by CFGuy View Post
      What version of weatherxml are you running?

      There should have been more log entries in the newest version then the 4 you posted?
      3.0.0.80

      Sent from my LG-H932 using Tapatalk

      Comment


      • #33
        I added some more log entries and put .81 in the beta release.
        Please run it and post the log entries dealing with PHLocation.
        --
        Jeff Farmer
        HS 3, HSPhone
        My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
        Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

        Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

        Comment


        • #34
          Here's the log from when I initiated the current conditions update. There is no value in the string field for the two ph devices for lat and lon. The device value shows the full lat/lon to 8 decimal places.

          Reference ID 1475
          Technology Address PHLCLA[1475]BK
          Status 29.7xxxxxxx = Dim
          Value 29.7xxxxxxx = "29.7xxxxxxx"
          String

          Reference ID 1476
          Technology Address PHLCLO[1476]BK
          Status -95.8xxxxxxx = Unknown
          Value -95.8xxxxxxx = "-95.8xxxxxxx"
          String

          Feb-18 00:10:14 weatherXML Download Status: Success
          Feb-18 00:10:13 weatherXML Downloading the WU Condition file at http://api.wunderground.com/api/API/...N/q/30,-96.xml.
          Feb-18 00:10:13 weatherXML Replacement URL: http://api.wunderground.com/api/API/...N/q/30,-96.xml
          Feb-18 00:10:13 weatherXML Downloading file now.
          Feb-18 00:10:13 weatherXML Weather Underground Download per minute for WU Condition = 0
          Feb-18 00:10:13 weatherXML Download WU Condition: 5
          Feb-18 00:10:13 weatherXML Data from Lat/Long
          Feb-18 00:10:13 weatherXML Download and Import
          Feb-18 00:10:13 weatherXML Reset Hi Low
          Feb-18 00:10:13 weatherXML The phlocation Longitude is -96
          Feb-18 00:10:13 weatherXML Using PH Longitude device value instead: -96
          Feb-18 00:10:13 weatherXML The PH Longitude device string is
          Feb-18 00:10:13 weatherXML The phlocation Latitude is 30
          Feb-18 00:10:13 weatherXML Using PH Latitude device value instead: 30
          Feb-18 00:10:13 weatherXML The PH Latitude device string is
          Feb-18 00:10:13 weatherXML The parsed value is 1475
          Feb-18 00:10:13 weatherXML The current culture is en-US
          Feb-18 00:10:13 weatherXML The phlocation Longitude refID is 1476
          Feb-18 00:10:13 weatherXML The phlocation Latitude device refID is 1475
          Feb-18 00:10:13 weatherXML wXMLCurrent: Running current location 2

          Comment


          • #35
            After some research I found that the hs command DeviceValue returns an integer. I thought that had been changed when devices were changed to allow a number with decimal places.
            There is a new command DeviceValueEx but it returns an integer as well. I can't find any hs command to get a devices value with decimal places.

            It looks like the only way to get the decimal places is from the device string.
            I use Backitude and egiGeoZone. PHLocation is setting the device string on my Lat and Lon backitude devices. You might check to see if there is a setting for PHLocation to have it set the device string as well as the value.
            --
            Jeff Farmer
            HS 3, HSPhone
            My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
            Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

            Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

            Comment


            • #36
              Originally posted by CFGuy View Post
              After some research I found that the hs command DeviceValue returns an integer. I thought that had been changed when devices were changed to allow a number with decimal places.
              There is a new command DeviceValueEx but it returns an integer as well. I can't find any hs command to get a devices value with decimal places.

              It looks like the only way to get the decimal places is from the device string.
              I use Backitude and egiGeoZone. PHLocation is setting the device string on my Lat and Lon backitude devices. You might check to see if there is a setting for PHLocation to have it set the device string as well as the value.
              Jeff,

              I wrote a quick script that gets the device value of the phlocation items and here's what I found:

              If the hs.DeviceValue or hs.DeviceValueEx is used and the variable is Dim as an integer, then the returned value is always an integer. When I Dim the variable as a double and use hs.DeviceValue I get an integer, however, if I use hs.DeviceValueEx, then get the full decimal.

              Code:
                  Public Sub Main(ByVal DvRef As String)
                      Try
                          Dim DvValInt As Integer = 0
                          Dim DvValDec As Double = 0
              
                          DvValInt = hs.DeviceValue(DvRef)  'Get the Integer Value
                          hs.WriteLog("Test", "Using DvValInt to get Device " & DvRef & " Value as Integer" & DvValInt)
                          DvValInt = hs.DeviceValueEx(DvRef)  'Get the Decimal Value
                          hs.WriteLog("Test", "Using DvValInt to get Device " & DvRef & " Value as Decimal " & DvValInt)
                          DvValDec = hs.DeviceValue(DvRef)  'Get the Integer Value
                          hs.WriteLog("Test", "Using DvValDec to get Device " & DvRef & " Value as Integer" & DvValDec)
                          DvValDec = hs.DeviceValueEx(DvRef)  'Get the Decimal Value
                          hs.WriteLog("Test", "Using DvValDec to get Device " & DvRef & " Value as Decimal " & DvValDec)
              
                      Catch ex As Exception
                          hs.WriteLog("Error", "Exception in script Test:  " & ex.Message)
                      End Try
                  End Sub
              Feb-18 14:37:19 Test Using DvValDec to get Device 1475 Value as Decimal 29.7xxxxxxx
              Feb-18 14:37:19 Test Using DvValDec to get Device 1475 Value as Integer30
              Feb-18 14:37:19 Test Using DvValInt to get Device 1475 Value as Decimal 30
              Feb-18 14:37:19 Test Using DvValInt to get Device 1475 Value as Integer30
              Feb-18 14:37:19 Event Running script in background: D:/Program Files (x86)/HomeSeer HS3/scripts/Test.vb
              Feb-18 14:32:15 Test Using DvValDec to get Device 1476 Value as Decimal -95.8xxxxxxx
              Feb-18 14:32:15 Test Using DvValDec to get Device 1476 Value as Integer-96
              Feb-18 14:32:15 Test Using DvValInt to get Device 1476 Value as Decimal -96
              Feb-18 14:32:15 Test Using DvValInt to get Device 1476 Value as Integer-96
              Feb-18 14:32:14 Event Running script in background: D:/Program Files (x86)/HomeSeer HS3/scripts/Test.vb

              Comment


              • #37
                Very good. I didn't actually test it. I went by the HS script docs.
                I'll change weatherXML to use it and post a new version today.
                --
                Jeff Farmer
                HS 3, HSPhone
                My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                Comment


                • #38
                  Originally posted by CFGuy View Post
                  Very good. I didn't actually test it. I went by the HS script docs.
                  I'll change weatherXML to use it and post a new version today.
                  As usual, thanks for the quick turnaround with the fix. I'm happy to report that the lat/log comes across with no problem now using version 3.0.0.82.

                  Sent from my LG-H932 using Tapatalk

                  Comment


                  • #39
                    Awesome. Thanks for letting me know.
                    --
                    Jeff Farmer
                    HS 3, HSPhone
                    My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                    Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                    Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                    Comment


                    • #40
                      Hi Jeff,

                      A new release of the PHLocation was just published and runs as a new plugin, not an update to the previous one. Will WeatherXML be updated to allow integration with it? Details on the new one are here: https://forums.homeseer.com/forum/te...-v2-discussion

                      Thanks
                      Al
                      HS 3.0.0.548: 1965 Devices 1146 Events
                      Z-Wave 3.0.1.262: 122 Nodes on one Z-Net

                      Comment


                      • #41
                        Not sure when I will have time to switch over to the new version.
                        Does the new version still use devices for Latitude, Longitude and Location City?
                        If so, it will be easy to add code to check for the new version and use the new values without breaking things for those they may not upgrade right away.
                        --
                        Jeff Farmer
                        HS 3, HSPhone
                        My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                        Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                        Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                        Comment


                        • #42
                          Originally posted by CFGuy View Post
                          Not sure when I will have time to switch over to the new version.
                          Does the new version still use devices for Latitude, Longitude and Location City?
                          If so, it will be easy to add code to check for the new version and use the new values without breaking things for those they may not upgrade right away.
                          The new version still creates the same HS devices for lat, long and city. There are different device names, but contain the same data.

                          Click image for larger version

Name:	0BD965B8-FB39-4DB3-8DFE-A3AF2184B15E.jpeg
Views:	2
Size:	79.1 KB
ID:	1275586
                          Randy Prade
                          Aurora, CO
                          Prades.net

                          PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                          Comment


                          • #43
                            EDIT: I forgot to include the advanced tab for Current Town

                            Here is the latitude advanced tab of the device. Maybe you could filter based upon the interface and device string? The PHlocation 1 plugin just shows an interface of "PHLocation" and device string of PHLC Latitude

                            Click image for larger version  Name:	phlocation2-user-latitude.PNG Views:	1 Size:	44.0 KB ID:	1275932

                            Here is the longitude advanced tab of the device string. The PHlocation 1 plugin just shows an interface of " PHLocation " and device string of PHLC Longitude


                            Click image for larger version  Name:	phlocation2-user-longitude.PNG Views:	1 Size:	43.9 KB ID:	1275933

                            Here is the current town advanced tab of the device string. The PHlocation 1 plugin just shows an interface of "PHLocation" and device string of PHLC Town

                            Click image for larger version

Name:	phlocation2-user-current town.PNG
Views:	2
Size:	58.7 KB
ID:	1275976

                            Comment


                            • #44
                              I just needed the interface name. That lets me make a dropdown of all of the devices and the user selects the correct ones for Lat, Lon and City.
                              --
                              Jeff Farmer
                              HS 3, HSPhone
                              My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                              Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                              Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                              Comment


                              • #45
                                Originally posted by CFGuy View Post
                                I just needed the interface name. That lets me make a dropdown of all of the devices and the user selects the correct ones for Lat, Lon and City.
                                It’s PHLocation2 instead of PHLocation
                                HS 3.0.0.548: 1965 Devices 1146 Events
                                Z-Wave 3.0.1.262: 122 Nodes on one Z-Net

                                Comment

                                Working...
                                X