unfoldedcircle / feature-and-bug-tracker

Feature and bug tracker repository for Unfolded Circle products
24 stars 0 forks source link

[bug] Sequence of turning Power off when switching activities #286

Closed Pebowski closed 8 months ago

Pebowski commented 8 months ago

Is there an existing issue for this?

Description

I want to switch from FireTV to my normal Watch TV and have set "Run modified off sequence". The Off-Sequence is this one in the picture. What happened is, that first it powers off the Denon AV and then switch the input to Phono, what causes the Denon to switch on again. Should it be not the other way round: first run the Off-Sequence and at the end turn off all unused components?

How to Reproduce

  1. Switch the activities

Expected behavior

Now it behaves like this: 1) Turn unused Entities off 2) Run Off Sequence 3) Run On Sequence. I think it should be: 1) Run off sequence 2) Turn unused Entities off 3) Run On Sequence

System version

No response

What part of the system affected by the problem?

UI

Additional context

CleanShot 2024-01-21 at 00 00 50@2x

zehnm commented 8 months ago

With the "Run modified off sequence" option, only the off-sequence of the currently running activity in the same activity group is executed. Power-off commands from entities used in the new activity's power-on sequence are automatically filtered out. There is no additional "Turn unused Entities off" logic if "Run modified off sequence" is selected.

Are both your "FireTV" and "Watch TV" activities in the same activity group?

If this requires further investigation then I need the log file from the time when you switch activities. The log shows the modified sequences and the state information of the involved entities. Log files can be downloaded in the web-configurator under Settings: Development, Logs

image

Then select:

Pebowski commented 8 months ago

They are in the same activity group. And the TV stays On and the Denon is powered off. That all is OK. The problem is the order. The Denon is first powered off and then the Input is set to Phono is not executed anymore, because the Denon is already off. But in the off sequence it is first set to Phono and the last step is to power off the Denon. UCR2_logs_2024-01-22-2.txt

zehnm commented 8 months ago

Thanks for the log information. Looking at the last "Starting activity 'TV'" log entries I noticed a different off-sequence as in the picture above. Could you please verify that the posted off-sequence screenshot is the correct one? If it's correct then I have to find out why it changed.

The delay step is at a different position, and "Run modified off sequence" only removes individual sequence steps. I'll setup the two activities with the Denon integration in my environment and try to reproduce it.

Pebowski commented 8 months ago

Sorry, my mistake. Now I have the delay on the same position as in the screenshot. Now I have the effect, that it turns the Denon on again and switches to Phono, and the Denon stays On. UCR2_logs_2024-01-22.txt

zehnm commented 8 months ago

No problem, it just confused me a bit :-) Good news though: just found the issue and it will be fixed in the next release. I'll try to create a smaller patch release in the next days to get this and #225 resolved.

zehnm commented 8 months ago

This is fixed in the 1.6.7 release. In case something is still not working, then please re-open this issue or create a new bug report.