Pushing a virtual button requires piston command optimizations to be disabled

Hi team!

I am running a C-7 with FW version 2.3.8.140.

In order to come back from Hub Mode "Away" to the right Hub Mode based on the hour of the day, I have created a virtual button that, when pushed, instructs the Mode Manager App to do just that:

When Hub Mode is Away and I push on this virtual button on its device webpage, Hub Mode changes to the right setting based on the hour of the day.

When I try to automate this in webcore, I built a simple piston that does not work:

Please note the error message:
Command optimization: Skipped execution of device command [Button return from away].push(1) because it would make no change to the device. (1ms)

When I disable command optimizations in the piston, the execution is as expected:

Is this the intended behavior or a bug?

To me, although somewhat unintuitive, it is working as intended.

Interesting! I would like to know how you justify your opinion...

From a programing stand point I believe the backend of this push button request, when optimizations are enabled, checks the virtual button -> current state -> pushed variable, which is already '1' from a previous push button request, and then decides that the action is not worth executing because the state is already pushed. In other words, a previous push action prevents this from executing, which clearly is not a proper behavior.

It would be great if the project maintainers could confirm my assumption above and confirm this is the intended behavior.

Sorry for the delay, I will need to look at this more.

I expect the command for push is not marked as momentary device.

1 Like

I am having this exact problem even today. Webcore is ignoring the push button HSM-Disarm, causing all sorts of problems.

Would need to see a green snapshot of your reproducer piston. If it is large, if possible make a small piston that shows the problem.

My comment "causing all sorts of problem" is a statement of pistons which should be disarming the HSM are not, so therefore, other pistons are reacting to intruder detection upon arrival.

But the core (no pun) problem is that push buttons without setting the entire piston's command optimization to disabled will fail to "push the button" if it was previously performed. However, if one manually adds the "release" command before push, it will behave as expected.

I don't see you disabling command optimization in the piston. Can you show the logs with command optimization disabled for the piston?

I have pushed an update to webcore to check for momentary attributes.

if you are using the user install, hpm 'repair' on webcore will let you get it

Let me know if this resolves your issue.

1 Like

That works! Thanks.