Weather Underground Upload script

remember
Posts: 15
Joined: Tuesday 27 February 2018 2:16
Target OS: Windows
Domoticz version:
Contact:

Re: Weather Underground Upload script

Post by remember » Saturday 10 March 2018 15:45

Good afternoon, it seems to have returned to normal ... I did not know what happened ...

wanted to take another question, is there any way to run this Lua script on Android?

remember
Posts: 15
Joined: Tuesday 27 February 2018 2:16
Target OS: Windows
Domoticz version:
Contact:

Re: Weather Underground Upload script

Post by remember » Wednesday 11 April 2018 17:34

Toulon7559 this code ready to work as a rain gauge?

mayyam
Posts: 50
Joined: Saturday 14 January 2017 12:29
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Poland
Contact:

Re: Weather Underground Upload script

Post by mayyam » Sunday 15 April 2018 10:18

I'm also getting"

Code: Select all

2018-04-15 10:14:00.384 Error: EventSystem: in /home/may/domoticz/scripts/lua/script_time_wu.lua: /home/may/domoticz/scripts/lua/script_time_wu.lua:21: attempt to perform arithmetic on local 'C' (a nil value)
My Outside_Temp_Hum is:

Code: Select all

-- Weatherunderground PWS upload script
-- (C)2013 GizMoCuz - upgraded with pressure by epierre

Outside_Temp_Hum = 'KUCHNIA_out2_temp'
Sensor is getting data every 25sec, and looks like that on the Device page:
159 RFLink433 5308 0 KUCHNIA_out2_temp Temp + Humidity WTGR800 16.7 C, 58 %

I've already tried to re add lines to be sure i don't have strange characters in them. Also tried to put "--" in front of

Code: Select all

WU_URL = WU_URL .. "&tempf=" .. string.format("%3.1f", CelciusToFarenheit(otherdevices_temperature[Outside_Temp_Hum]))
and

Code: Select all

WU_URL = WU_URL .. "&dewptf=" .. string.format("%3.1f", CelciusToFarenheit(otherdevices_dewpoint[Outside_Temp_Hum]))
The error always shows line 21:

Code: Select all

return (C * (9/5)) + 32
_______________
- Raspberry Pi 3
- RFLink 433Mhz / NRF 2.4GHz
- 2x Xiaomi Gateway
- different species of ESP8266

remember
Posts: 15
Joined: Tuesday 27 February 2018 2:16
Target OS: Windows
Domoticz version:
Contact:

Re: Weather Underground Upload script

Post by remember » Monday 02 July 2018 19:34

Hello everyone, I have a netatmo station that uses domoticz to send the data, in the portal of the station I get data every 5 minutes, what should be the ideal update time? At the moment I have the domoticz to send data every 5 minutes to the WU, but I noticed that I miss some readings or repeat themselves.

Thank you for your help

remember
Posts: 15
Joined: Tuesday 27 February 2018 2:16
Target OS: Windows
Domoticz version:
Contact:

Re: Weather Underground Upload script

Post by remember » Friday 06 July 2018 13:57

Hello everyone,

I hope that they can help me, I have noticed that the data is repeated, as I had explained previously, I have a netatmo that updates every 5 minutes in the portal of the brand and so I have the sript to update every 5 minutes.

I have noticed these mistakes!

What could it be?

Code: Select all

2018-07-06 12:22:00.255 Error: EventSystem: in Pws: [string "-- Weatherunderground PWS upload script ..."]:54: attempt to concatenate global 'WU_URL' (a nil value) 
2018-07-06 12:22:00.789 Error: Netatmo hardware (2) nothing received for more than 5 Minutes!.... 
2018-07-06 12:22:01.798 Error: Restarting: Netatmo 

Toulon7559
Posts: 465
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Weather Underground Upload script

Post by Toulon7559 » Tuesday 10 July 2018 21:40

@remember

A late response to your question of april 2018:
this script can handle rain gauge.
Line 08 to be set according to your configuration:
you have to insert the compatible identifier-link.

Code: Select all

Rainmeter = '<your rain-gauge-name>'
Check that your rain-gauge separately reports rain and rain_lasthour,
because otherwise you get an error at the following scriptlines further down in the script

Code: Select all

if RainMeter ~= '' then
   WU_URL = WU_URL .. "&dailyrainin=" .. string.format("%2.2f", mmtoInches(otherdevices_rain[RainMeter]))
   WU_URL = WU_URL .. "&rainin=" .. string.format("%2.2f", mmtoInches(otherdevices_rain_lasthour[RainMeter]))
end
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

remember
Posts: 15
Joined: Tuesday 27 February 2018 2:16
Target OS: Windows
Domoticz version:
Contact:

Re: Weather Underground Upload script

Post by remember » Wednesday 11 July 2018 9:32

Toulon7559 wrote:
Tuesday 10 July 2018 21:40
@remember

A late response to your question of april 2018:
this script can handle rain gauge.
Line 08 to be set according to your configuration:
you have to insert the compatible identifier-link.

Code: Select all

Rainmeter = '<your rain-gauge-name>'
Check that your rain-gauge separately reports rain and rain_lasthour,
because otherwise you get an error at the following scriptlines further down in the script

Code: Select all

if RainMeter ~= '' then
   WU_URL = WU_URL .. "&dailyrainin=" .. string.format("%2.2f", mmtoInches(otherdevices_rain[RainMeter]))
   WU_URL = WU_URL .. "&rainin=" .. string.format("%2.2f", mmtoInches(otherdevices_rain_lasthour[RainMeter]))
end
Good morning, thank you very much for the answer in terms of the "rainmeter" seems to be working very well! :)

remember
Posts: 15
Joined: Tuesday 27 February 2018 2:16
Target OS: Windows
Domoticz version:
Contact:

Re: Weather Underground Upload script

Post by remember » Monday 06 August 2018 13:05

Well, another thing that I have checked and I can not identify the problem is the WU receive wrong data from wind and speed directions, why will it happen? My station is a netatmo.

Toulon7559
Posts: 465
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Weather Underground Upload script

Post by Toulon7559 » Monday 06 August 2018 21:13

@remember

What is wrong with the wind-info?

The following piece of code prepares the winddata for upload to WUnderground.

Code: Select all

if WindMeter ~= '' then
   WU_URL = WU_URL .. "&winddir=" .. string.format("%.0f", otherdevices_winddir[WindMeter])
   WU_URL = WU_URL .. "&windspeedmph=" .. string.format("%.0f", (otherdevices_windspeed[WindMeter]/0.1)*0.223693629205)
   WU_URL = WU_URL .. "&windgustmph=" .. string.format("%.0f", (otherdevices_windgust[WindMeter]/0.1)*0.223693629205)
end
Wind direction should not be a problem (because straightforward extraction of the string from the Netatmo information), but the requirement of WUnderground to have windspeed and windgust in mph-value might be a trap.
For correct operation of that piece of code the Netatmo PWS should provide metric info, to be multiplied as shown.
If the Netatmo PWS is set to provide other type of info, you may have a puzzle to solve ........
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

remember
Posts: 15
Joined: Tuesday 27 February 2018 2:16
Target OS: Windows
Domoticz version:
Contact:

Re: Weather Underground Upload script

Post by remember » Wednesday 22 August 2018 9:57

Toulon7559 wrote:
Monday 06 August 2018 21:13
@remember

What is wrong with the wind-info?

The following piece of code prepares the winddata for upload to WUnderground.

Code: Select all

if WindMeter ~= '' then
   WU_URL = WU_URL .. "&winddir=" .. string.format("%.0f", otherdevices_winddir[WindMeter])
   WU_URL = WU_URL .. "&windspeedmph=" .. string.format("%.0f", (otherdevices_windspeed[WindMeter]/0.1)*0.223693629205)
   WU_URL = WU_URL .. "&windgustmph=" .. string.format("%.0f", (otherdevices_windgust[WindMeter]/0.1)*0.223693629205)
end
Wind direction should not be a problem (because straightforward extraction of the string from the Netatmo information), but the requirement of WUnderground to have windspeed and windgust in mph-value might be a trap.
For correct operation of that piece of code the Netatmo PWS should provide metric info, to be multiplied as shown.
If the Netatmo PWS is set to provide other type of info, you may have a puzzle to solve ........
Good Morning

I am currently using meteoware and I really notice the difference, wrong / repeated data in wind, pressure, wind direction and maybe in temperature as well.

The domoticz interval was 5 minutes, which is the update time on my netatmo portal, from which I was able to identify the data that is well received in Domoticz, the problem may be in the script that repeats data and I can not identify why.

Some data are perfectly noted that are repeated (namely the temperature and pressure), others wrong, such as change of wind direction, speed etc.

Toulon7559
Posts: 465
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Weather Underground Upload script

Post by Toulon7559 » Thursday 23 August 2018 12:30

Perhaps try this: http://www.domoticz.com/forum/viewtopic ... 839#p47970
That extra print line will show in the Log the output of the previous scriptlines.
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Toulon7559
Posts: 465
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Weather Underground Upload script [also for Sylphide]

Post by Toulon7559 » Thursday 13 September 2018 17:17

;-) More of the same, but slightly different.....

The WUnderground Upload script can also be basis for an HTTP-uploadscript for the Sylphide project of (Dutch organisation) VWK:
- applies UTC in the same way for building of header string with date&time (with small deviation), but
. different setup for IDs and for Software identification
- same compilation of URL-string is possible, but
. different labels for the components wind, rain, temperature, humidity, etc.
. all values are metric, and at most 1 decimal

Because such HTTP-upload is reserved for VWK-members, no publishing of the scriptcode in this thread, but send a PM if you are a fellow VWK-member wanting to apply Domoticz for HTTP-upload to Sylphide.
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests