How to setup two triggers with different actions

I have a table lamp that is turned on via one scene at sunset and turned off via another scene at a specific time. I wanted to be able to turn on/off the light at will, so I added a Hank button that is a trigger for a third scene that toggles the state of the light.

Pressing the Hank button does toggle the state of the light but then a second later the light reverts back to the original state.

Any ideas what is going on here? I have only used simple triggers and scene controls to date so I strongly suspect there is a better way to do this so alternate implementation suggestions are welcome.

What are you conditions on sunset scene? At sunset, or after sunset? If, for example, the light comes on when Day and Night is in night mode, it could (maybe) keep re-triggering

Not sure you need a Hank button (no idea what that is) AltUI will let you create a scene that toggles a switch status, and Reactor also allows you to access that directly.

C

The Tri-State or Nothing switch is probably what you need.

@sat968 I have something similar where one device is switched on at sunset and then off at a fixed time using two different scenes. Even with such timed scenes it is possible to trigger them manually at any time from either the direct web interface (UI7) or the app. If you switch the table light on manually with the “sunset” scene and then switch it off with the “timed” scene does it behave normally. If it is a z-wave device it should also be possible to see the status off the device and switch it on and off directly from the devices page. Generally scenes result in putting a device into a particular state and do NOT result in a device being kept in that state. I suspect that the anomalous behaviour is caused by the scene triggered by the Hank button (I believe that there are at least two types one with a single button and the other with 4 buttons and that they act as scene controller).

How have your implemented the toggle/change state action as I have only been able to either switch a device on or switch a device off - I am not saying it is not possible just that I have not found a way of doing it with just a scene?

30 minutes before sunset is the trigger.

The Hank button is just a one button scene controller that is a couple of inches square and battery powered. It’s pretty much equivalent to the Fibrao button but I can get it to work for me whereas the Fibaro doesn’t work.

I’ll look into AltUI and reactor to see if I can figure out how to make them work for me. What’s strange is I have another light that is controlled in a similar manner and I happen to use a Hank four button scene controller and it works just fine. (This is on a Christmas tree and my Wife just told me it works.) So, I have another avenue to debug between the two lights, but if there is a cleaner way to do this, it makes sense to up my game and learn something new.

Thanks for the suggestion. I’ll take a look at those.

You need (AFAIK) either Reactor or AltUI to do it. AltUI lets you access the toggle state when you make a scene. Reactor allows you to access toggle state directly.

It makes no sense to me at all that UI7 doesn’t understand the toggle. I spent weeks trying to get logic to toggle my dimmer lights in the kitchen to toggle. Then it took about 30 seconds with the correct tool set.

C

The toggle functionality is buried deeply in the GUI. I’ve had to relearn how to do it multiple times.

The way I’ve been doing this is setting up a scene as you normally would, but just put in any action to be set such as just turning on the light. When you get to step 3, Finish the scene, go into the Advanced Editor. It’s the last option before selecting the room. I just delete the existing action and then add a new action. Choose a device and then click the down arrow in the Service column. Scroll a long way down the list and you will eventually see ToggleState. Select that and finish off creating the scene and now when this scene is triggered, the light will toggle on/off.

UI7 does understand toggle but the functionality is buried very deeply in the scene setup. I would rather use your suggestion since I have to relearn how to do this each time.

I’ve described the steps to do this in one of my other replies.

Bloody hell. I didn’t even know there was an advanced Editor. Pretty dumb, but thanks for sharing!

C

I have a similar setup, I turn on about 5 lights dimmed at sunset just for ambience. 2 native vera scenes one for sunset on and one for midnight off. I never had a problem turning on / off at will between sunset and midnight either by manually flipping the switch or through Vera mobile or web interface.

Intrigued by your post I decided to experiment and set up a scene to toggle one of my devices. It behaved exactly as expected, i.e. when run it changed the state of the device and after changing the state of the device it remained in that state until the some other action was performed.

This was observed on a Vera Plus running firmware 7.0.29 (1.7.4453)

Is it possible that the scene that is meant to “toggle” the output has somehow got another action included in it? It is possible to list all your scenes by opening a new browser tab/window and inputting http://Your.VP.IP.address:3480/data_request?id=objectget&key=scenes&output_format=xml, where Your.VP.IP.address is modified appropriately. The resulting output should list all your scenes in xml format. You can then scroll down and look at the settings for a particular scene. The listing for my test scene is :-

<scene id="33" last_run="1575362712" encoded_lua="0" lua="" modeStatus="0" users="" triggers_operator="OR" room="2" name="Hall Light Toggle" Timestamp="1575361919" active_on_any="0">
   <groups>
      <group delay="0">
         <actions>
           <action action="ToggleState" service="urn:micasaverde-com:serviceId:HaDevice1" device="18">
              <arguments/>
           </action>
       </actions>
   </group>
  </groups>
  <triggers/>
  <timers/>
</scene>

The “scene list” also provides a way of checking what other scenes are controlling a particular device, i.e. search for device=“##” where ## is the actual device number.

I think I have convinced myself that I have the scene configured correctly. If I manually run the scene, my light toggles state and remains in the correct state.

I turned on notifications and when I press the Hank button, I see that the scene is triggered four times whereas if I manually run the scene, I only see one notification. I tried a spare Hank button I have and it did the same as the original button.

I remembered I had added another Hank button some months ago and use it to toggle a lamp and it works fine. I’ll have to do some digging to see if both devices are being configured the same. Hopefully the problem is with the device configuration…