Community Support

Weather Station displaying incorrect outdoor temperature value from Ambient Weather API  

  RSS
kdsteele
(@kdsteele)
New Member

Thanks, Pierre, for creating and sharing this plugin. I'm looking forward to using it to share my weather data with neighbors.

I have an Ambient Weather WS-1550-IP that sends weather data wirelessly (915Mhz) to a WS-2000 tablet style console and an Observer IP. The Observer IP connects to my wired network and transmits data to Ambient Weather's website. I also have four WH31 8-channel thermo-hygrometers, two of which are in my attic.

The outdoor temperature on the WS-2000, Observer IP and Ambient Weather's website all agree. However when using the Ambient Weather API to retrieve data for Weather Station and display on a website using a shortcode, the temperature is off by a large margin. I have noticed the temperature in Weather Station exactly matches the temperature of the WH31 located in my attic.

I would appreciate it if you could assist me in troubleshooting this issue. I believe I have narrowed down the source of the issue. I enabled debugging and checked the API event and found the following data posted below.

Notice the value of tempf is 87.1. This is the correct outdoor temperature. The shortcode I'm using to gather the outdoor temperature is:

live-weather-station-justgage device_id='00:0e:c6:00:12:34' module_id='m1:c0:00:00:00:01' measure_type='temperature' design='half-flat-fat' color='lgt-solidblue' force='ttl:#606060-lbl:#606060' pointer='none' title='type-unit' subtitle='none' unit='none' size='large'

However, it returns the value of tempf4 114.08. How can I get the shortcode to return the value of tempf?

Array
(
[0] => Array
(
[macAddress] => 00:0E:C6:00:12:34
[lastData] => Array
(
[dateutc] => 1566426420000
[winddir] => 173
[windspeedmph] => 0
[windgustmph] => 0
[maxdailygust] => 10.29
[tempf] => 87.1
[battout] => 1
[humidity] => 69
[hourlyrainin] => 0
[eventrainin] => 0
[dailyrainin] => 0.01
[weeklyrainin] => 0.44
[monthlyrainin] => 2.71
[yearlyrainin] => 23.9
[totalrainin] => 23.9
[tempinf] => 79.2
[battin] => 1
[humidityin] => 50
[baromrelin] => 29.88
[baromabsin] => 29.53
[uv] => 2
[solarradiation] => 275.86
[temp1f] => 88.7
[humidity1] => 67
[batt1] => 1
[temp2f] => 100.76
[humidity2] => 53
[batt2] => 1
[temp3f] => 111.92
[humidity3] => 29
[batt3] => 1
[temp4f] => 114.08
[humidity4] => 27
[batt4] => 1
[feelsLike] => 97.34
[dewPoint] => 75.66
[feelsLike1] => 100.4
[dewPoint1] => 76.3
[feelsLike2] => 123.8
[dewPoint2] => 80.4
[feelsLike3] => 125.5
[dewPoint3] => 72.1
[feelsLike4] => 127.8
[dewPoint4] => 71.8
[feelsLikein] => 79.2
[dewPointin] => 58.9
[lastRain] => 2019-08-21T13:04:00.000Z
[tz] => America/New_York
[date] => 2019-08-21T22:27:00.000Z
)

[info] => Array
(
[name] => removed
[location] => removed
[coords] => Array
(
[coords] => Array
(
[lat] => removed
[lon] => -removed
)

[address] => removed
[location] => removed
[elevation] => removed
)

)

)

)

This topic was modified 3 years ago 3 times by kdsteele
Quote
Posted : 22/08/2019 1:10 am
Topic Tags
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello @kdsteele and sorry for this late answer - I've just coming back from vacations 🙂

And you're right, there's a bug in the Ambient collector, when you have additional modules (and that's your case). This bug will be fixed in the next release of Weather Station.

If you want a quick and dirty workaround in the meantime, I suggest you to comment out the line 253 in the file wp-content/plugins/live-weather-station/includes/traits/AmbientPluginBaseClient.php:

the line

$dat['temperature'] = $this->get_reverse_temperature($data['temp' . $i . 'f'], 1);

must be changed in

// $dat['temperature'] = $this->get_reverse_temperature($data['temp' . $i . 'f'], 1);

Thanks for the hint 😉

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 26/08/2019 3:23 pm
kdsteele
(@kdsteele)
New Member

Thanks for your response.  I look forward to the next release!  Will this also enable you to expose data from all the additional modules?

While trying to implement the work-around - I discovered I also have a scheduler problem.  Will start a new thread about that. 

 

ReplyQuote
Posted : 27/08/2019 1:57 am
Chris Mathieson
(@chris)
New Member

@pierre-lannoy

I was just looking for the solution to this problem as well, so this is a good work-around, thank you. And thank you for this incredible labour of love!

ReplyQuote
Posted : 21/06/2020 3:54 am
gweeds30
(@gweeds30)
New Member

Hi, i see this is an old thread, but i am having the same issue.  I have tried to update the weather station plugin but it is still displaying about a 20 degree difference. the station is an Ambient Weather WS-2902c pws. I have ensured the API key from Ambient is correct. all of the other data seems correct, Weather Station plugin is showing 67.6F when it is currently 79.7F out. This was showing correctly with my previous weather station, Ambient WS-900ip.

ReplyQuote
Posted : 27/07/2021 4:57 am
pdyke
(@pdyke)
New Member

@gweeds30

I have just had the same issue with an WS-5000 plus two WH-31E outdoor sensors - WS was picking up the highest number channel and displaying that as the Outdoor/Temperature reading.

I have WS 3.8 but it is not fixed natively; however the hack suggested seems to be working.

ReplyQuote
Posted : 26/01/2022 9:10 pm

To participate, please connect first!