www.homeseer.com    
 

Go Back   HomeSeer Message Board > 3rd Party Plug-Ins/Scripts > Plug-ins by Author > Click Here for List of Author Forums > CFGuy Plug-Ins/Scripts > WeatherXML

WeatherXML Discussion area for WeatherXML

Reply
 
Thread Tools Display Modes
  #21  
Old September 5th, 2016, 12:05 PM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
Quote:
Originally Posted by rprade View Post
I am not seeing any devices under PHLocation setup. I only use iOS support for my devices. All three only offer "Please Select".

Jeff, Here are the devices that Paul creates for iOS. I thought they were the same type for all Apps.

Attachment 56401
I see what I did. I grabbed all the devices that have "PHLocation" in the devices location 1. I just reused the code from the previous versions.

Give me a few minutes and I will change the code to look at the device interface instead.
__________________
--
Jeff Farmer
HS 3.0.0.312, HSPhone
My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
Other Plugins In Use: APCUPSD, EasyTrigger, FBitSeer, HSTouch Server, Kinect, PHLocation, 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, Panasonic BDT-110, Panasonic BDT-210 x2
Reply With Quote
  #22  
Old September 5th, 2016, 12:11 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 6,954
Quote:
Originally Posted by CFGuy View Post
I see what I did. I grabbed all the devices that have "PHLocation" in the devices location 1. I just reused the code from the previous versions.

Give me a few minutes and I will change the code to look at the device interface instead.
Thanks. I change locations on almost every device, so the default locations are almost always gone.
__________________
Randy Prade
Aurora, CO
Prades.net

PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino
Reply With Quote
  #23  
Old September 5th, 2016, 12:34 PM
sparkman's Avatar
sparkman sparkman is offline
OverSeer
 
Join Date: Oct 2001
Location: Calgary, Alberta, Canada
Posts: 6,001
Quote:
Originally Posted by CFGuy View Post
I see what I did. I grabbed all the devices that have "PHLocation" in the devices location 1. I just reused the code from the previous versions.

Give me a few minutes and I will change the code to look at the device interface instead.
Thanks Jeff, that fixed it.

Cheers
Al
__________________
HS3Pro 3.0.0.318 on Jetway JBC501F9Q-Q87-B i7 8GB 1874 Devices, 955 Events, 28 Plugins
Z-Wave 3.0.1.131 Z-Net 105 nodes:Leviton Vizia,Kwikset,FortrezZ Valve/Sensors,Everspring Sensors/Modules/Outlets,CT30 Stats,MIMOLites,Aeotec Smart Switches
RFXCom W800,RFXrec433,RFXtrx433|APCUPSD|Pushover|Squeezebox|weatherXML|HS Phone W2C|APCUPSD|UltraLog
UltraGCIR GC-100|UltraNetcam|UltraPioneer|Ultra1Wire|DSC PC1832|BLLED|BLTVGuide|ImperiHome|jon00 Utilities|MySensors

PHLocation|X10 CM11A IOLinc,etc
Reply With Quote
  #24  
Old September 5th, 2016, 12:36 PM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
Mine are hit or miss. Most I have changed the locations.

I just never got around to doing so with PHLocation. I did today so I could test my change and will leave it changed.

wXML .53 is in the updater now and uses the plugin interface.
Reply With Quote
  #25  
Old September 5th, 2016, 12:47 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 6,954
Quote:
Originally Posted by CFGuy View Post
Mine are hit or miss. Most I have changed the locations.

I just never got around to doing so with PHLocation. I did today so I could test my change and will leave it changed.

wXML .53 is in the updater now and uses the plugin interface.
Fixed here as well. Time to play
Reply With Quote
  #26  
Old September 11th, 2017, 04:00 AM
slbuck's Avatar
slbuck slbuck is offline
Seer Deluxe
 
Join Date: Jun 2015
Location: Texas
Posts: 170
Lat/Lon rounded

Is anyone else seeing the Latitude and Longitude values being rounded to a whole number when configuring a location to use PHLocation?

Under the Weather Underground Setup section, I have the Station ID configured to use Lat/Lon. The problem is that the values for Lat and Lon are being rounded to a whole number instead of using the full values from the PHLocation Latitude and Longitude Devices. (i.e. the lat and lon are showing up as 33 and -90 when the phlocation lat and lon are 32.87983723 and -89.78358339).
Reply With Quote
  #27  
Old February 14th, 2018, 01:26 AM
slbuck's Avatar
slbuck slbuck is offline
Seer Deluxe
 
Join Date: Jun 2015
Location: Texas
Posts: 170
Quote:
Originally Posted by slbuck View Post
Is anyone else seeing the Latitude and Longitude values being rounded to a whole number when configuring a location to use PHLocation?

Under the Weather Underground Setup section, I have the Station ID configured to use Lat/Lon. The problem is that the values for Lat and Lon are being rounded to a whole number instead of using the full values from the PHLocation Latitude and Longitude Devices. (i.e. the lat and lon are showing up as 33 and -90 when the phlocation lat and lon are 32.87983723 and -89.78358339).
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
Attached Images
 
Reply With Quote
  #28  
Old February 15th, 2018, 09:48 PM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
Set the logging level to Debug. Then run the Current Conditions schedule.
Check the log for the weatherXML entries dealing with PHLocation.
Reply With Quote
  #29  
Old February 15th, 2018, 11:08 PM
slbuck's Avatar
slbuck slbuck is offline
Seer Deluxe
 
Join Date: Jun 2015
Location: Texas
Posts: 170
Quote:
Originally Posted by CFGuy View Post
Set the logging level to Debug. Then run the Current Conditions schedule.
Check the log for the weatherXML entries dealing with PHLocation.
Here are the log entries related to PHLocation. I've attached a screenshot with the most relevant values for device 1475 and 1476. These are coordinates with 8 decimal places, but are being rounded to whole numbers for some reason.


Feb-15 20:45:21 weatherXML The phlocation Longitude is -96
Feb-15 20:45:21 weatherXML The phlocation Latitude is 30
Feb-15 20:45:21 weatherXML The phlocation Longitude refID is 1476
Feb-15 20:45:21 weatherXML The phlocation Latitude device refID is 1475
Attached Images
 
Reply With Quote
  #30  
Old February 17th, 2018, 07:35 PM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
What version of weatherxml are you running?

There should have been more log entries in the newest version then the 4 you posted?
Reply With Quote
  #31  
Old February 17th, 2018, 08:02 PM
bebaldin bebaldin is offline
Seer Deluxe
 
Join Date: Mar 2016
Location: Illinois
Posts: 477
Quote:
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.
Reply With Quote
  #32  
Old February 17th, 2018, 08:54 PM
slbuck's Avatar
slbuck slbuck is offline
Seer Deluxe
 
Join Date: Jun 2015
Location: Texas
Posts: 170
Quote:
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
Reply With Quote
  #33  
Old February 18th, 2018, 12:23 AM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
I added some more log entries and put .81 in the beta release.
Please run it and post the log entries dealing with PHLocation.
Reply With Quote
  #34  
Old February 18th, 2018, 02:21 AM
slbuck's Avatar
slbuck slbuck is offline
Seer Deluxe
 
Join Date: Jun 2015
Location: Texas
Posts: 170
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
Reply With Quote
  #35  
Old February 18th, 2018, 01:43 PM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
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.
Reply With Quote
  #36  
Old February 18th, 2018, 04:38 PM
slbuck's Avatar
slbuck slbuck is offline
Seer Deluxe
 
Join Date: Jun 2015
Location: Texas
Posts: 170
Quote:
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
Reply With Quote
  #37  
Old February 18th, 2018, 05:29 PM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
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.
Reply With Quote
  #38  
Old February 18th, 2018, 09:19 PM
slbuck's Avatar
slbuck slbuck is offline
Seer Deluxe
 
Join Date: Jun 2015
Location: Texas
Posts: 170
Quote:
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
Reply With Quote
  #39  
Old February 18th, 2018, 10:25 PM
CFGuy's Avatar
CFGuy CFGuy is offline
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
Awesome. Thanks for letting me know.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WeatherXML CFGuy WeatherXML 444 February 3rd, 2015 08:18 PM
weatherXML FAQ CFGuy WeatherXML 0 October 4th, 2012 09:44 AM
Need Help w/ WeatherXML JohnBullard WeatherXML 4 October 29th, 2005 06:38 PM
WeatherXML Help jguest Script & Plug-In Library Discussion 0 July 6th, 2005 11:46 AM


All times are GMT -4. The time now is 01:47 AM.


Copyright HomeSeer Technologies, LLC