HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: kevin1 on July 14, 2015, 03:56:09 PM

Title: Program.Parameter vs RaiseEvent
Post by: kevin1 on July 14, 2015, 03:56:09 PM
What is difference between these:

Code: [Select]
Program.Parameter("jkUtils.OpenWeatherMap.Rain.H1").Value = data.rain["1h"] ?? "";

Program.RaiseEvent("jkUtils.OpenWeatherMap.Rain.H1", data.rain["1h"], "OWD-Rain one hour");

WeatherUnderground uses Program.RaiseEvent to refresh data in the widget.  OpenWeather uses Program.Parameter... so both work?

I have noticed that the RaiseEvent data also appears on the statistics/chart (WeatherUnderground for example) while I don't think Program.Paramter shows on the chart (OpenWeather example).  I'd like to remove the WeatherUnderground forecast from the chart as it clutters and doesn't seem useful.



Title: Re: Program.Parameter vs RaiseEvent
Post by: Gene on July 15, 2015, 07:23:33 PM
Program.Parameter just changes the parameter value without notifying any event to the system.
Program.RaiseEvent changes the parameter value and notifies the event to the system.
Title: Re: Program.Parameter vs RaiseEvent
Post by: kevin1 on July 15, 2015, 08:11:08 PM
Program.Parameter seems to update the widget though as in the OpenWeather