WeatherCompany Binding - Solar Radiation

Hi all
I have installed last week a weather station (froggit wh2650) and send successfully data to ecowitt and wunderground.
The binding the weathercompany works well. So far so good.

in WS View (App) I can switch between “W/m²” and Lux.

But in the bindig (wunderground data) I receive only data in “W/m²”.
How can I receive the data in Lux or how can I stripe the “W/m²” from the data to work with it:

The declaration of the item
Number:Intensity WC_PWS_SolarRadiation “Sonneneinstrahlung [%.2f %unit%]” { channel=“weathercompany:weather-observations:xxxxxxx:currentSolarRadiation” }

I like to add a additional number item to work in rules for the shutters or the light.

Can somebody help me here?

BR Uwe

In a rule, you can strip the units like this:

(WC_PWS_SolarRadiation.state as Number).intValue
1 Like

// radiation in lux. 1 Lux = 0.0079 W/m²
var double lux = (radiation.state as DecimalType).doubleValue / 0.0079

btw you can get radiation from the astro binding, too.

1 Like

You know you can do this, right?

Number:Intensity ...  "Sonneneinstrahlung [%.2f lx]" { ...

This and the post from Markus was the solution, thanks Mark and Markus
var double Lux = (WC_PWS_SolarRadiation.state as Number).doubleValue / 0.0079

This will help me to implement this in my rules for switching lights and of course for the shutters. Hope that my solution pass the WAF :slight_smile:

unfortunaly not, this will only change the unit but the value is still the same. There is no conversion

Show us that in your events.log, when the Item is changed by the binding.

@rossko57 The units are different between these two. One is Intensity (Solar Radiation) and the other is Illuminance (Lux). Therefore, I’m not convinced the system will convert between the two.

I stand corrected; I (too) quickly googled and misread the quantity types!

It’s like Mark said, I have tried it and I do not get any value
even when I declare a item as following:
Number:Illuminance WC_PWS_SolarRadiationLX “Sonneneinstrahlung [%.0f lx]” { channel=“weathercompany:weather-observations:xxxxxxx:currentSolarRadiation” }

Nothing in the events.log for the item WC_PWS_SolarRadiationLX

BR Uwe

Yes, I have misled you.
If the binding provides a Number:Intensity type channel, you should link that to a Number:Intensity type Item.
Number:Intensity does not provide lux units,

1 Like

with the help from Mark I implement a rule where I convert the “W/m²” to Lux

rule "Watt to LUX"
when 
    Item WC_PWS_SolarRadiation changed
then
    var double Lux = (WC_PWS_SolarRadiation.state as Number).doubleValue / 0.0079
    WC_PWS_LUX.sendCommand(Lux)
end

This helps me to operate with the Lux-Value

BR Uwe

Glad you got it sorted out.

FTR it was @mstormi who provided the conversion formula.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.