Closed renne closed 3 years ago
To get PSd00 % (0..100) Probability: relative sunshine duration > 0 % within 24 hours PSd30 % (0..100) Probability: relative sunshine duration > 30 % within 24 hours PSd60 % (0..100) Probability: relative sunshine duration > 60 % within 24 hours
You need to change following file ~/.node-red/node_modules/node-red-contrib-dwd-local-weather/dwdweather.js
change line 14 (add PSd00, PSd30, PSd60) to:
const mosmixElementsBase = ['TTT', 'Td', 'FF', 'DD', 'wwP', 'RR1c', 'PSd00', 'PSd30', 'PSd60'];
at line 206 add for message payload following lines: // // add following lines at end of msg.payload = { // "sunPSd00Next24h": Math.round(sumFutureValue(node.mosmixStation, "PSd00", 24, forecastDate) 10) / 10, "sunPSd30Next24h": Math.round(sumFutureValue(node.mosmixStation, "PSd30", 24, forecastDate) 10) / 10, "sunPSd60Next24h": Math.round(sumFutureValue(node.mosmixStation, "PSd60", 24, forecastDate) * 10) / 10
The maximum temperature is an interesting use case and I will look into that. Need to make sure that the maximum temperature does not drop in the evening when less (and typically only colder) data points for the current day are available, but that can be achieved by using TTT and TX (Maximum temperature in last 12 hours) values. The code posted above seems unrelated as it is about sunshine duration. Also it does not make sense to add up probabilities as this can easily result in a probability > 100% and just does not make sense - or am I missing something?
@c5te1n
I agree. node-red-contrib-blindcontroller uses current clouds
in percent and uvindex
to decide wether to close blinds. A forecasted maxtemp
would be useful to close shutters early on foreseeable hot days even if the current direct sunlight conditions wouldn't indicate.
Do it via the node configuration property Additional fields. See also #5.
With the output modifiers you can now use >°TX
to get the maximum forecasted temperature in Celsius for the current 12 hour window. It will return day max temp during daytime hours and night max temperature otherwise.
@renne: If your question is answered please close this issue. @c5te1n: I propose to close this issue.
With the output modifiers you can now use
>°TX
to get the maximum forecasted temperature in Celsius for the current 12 hour window. It will return day max temp during daytime hours and night max temperature otherwise.
Can you provide more details on "daytime hours"? When is the earliest time I can request >°TX to get max temp for current day? Or does >°TX always reports the highest tempertaure in the next 12 hours, so a 6am until 6pm? According to local weather forecast todays max is at 3-5pm with about 12 degrees. The pull at 6am reports 9.5 degrees, the pull just now (8:30 am) 12.4 degrees.
/Edit: Aaah - i think I have to add "12" to "look ahead hours" to get the max of TX for the last 12 hours. right?
Please add the maximum forecasted temperature of the current day to e.g. close blinds or power down heating as early as possible.