Author Topic: Apps Script from MyAcurite to WU, Windy, PWSWeather, OWM, WindGuru, and/or CWOP  (Read 15152 times)

0 Members and 1 Guest are viewing this topic.

Offline skysummit

  • Forecaster
  • *****
  • Posts: 821
    • StormCast
Check the executions tab in your google script, it will tell you what information is being sent to WU and other places. If rain accumulation data is missing here then the script is not sending that data, check your script.
Alternatively, raise an issue in Github for Leo to address your problem.
https://github.com/leoherzog/WundergroundStationForwarder

Thanks. That may be it. I do not see precip accumulation coming from acurite. Only rate and last hour.
I have also read in this thread that some are using WU to send data to CWOP. For those pulling data from WU, are you sending the data to WU from your Wifi display or Access, and then using the script to pull from WU?



Dec 26, 2024, 8:42:28 AM   Debug   {"time":1735223994000,"latitude":"30.418869","longitude":"-90.421232","temp":{"f":61.2,"c":16.22},"dewpoint":{"f":60,"c":15.56},"windSpeed":{"mph":2,"mps":0.89,"kph":3.22,"knots":1.74},"windGust":{"mph":3,"mps":0.83,"kph":4.83,"knots":2.61},"winddir":47,"pressure":{"inHg":30.16,"hPa":1021},"humidity":97,"windChill":{"f":61.2,"c":16.22},"heatIndex":{"f":58.66,"c":14.81},"precipRate":{"in":0,"mm":0},"precipLastHour":{"in":0,"mm":0}}
« Last Edit: December 26, 2024, 09:51:16 AM by skysummit »
Hardware:  Acurite Atlas with Lightning Detector and extended anemometer, external temp/hydro  |  Contributing to myAcurite, Weather Underground,
Weather Cloud, PWS Weather, CWOP

CoCoRaHs Station: LA-TG-26
NWS COOP Observer, 16-4034-06
President | Director of Operations - StormCast

Offline karss

  • Member
  • *
  • Posts: 44
Here is my data, unfortunately this is a Tempest station forwarding data to Wunderground. Better to address the issue with the script developer.
Dec 26, 2024, 10:16:40 PM
Debug
{"time":1735231582000,"latitude":"xx.xxxx","longitude":"xx.xxxx","temp":{"f":77,"c":25},"dewpoint":{"f":76.46,"c":24.7},"windSpeed":{"mph":1.12,"mps":0.5,"kph":1.8,"knots":0.97},"windGust":{"mph":2.01,"mps":0.9,"kph":3.24,"knots":1.75},"winddir":105,"pressure":{"inHg":29.9818,"hPa":1015.3},"humidity":98,"windChill":{"f":77,"c":25},"heatIndex":{"f":77,"c":25},"uv":0,"solarRadiation":0,"precipRate":{"in":0,"mm":0},"precipSinceMidnight":{"in":0.80297,"mm":20.4},"precipLastHour":{"in":0.08969,"mm":2.28}}

Your script is missing "precipSinceMidnight"
« Last Edit: December 26, 2024, 11:54:06 AM by karss »

Offline karss

  • Member
  • *
  • Posts: 44
I just compared the scripts for Weatherflow and Tempest below, may be the Acurite code could be missing something.

Lines 543 to 554 for WeatherFlow

 if (weatherflowConditions.obs[0].precip != null) conditions.precipRate = {
    "in": Number(weatherflowConditions.obs[0].precip * 60).mmToIn().toFixedNumber(3),
    "mm": Number(weatherflowConditions.obs[0].precip * 60).toFixedNumber(2)
  };
  if (weatherflowConditions.obs[0].precip_accum_local_day != null) conditions.precipSinceMidnight = {
    "in": Number(weatherflowConditions.obs[0].precip_accum_local_day).mmToIn().toFixedNumber(3),
    "mm": Number(weatherflowConditions.obs[0].precip_accum_local_day).toFixedNumber(2)
  };
  if (weatherflowConditions.obs[0].precip_accum_last_1hr != null) conditions.precipLastHour = {
    "in": Number(weatherflowConditions.obs[0].precip_accum_last_1hr).mmToIn().toFixedNumber(3),
    "mm": Number(weatherflowConditions.obs[0].precip_accum_last_1hr).toFixedNumber(2)
  };

Lines 360 to 370 for Acurite

let rain = acuriteConditions.sensors.find(sensor => sensor.sensor_code === 'Rainfall');
  if (rain != null) conditions.precipRate = {
    "in": rain.chart_unit === 'in' ? Number(rain.last_reading_value).toFixedNumber(3) : Number(rain.last_reading_value).mmToIn().toFixedNumber(3),
    "mm": rain.chart_unit === 'mm' ? Number(rain.last_reading_value).toFixedNumber(2) : Number(rain.last_reading_value).inTomm().toFixedNumber(2)
  };
 
  let calculatedHourlyPrecipAccum = getCalculatedHourlyPrecipAccum_(conditions.precipRate.in);
  if (calculatedHourlyPrecipAccum != null) conditions.precipLastHour = {
    "in": Number(calculatedHourlyPrecipAccum).toFixedNumber(3),
    "mm": Number(calculatedHourlyPrecipAccum).inTomm().toFixedNumber(2)
  };

Offline skysummit

  • Forecaster
  • *****
  • Posts: 821
    • StormCast
Thanks karrs. I have done the same thing, and although I don't know much about this language, I agree.

On a side note, my CWOP is now working since the upgraded to 2.9.1.  I won't bug the developer. Hopefully he'll see these posts and chime in.
Hardware:  Acurite Atlas with Lightning Detector and extended anemometer, external temp/hydro  |  Contributing to myAcurite, Weather Underground,
Weather Cloud, PWS Weather, CWOP

CoCoRaHs Station: LA-TG-26
NWS COOP Observer, 16-4034-06
President | Director of Operations - StormCast

Offline skysummit

  • Forecaster
  • *****
  • Posts: 821
    • StormCast
Just wanted to reply in regards to my issue with rain reporting as rain rate and not rain accumulation. Leo was nice enough to chat with me about it earlier this morning. He will look into the script but I'm trying this for now. So far it's no longer reporting rain as 'rain rate', but I will have to wait on some precipitation to see if it's reporting properly.

I'm now reporting to WU via myAcurite and pulling data from 'ibm' to submit to CWOP, PWS Weather and Weather Cloud.
Hardware:  Acurite Atlas with Lightning Detector and extended anemometer, external temp/hydro  |  Contributing to myAcurite, Weather Underground,
Weather Cloud, PWS Weather, CWOP

CoCoRaHs Station: LA-TG-26
NWS COOP Observer, 16-4034-06
President | Director of Operations - StormCast

Offline karss

  • Member
  • *
  • Posts: 44
An updated version of the code (v 2.9.5) is now available, check it out.

 

anything