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

Refactor mqtt service status #87

Merged
merged 32 commits into from
Sep 19, 2020
Merged

Refactor mqtt service status #87

merged 32 commits into from
Sep 19, 2020

Conversation

mxmaxime
Copy link
Collaborator

@mxmaxime mxmaxime commented Sep 15, 2020

Goal

The goal of this PR is to uniform the way we send status to devices and services. For now, we only have the camera so it will be implemented for this service, but the goal is to create something modular for every device/service.

Closes

WIP

  • For a Topic, we enforce to have only one "type" of payload: JSON, Boolean..

@mxmaxime mxmaxime added the enhancement Improve internal stuffs label Sep 15, 2020
@mxmaxime mxmaxime added this to the v0.2.0 milestone Sep 15, 2020
@mxmaxime mxmaxime added this to In progress in v0.2.0 via automation Sep 15, 2020
@mxmaxime mxmaxime self-assigned this Sep 15, 2020
@mxmaxime mxmaxime linked an issue Sep 15, 2020 that may be closed by this pull request
Copy link
Collaborator Author

@mxmaxime mxmaxime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go.

'device_id': self._device_id,
}
def _needToPublishNoMotion(self):
if self._initialize is True:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have changed the way status are working so we need to tell the system if nobody is here when the camera is starting up. So basically, if in the first frame we don't detect anybody, we have to publish a message to inform the system.

raspberrypi_central/webapp/app/alarm/messaging.py Outdated Show resolved Hide resolved
raspberrypi_central/webapp/app/standalone/mqtt/__init__.py Outdated Show resolved Hide resolved
@mxmaxime mxmaxime marked this pull request as ready for review September 19, 2020 18:53
@mxmaxime mxmaxime merged commit 47d3ee2 into master Sep 19, 2020
v0.2.0 automation moved this from In progress to Done Sep 19, 2020
@mxmaxime mxmaxime deleted the refactor-mqtt-service-status branch December 5, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve internal stuffs
Projects
No open projects
v0.2.0
  
Done
1 participant