Page 6 of 6
Re: Weather Underground Upload script
Posted: Monday 23 March 2020 11:20
by Stimpy68
@waaren I found the error myself
I also uploaded PM2.5 and PM10 values, and that doesn't seem to work anymore, removed those (WU doens't do anything with it) and now it works again!
Re: Weather Underground Upload script
Posted: Monday 06 July 2020 21:30
by Toulon7559
Upload of data for PM2.5 and PM10 should be possible, and much more ......
Google provides many references to the old location of the protocol description, but the protocol description for upload is now
at this location.
Take care that the units for the uploadstring are correct, because some values are imperial measure, and not metric as coming from many PWSes.
Therefore often a rescaling is required before insertion in the uploadstring.
Note:
Have comparable experience as Stimpy68 that the upload apparently 'strikes' if PM-values included in the uploadstring.
Status November 1st, 2020:
Running a script incl. upload of values for AqPM2.5 and AqPM10 is now without error responses.
Although those values nowhere at the WU-site appear in a display .......
Somebody a hint?
Re: Weather Underground Upload script
Posted: Monday 02 November 2020 14:46
by Toulon7559
Earlier in this thread already a
script for upload of data to PWSWeather.
Detecting that the display at PWSWeather includes history for Solar radiation and for UV, requested and got a description from PWSW how the upload-string should look, incl. a list and format of all possible elements.
Which information I thankfully convey to this Forum.

You can expand the upload to PWSW as you like 'within the range of the list' ........
For Solar Radiation and UV (and other aspects) you could borrow the relevant scriptlines from your WU-Uploadscript.
Code: Select all
SAMPLE STRING TO UPDATE DATA ON PWSWEATHER.com
https://pwsupdate.pwsweather.com/api/v1/submitwx?ID=STATIONID&PASSWORD=password&dateutc=2000-12-01+15:20:01&winddir=225&windspeedmph=0.0&windgustmph=0.0&tempf=34.88&rainin=0.06&dailyrainin=0.06&monthrainin=1.02&yearrainin=18.26&baromin=29.49&dewptf=30.16&humidity=83&weather=OVC&solarradiation=183&UV=5.28&softwaretype=Examplever1.1&action=updateraw
All parameters are optional except for the ones marked with *.
If your software or hardware doesn't support a parameter it can be omitted from the string.
ID * Station ID as registered
PASSWORD * Station specific API Key from Admin page
dateutc * Date and time in the format of year-mo-da+hour:min:sec
winddir Wind direction in degrees
windspeedmph Wind speed in miles per hour
windgustmph Wind gust in miles per hour
tempf Temperature in degrees fahrenheit
rainin Hourly rain in inches
dailyrainin Daily rain in inches
monthrainin Monthly rain in inches
yearrainin Seasonal rain in inches (usually local meteorological year)
baromin Barometric pressure in inches
dewptf Dew point in degrees fahrenheit
humidity Humidity in percent
weather Current weather or sky conditions using standard METAR abbreviations and intensity (e.g. -RA, +SN, SKC, etc.)
solarradiation Solar radiation in W/m^2
UV UV, expressed as UVI
softwaretype * Software type
The string always concludes with action=updateraw to indicate the end of the readings
For more information contact AerisWeather Support: https://www.aerisweather.com/support/
If your PWS has lighmeasurement with an output as Lux-value, in a lua-script don't forget a local conversion-function from lux towards W/m^2 like
Code: Select all
local function luxtoWattsm2(mm)
if mm == nil then return 0 end
return mm * 0.0079
end
Obviously, for other scripttypes, an equivalent function to be included.
Because of the equivalence, just wondering:
is the
list for upload to WOW_UK still the one & only valid list, or has any extended version appeared, in line with the extensions discussed above?
Re: Weather Underground Upload script
Posted: Saturday 06 February 2021 14:56
by remember
Good afternoon, The script stopped sending rain data, from one moment to the next, it always hit the domoticz, from what I saw accuses on the devices, but then it doesn't even appear on the domoticz panel or in the WU, can anyone help?
Enviado do meu POT-LX1 através do Tapatalk
Re: Weather Underground Upload script
Posted: Saturday 06 February 2021 15:45
by Toulon7559
Stepwise check (or in reverse order):
1) Which type of PWS and which interface in use to feed Domoticz?
2) Is the PWS reporting rain at it's own display?
3) In Domoticz, is the rain-device visible in Setup/Devices, and under Setup/Options/Events?
4) Script in Domoticz without errors?
5) What rain-display at WU? Any error report at side of WU?
Re: Weather Underground Upload script
Posted: Saturday 06 February 2021 16:26
by remember
Toulon7559 wrote:Stepwise check (or in reverse order):
1) Which type of PWS and which interface in use to feed Domoticz?
2) Is the PWS reporting rain at it's own display?
3) In Domoticz, is the rain-device visible in Setup/Devices, and under Setup/Options/Events?
4) Script in Domoticz without errors?
5) What rain-display at WU? Any error report at side of WU?
It is a netatmo, the data is appearing on the device panel, but then it does not appear on the WU, today I have 1.3mm, now it appears on the 0.1mm panel of a downpour, but the rest does not appear.

Enviado do meu POT-LX1 através do Tapatalk
Re: Weather Underground Upload script
Posted: Saturday 06 February 2021 16:28
by remember
remember wrote:Toulon7559 wrote:Stepwise check (or in reverse order):
1) Which type of PWS and which interface in use to feed Domoticz?
2) Is the PWS reporting rain at it's own display?
3) In Domoticz, is the rain-device visible in Setup/Devices, and under Setup/Options/Events?
4) Script in Domoticz without errors?
5) What rain-display at WU? Any error report at side of WU?
It is a netatmo, the data is appearing on the device panel, but then it does not appear on the WU, today I have 1.3mm, now it appears on the 0.1mm panel of a downpour, but the rest does not appear.

Enviado do meu POT-LX1 através do Tapatalk
Sorry for the images
Enviado do meu POT-LX1 através do Tapatalk
Re: Weather Underground Upload script
Posted: Saturday 06 February 2021 21:07
by Toulon7559
Puzzled related to the pictures for the Device List, because only 3 columns (out of 8) with 2* Rain and 2* Temp&Humid.
What IDX and which Name is valid for each of them (in the columns left of these 3)?
.
Another approach:
what is shown for these devices under Setup/Options/Events?
Re: Weather Underground Upload script
Posted: Sunday 07 February 2021 20:56
by remember
Toulon7559 wrote:Puzzled related to the pictures for the Device List, because only 3 columns (out of 8) with 2* Rain and 2* Temp&Humid.
What IDX and which Name is valid for each of them (in the columns left of these 3)?
.
Another approach:
what is shown for these devices under Setup/Options/Events?
Good night, it's back to the same ... I have two sensors inside the house, one in the office and one in the bedroom, then the outside is all 3 temperatures and humidity, the other rain and temperature sensor are ones that are no longer used, but as much as I try I can't remove them from the panel. The script I'm using is this, but the rain is still not transmitting ...
https://github.com/Earthweb-EWS/domotic ... ime_wu.lua
Enviado do meu POT-LX1 através do Tapatalk
Re: Weather Underground Upload script
Posted: Monday 08 February 2021 12:18
by Toulon7559

File in github looks very familiar ...
In your application-version, what is inserted as name in scriptline 07 for Rainmeter?
Is
that rainmeter showing good values in Domoticz?
Re: Weather Underground Upload script
Posted: Tuesday 09 February 2021 8:44
by remember
Toulon7559 wrote:
File in github looks very familiar ...
In your application-version, what is inserted as name in scriptline 07 for Rainmeter?
Is
that rainmeter showing good values in Domoticz?
Good Morning, On the devices it takes the rain, but on the meteorological panel it does not. Line 7 appears Rain Gauge
Enviado do meu POT-LX1 através do Tapatalk
Re: Weather Underground Upload script
Posted: Sunday 02 October 2022 18:43
by Peter83
hello,
so i tried to use this script with my BME280 and a rainmeter but it does not work
how do i have to set in bme280s values correct and how about dew point? Do i have to send dew point or is WU calculating it anyway?
script i tried:
Code: Select all
-- Weatherunderground PWS upload script
-- (C)2018 Earthweb EWS, Based on GizMoCuz
-- Sensor Settings
Outside_Temp_Hum = 'TrlfK'
Barometer = 'TrlfK'
RainMeter = 'RegenTotalK'
--WU Settings
baseurl = "http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?"
ID = "xxxx"
PASSWORD = "xxxx"
local function CelciusToFarenheit(C)
return (C * (9/5)) + 32
end
local function hPatoInches(hPa)
return hPa * 0.0295301
end
local function mmtoInches(mm)
return mm * 0.039370
end
utc_dtime = os.date("!%m-%d-%y %H:%M:%S",os.time())
month = string.sub(utc_dtime, 1, 2)
day = string.sub(utc_dtime, 4, 5)
year = "20" .. string.sub(utc_dtime, 7, 8)
hour = string.sub(utc_dtime, 10, 11)
minutes = string.sub(utc_dtime, 13, 14)
seconds = string.sub(utc_dtime, 16, 17)
timestring = year .. "-" .. month .. "-" .. day .. "+" .. hour .. "%3A" .. minutes .. "%3A" .. seconds
SoftwareType="Domoticz"
WU_URL= baseurl .. "ID=" .. ID .. "&PASSWORD=" .. PASSWORD .. "&dateutc=" .. timestring
--&winddir=230
--&windspeedmph=12
--&windgustmph=12
-- Line 53, Extraction of data from BMP180
sBMP280T, sBMP280H, sBMP280D, sBMP280P = otherdevices_svalues[Barometer]:match("([^;]+);([^;]+);([^;]+);([^;]+)")
sBMP280T = tonumber(sBMP280T);
print ('BMP280_temp = '.. sBMP280T)
sBMP280H = tonumber(sBMP280H);
print ('BMP280_hum = '.. sBMP280H)
sBMP280D = tonumber(sBMP280D);
print ('BMP280_dew = '.. sBMP280D)
sBMP280P = tonumber(sBMP280P);
print ('BMP280_druk = '.. sBMP280P)
if Outside_Temp_Hum ~= '' then
WU_URL = WU_URL .. "&tempf=" .. string.format("%3.1f", CelciusToFarenheit(sBMP280T))
WU_URL = WU_URL .. "&humidity=" .. sBMP280H
WU_URL = WU_URL .. "&dewptf=" .. string.format("%3.1f", CelciusToFarenheit(sBMP280D))
Sensor = Outside_Temp_Hum
end
if Barometer ~= '' then
WU_URL = WU_URL .. "&baromin=" .. string.format("%2.2f", hPatoInches(sBMP280P))
Sensor = Barometer
end
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]))
Sensor = RainMeter
end
--&weather=
--&clouds=
-- Current date as date.year, date.month, date.day, date.hour, date.min, date.sec
date = os.date("*t")
if (date.min % 5 == 0) then
WU_URL = WU_URL .. "&softwaretype=" .. SoftwareType .. "&action=updateraw"
print ('Uploading data to Weather Underground')
--print (WU_URL)
print ('ID=' .. ID)
print ('Sensor=' .. Sensor)
commandArray = {}
--remove the line below to actualy upload it
commandArray['OpenURL']=WU_URL
print ('Uploading data to Weather Underground completed')
else
commandArray = {}
end
Re: Weather Underground Upload script
Posted: Saturday 08 October 2022 11:17
by Peter83
ok.. so BMP280 has 5 outputs, not 4
and i made a spelling mistake.
Working now.
and second i also found out that 3. Value is not DewPoint as expected. Its "feels like" or so.. so i took folloing for dewpoint
Code: Select all
WU_URL = WU_URL .. "&dewptf=" .. string.format("%3.1f", CelciusToFarenheit(otherdevices_dewpoint[xxx..pa:Outside_hum-Temp]))