-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cliente MQTT + Simulador mejorado #7
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… add id_device. add time_stamp with arg tz
Agustinefe
approved these changes
Jun 19, 2024
feijooso
approved these changes
Jun 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Una boludes pero si paso el plant name con minuscula no me lo toma. Lo demas muy chetooo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linked ticket in Jira
HAN-4 (Inicialmente creamos un ticket pero en su momento NO era útil. Ahora al final del proyecto SI nos es útil. La idea que se describe en el ticket es la inicial que NO seguí a rajatabla. Yo lo implemente muchisimo mas simple...)
HAN-126
HAN-159
Debido al PR en measurement service Protocolo MQTT + Adaptación con Sensor Real + Control de Notificaciones measurements#29, se adaptó el cliente consumer.py del simulador para utilizar el protocolo MQTT. Ahora puede enviar paquetes a los tópicos deseados.
Se ajusta simulador para enviar la luz y temperatura como float. Se envía la luz con unidad de Lux tal como lo hace el sensor real.Se envía el time_stamp en formato ISO indicando la zona horaria argentina.
Se mejora el simulador debido a que actualmente no nos era muy útil. Actualmente se migró el simulador a un CLI (gracias a la librería de Typer fue sencilla su implementación) para poder ejecutar 3 comandos distintos:
python3 main.py simulator
... mantiene el comportamiento original del simulador aunque ahora se puede mandar un id-devicepython3 main.py simple-package
... permite enviar paquetes con parámetros deseados!python3 main.py deviated-package
... permite enviar paquetes con parámetros desviados en base a un tipo de planta (y teniendo en cuenta el mapping de reglas que se trabajó en el measurement service!)En README.md dejé instrucciones de uso