Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLC Exception Timeout doesn't work when PLC is controlled by user #157

Closed
Tracked by #153
dostuffthatmatters opened this issue Feb 28, 2023 · 0 comments · Fixed by #166
Closed
Tracked by #153

PLC Exception Timeout doesn't work when PLC is controlled by user #157

dostuffthatmatters opened this issue Feb 28, 2023 · 0 comments · Fixed by #166
Assignees
Labels
scope:camtracker status:implemented has been implemented in some dev branch

Comments

@dostuffthatmatters
Copy link
Member

The write interaction with the TUM PLC is skipped when the user controls it:

# Skip writing to the PLC as the user took over control from the automation
if self.config["tum_plc"]["controlled_by_user"]:
logger.debug(
"Skipping EnclosureControl because enclosure is controlled by user"
)
return

However, after all successful write statement, the time will be stored:

self.last_plc_connection_time = time.time()

This time will be used to determine, how long not successful communication has happened. Hence, we have to add the line from the second code block before the return statement in the first code block.

@dostuffthatmatters dostuffthatmatters added this to the 4.0.8 - Bug Fixes milestone Feb 28, 2023
@dostuffthatmatters dostuffthatmatters self-assigned this Feb 28, 2023
@dostuffthatmatters dostuffthatmatters added status:in-progress is being work on in some dev branch and removed status:planned is assigned to a specific milestone labels May 2, 2023
dostuffthatmatters added a commit that referenced this issue May 3, 2023
dostuffthatmatters added a commit that referenced this issue May 3, 2023
@dostuffthatmatters dostuffthatmatters mentioned this issue May 3, 2023
11 tasks
dostuffthatmatters added a commit that referenced this issue May 3, 2023
@dostuffthatmatters dostuffthatmatters added status:implemented has been implemented in some dev branch and removed status:in-progress is being work on in some dev branch labels May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:camtracker status:implemented has been implemented in some dev branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant