[RELEASE] WATO - When any Attribute Then this cmd Otherwise that cmd


#144

I needed to find a way to flip a switch when the wind is too strong or if it's raining out for a new simple sprinkler app I'm working on. This app is PERFECT for reading in the attributes from my weather station and turning on/off some virtual switches.

Now my wife's plants won't get watered if it has been raining!

Thanks for the great app! @bangali


#145

update to github with the following change:

Version 5.0.0

*  2018-01-23   added support for executing RM rule action for both match and unmatched attribute

this does not evaluate the rule just runs the true action. below is the rule i tested this with. i dont myself use RM so test it out before committing to this version. :slight_smile:


#146

@raidflex have you checked the virtual switch device log to see if the on/off commend was sent to the device?


#147

you should be able to do this using setLevel as the execute command by specifying the new level and transition time in seconds.

now that WATO also supports executing RM actions that would be another way of doing this.


#148

Seems to be triggering the switch but not all the time and something is not right. Notice that the virtual switch was triggered off multiple times within less then 1 second. There are no other apps triggering this virtual switch, just the WATO's I have setup.

I also see you added rule machine integration, so I could use that as an alternative if the virtual switch is still a problem.

On a side note has the ability to use multiple attributes been added also?


#149

I did and it was a LOT easier than i thought it would be. Another option to try is VNC. I have used it for years and if you only need remote access to a PC, it is fast and cross-platform compatible. And it's free too.


#150

do you have multiple WATOs turning on/off this one virtual switch? what does the WATO(s) look like?

this will require changing the app design completely so i wanted to get the RM rule invocation change released before playing around with the multi attributes change.


#151

which DDNS service are you using?


#152

Bangali,

I'm having issues with the update, in that it doesnt like me NOT selecting an OTHERWISE. It errors with an "error" in logs. I've got around it by selecting a rule in the OTHERWISE, and the error went away.


#153

this when using RM rule for execute command?

what happens if you edit the WATO and remove the rule from otherwise does it still throw an error? whats the error in the logs?


#154

Yes, there was nothing in the OTHERWISE (i simply upgraded from the old version yesterda).

There was something about Nullpointer. Clicking on the "error" took me to the Rule Machine Page, but adding in a rule to the OTHERWISE made the error go away.

I'll try and get it back, but may take a few minutes.


#155

Sorry, it was in the "run Rule Machine" action. I changed a WATO from updating a virtual switch, to running a rule. I may have inadvertantly left something in the OTHERWISE section.

I've since had to roll back to a backup from yesterday, because of another issue I'm having. So I cant repeat the error.

I was hoping to be able to set a Global variable with WATO. SO what I did was run a rule from within WATO that sets a Global variable. Problem is, that global variable dont seem to be working as triggered rules. Thats not your problem though, but explains why I had to roll back. Too many things happenning in the house today to not have it working. WAF and all !


#156

I do have multiple WATOs setup with the 1 virtual switch. Basically I created multiple WATO's for different weather conditions based on the condition_code from the APIXU device. They are all setup as below.


Okay, yeah I was trying to condense all my WATOs into 1 instead of 1 for each weather condition.


#157

ok. this gets a little tricky as any of those WATOs can now trigger that switch and without digging in you wont be able to easily tell which WATO triggered the switch action.

the way i would set this up is create one virtual switch for each of these WATOs and a master virtual switch. in RM setup a rule so that when any of those switches change state have the master virtual switch change to that state. then trigger any actions off of that master virtual switch instead of the individual virtual switches. gives you quicker traceability.


#158

Regarding the running a Rule Machine rule as part of OTHERWISE, would it be possible to not select a rule? There are times that I dont want any rule run in the OTHERWISE. Currently I've set up a rule that does nothing, so there's that!

I've just figured out that it does allow you to select "No selection", but only after you initially select a rule, then go back in......


#159

I was actually try to avoid creating so many virtual switches, this was originally the reason for a request about multiple attributes. There is a lot of condition codes, currently I only added the most common ones that I needed.


#160

got you. let me see what i can do.


#161

@bangali thank you for this wonderful app. I'm wondering if you can help me figure out what I'm doing wrong, please.

When it's raining outside, I want my dehumidifier and bathroom fan to switch on to keep my home dry.

Here is how I have WATO setup. I'm also using your APIXU app for my local weather. As you can see, I think I have it set up properly, but it's raining here, and the condition matches to what I have it set to in this WATO rule, but my dehumidifier and bathroom fan aren't being triggered to turn on.



#162

lets start by checking the device log for those devices … do you see any on commands sent to them when the weather condition changed?

also WATO works on triggers so if you setup that WATO after the condition code had already changed to 1183 it would not trigger the WATO and hence the switches wouldnt turn on.


#163

Thank you for getting back to me!

Sadly I didn’t save the logs from last night and they are long gone. I do recall seeing a single line in the logs about WATO when the condition changes to 1183. It was a brief log statement just a few words long and nothing very descriptive. It did reference the 1183 code however. The devices and the name of the trigger was not listed in the log message.

The WATO triggers were set up several days ago, and the condition code changed last night well after WATO was configured.

I asked for help here after I had set up WATO last week and it didn’t turn on my devices as expected when it started raining. So I deleted the app reinstalled it and reset up all the triggers/rules/devices. After all of that, when it didn’t turn on my devices last night, I posted here.

We don’t have any rain in the forecast for the next few days. The next time we get a rain event I’ll save the logs and share them here for help with debugging.

Thank you, again!