Webcore Trigger on Level Change not working

I have created a piston to run a smart blub (Switch 33 in the piston image) as a 'secondary' device off of a Zooz switch (Switch 76 in the piston image). The bulb I am using doesn't seem to remember its last dimming level if I just send an ON command through webcore, so I set up a virtual dimmer (Switch 32 in the piston image) and will use that device for all interactions with the bulb outside of Webcore. I have triggers for various button presses on the Zooz switch and after they have run, the virtual dimmer will have the state that I want the bulb to be in. I then add a trigger for any external change of the virtual dimmer switch or level and then at the very end, where it will be run for ANY trigger of the piston, I set the bulb to match the virtual dimmer. Everything seems to be working, except when I change the brightness of the virtual dimmer in Alexa (and I can see that the level is changing), my piston doesn't trigger. It should trigger on line 98 per my understanding of things, but it doesn't. If I turn the virtual dimmer on and off in Alexa, my piston triggers at line 96 as expected. Is there a problem with trying to trigger on a level change? I am running Webcore v0.3.114 on a C7 platform version 2.3.7.145.

That trigger is IF then END. Does nothing. Are you running a TRACE just to see if it triggered as a test? Why IF/END?
Screenshot 2024-02-05 170703

OK - Webcore WAS triggering. My browser page just wasn't updating for some reason and I had to get out of the piston and then show it again.

I did track down the problem. It turned out I need to execute the "Configure" command for the bulb to get the set-level command to actually change the level of the bulb. I also had to add a bit of delay (currently at 100ms) to get it to work reliably. So mystery solved. Except for why my Webcore Browser windows have been so slow (or hanging lately). But if I get out of the piston and then show it again, things are better, at least for a while.

That trigger is to get the things that follow it to run if those things are changed outside of webcore (e.g. Alexa). Lines 102-122 run every time the piston runs, no matter what triggers it. See the trace at the bottom showing a trigger from a level change (which is working after all).

See my entry above which explains what the actual problem was.

image

1 Like