Hello,
My Yahoo Weather quit working so I switched to Open Weather Map which is up and running.
I am using the following:
Raspberry Pi with the latest 2.4 openHabian snapshot.
The issue I’m having is my R_Heater switch is not responding to the OutdoorTemp change using Open Weather Map but it worked with Yahoo Weather? Now no matter if the temperature changes R_Heaters is turned off.
Number:Temperature OutdoorTemp "Outside Temperature" {channel="openweathermap:weather-and-forecast:XXXXXXX:local:current#temperature"}
Switch R_Heaters "Roof Heaters" ["lighting"] {channel="zwave:device:41ac03b3:node43:switch_binary"}
rule "Roof Heaters Snow and Ice"
when
Item OutdoorTemp changed
then
if ((OutdoorTemp.state >= 15) && (OutdoorTemp.state <= 35)) {
R_Heaters.sendCommand(ON)
}
else
R_Heaters.sendCommand(OFF)
end
end
I modified the code as shown below thinking that "Temperature:Number is not being read by openhab as a number so I added “var ost”
rule "Roof Heaters Snow and Ice"
when
Item OutdoorTemp changed
then
var Number ost = OutdoorTemp.state as Number
if ((ost >= 15) && (ost <= 35)) {
R_Heaters.sendCommand(ON)
}
else
R_Heaters.sendCommand(OFF)
end
Log displays the following:
2019-01-13 17:56:45.098 [vent.ItemStateChangedEvent] - openweathermap_weather_and_forecast_xxxxxxxxxx_local_current_time_stamp changed from 2019-01-13T17:15:00.000-0600 to 2019-01-13T17:35:00.000-0600
2019-01-13 17:56:45.123 [vent.ItemStateChangedEvent] - OutdoorTemp changed from 26.654 °F to 26.564 °F
2019-01-13 17:56:45.153 [vent.ItemStateChangedEvent] - PressurePSI changed from 30.35682857368972486318756149620185 inHg to 30.38635856257463704690661554434991 inHg
2019-01-13 17:56:45.158 [vent.ItemStateChangedEvent] - Humidity changed from 66 % to 76 %
2019-01-13 17:56:45.163 [vent.ItemStateChangedEvent] - openweathermap_weather_and_forecast_xxxxxxxxxx_local_current_wind_speed changed from 3.355401753760200243080410403245049 mph to 6.934496957771080502366181500039768 mph
2019-01-13 17:56:45.181 [vent.ItemStateChangedEvent] - zwave_serial_zstick_41ac03b3_serial_sof changed from 896132 to 896133
2019-01-13 17:56:45.189 [ome.event.ItemCommandEvent] - Item 'R_Heaters' received command OFF
2019-01-13 17:56:45.222 [vent.ItemStateChangedEvent] - openweathermap_weather_and_forecast_xxxxxxxxxx_local_forecastHours03_temperature changed from 23.378 °F to 23.306 °F
2019-01-13 17:56:45.229 [nt.ItemStatePredictedEvent] - R_Heaters predicted to become OFF
Any Ideas will be appreciated!
Thanks,
Mike