Problem With Button Events

I’m having an issue getting a toggle to act correctly. I’ve watch the great videos on youtube about triggers, but am still having this problem. The toggle turns off and on a light through Vera. I have 2 DataTrigger and 2 EventTrigger events set up.

DataTrigger1: Binding: Light1 / Value: On
2 Setters: 1) Change the image & 2)IsChecked: True

DataTrigger2: Binding: Light1 / Value: Off
2 Setters: 1) Change the image & 2)IsChecked: False

EventTrigger1: Event: Checked
3 Actions: PropertyAction: Change the image
PropertyAction: Light1, IsChecked True
DataAction: Binding to Light1 = On

EventTrigger2: Event: Unchecked
3 Actions: PropertyAction: Change the image
PropertyAction: Light1, IsChecked False
DataAction: Binding to Light1 = Off

If I turn the light on & off via Vera - OK
If I turn the light on & off via Toggle in HR - OK
However, if I turn the light on via Vera via the toggle, the image doesn’t change, but TV turns off. Id I then click the toggle on HR, the image changes to correct state. From then on, turning on via Vera doesn’t change the image. I’m sure this is something simple, but after 5 hours, I can’t figure it out.

I’ve also tried with a plain toggle (no image changes) and the same thing happens. It appears that if you turn on via EventTrigger and turn off via DataTrigger the IsChecked=Off does not fire. Seems to be a problem with the Setter in the DataTrigger.

Thanks

If I understand you correctly, you are saying that your toggle state does not update correctly in Home Remote when you change the light in Vera, correct?

If that’s the case, place a Label on your page & bind it to the Switch property. Watch what the Label does when you change the device in Vera. If it also isn’t displaying the change then that means the issue is completely unrelated to your button. So make sure that works.

Bill - Yes, I already did that…should have mentioned it. Once I get to point in execution, the text in the label does not change. The only way it will change to press the toggle one and I’m back in sync.

I believe the DataTrigger Setters either aren’t firing or they are but the property is not being update. Thanks for your help, man.

Then that means it’s unrelated to your button. There’s something at the communication layer that’s causing the issue.

Sounds like it, but can’t imagine anyone else not running into this. You wouldn’t have any thought of a workaround?

Thanks again.

EDIT: I can changed anything else in the element of the image (HorizontalAlignment, Color, IsEnabled, IsVisible)…the only one that doesn’t work is IsChecked. It never changes state.

Right now I wouldn’t focus on IsChecked or anything else. Delete that button from your page. If you physically toggle the switch & the Label doesn’t show the current On/Off state, it’s a communication issue.

Does the Label ever show the correct On/Off state?

I’m happy to take a look at your project if you want. It’s very possible you have a typo somewhere. Just the other day someone was using the wrong character casing, so it could be something in your configuration. Although, it’s pretty hard to mess up a Label since it’s just a single Text Binding.

Yes, the label shows the correct state at times. I’d be glad to have you look at the project. I’ll scale it down to bare bones and send tomorrow. Thanks.

EDIT: I can send it now, but can’t figure out how to attach the file to a message.

Here’s a link to my dropbox file. Thanks for your help in figuring this out.

Android_Test.hrp

Android_Test.hrp (130.2 KB)
I played with it and it seems correct! However, for the label, bind the TEXT property to the device.

I added a virtual switch so I could test. I also added individual On/Off and it seems to work fine. With the label’s text bound to your device, watch and see what its actually spitting out…

After further digging I’ve found that the problem is occurring when I have a switch in Vera (let’s say BedroomTv) and that switch runs a scene depending on the state (BedroomTv on runs scene TvOnBedroom & BedroomTv off runs scene TvOffBedroom). All other switches (regular outlet or light switch) work correctly. Strange to me. I there a way to run Vera scenes from HR? That might solve the issue.

Thanks.

I cant really help ya with Vera but yeah, that seems odd. With the label text bound to BedroomTv, does it spit out the same values if its running the scene or not? Maybe @cw-kid or @Tarkus can help you here

Sure you can run a vera scene from HR. Your scenes should have come over and will be under your vera device. Just bind to the scene. Value can stay empty.

1 Like

Tarkus - What attribute do I bind to? TvOnBedroom.???

bind to TVOnBedroom.Scene

If you are not using instant status switches (zwave plus) you will not get a immediate update in HR when you are turning on or off a switch outside of HR, either thru a manual flip of switch or thru a scene. You will eventually get a update in HR when the switch is polled by vera. You can possibly work around this by adding a switchboard virtual switch on the vera end and trigger that virtual switch in the same scene as the physical switch. Then bind to the switchboard switch in HR instead of the physical switch. This will not be a solution for a manual flip of the switch however, which will rely on vera polling.

Switchboard is a Vera app

So, here’s what I have going in Vera:
Device called BedroomTV. In that device it runs scene: TvOnBedroom for the on state and TvOffBedroom for the off state. If I use the scene in HR as you suggested, it works great, but over on the Vera side, the state of the device BedroomTV doesn’t change to the correct state. If only I didn’t have the issue described about, I could just bind to the Device.

I’m here I was pinged.

What type of device is this in Vera ?

1 Like

my device is a Vera Edge.

You have a device in Vera called “BedroomTV” I meant what type of device is “BedroomTV” a virtual switch ?