Rules for sun blinds on weather conditions

  • Platform information:
    • Hardware: CPUArchitecture/RAM/storage
    • OS: what OS is used and which version
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: openhab3
  • Issue of the topic: please be detailed explaining your issue
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue
  • If logs where generated please post these here using code fences:

Hi everyone I need some helps to get my sun blinds working properly on weather conditions.
In particular I would like them get back on strong wind and rains.
Tried to get this rules triggered on local weather things on channel winds speed over 11km/h but it doesn’t work. I wrote this rules with UI to get a item switch on or off according wind speed but nothing happens.

triggers:

  • id: “1”
    configuration:
    itemName: Localweatherandforecast_WindSpeed
    state: “>11”
    type: core.ItemStateUpdateTrigger
    conditions:
  • inputs: {}
    id: “3”
    configuration:
    itemName: Interruttoreventoforte
    state: OFF
    operator: =
    type: core.ItemStateCondition
    actions:
  • inputs: {}
    id: “2”
    configuration:
    itemName: Interruttoreventoforte
    command: ON
    type: core.ItemCommandAction

It doesn’t seems to get the channel state

Thanks in advance for any hints
Paolo

Hi,
what should happen exactly? Should the blinds go up at strong winds AND rain or also when one of both happens? This is important to know whether it is a AND or OR rule.

Afaik you can’t use the > as state. You need to set this as a codition (But only if).

Maybe you can describe what should happen exactly under which circumstances?

Hi and thanks for your reply.
I would like that the blinds goes up with one of this conditions strong winds (>11km/h)or rain as I don’t have a sensor I would like to use the local weather information as virtual sensor.

Many thanks

What should I pick as trigger conditions if I put the state as only if?

You can create 2 rules.
In your first rule the trigger is the rain. So the rule will be triggered everytime the rain state changed.

In your second rule the tigger is the wind (changed state to any) and the condition is greater or equal to your windspeed (in your case 11).

You can also combine the two rules into one with a blocky script.
The trigger is the rain and the wind (so both will trigger the rule) with a state changed to any.
As action you create a blocky script like this where the blinds only move IF the wind is greater or equal to 11 OR the rain is ON (on = it is raining in my case)

Thank you for your assistance seems to work properly now.