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

Fix serialExist() #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix serialExist() #17

wants to merge 1 commit into from

Conversation

leleobhz
Copy link

Olá!

Esta função estava tendo um comportamento inadequado ao concatenar as strings no Python 3.11.4, intercalando os joins dentro da nova string. Também tive problemas com o teste de os.path - que foi resolvido pelo os.path.exists completamente.

Resolvi usar uma concatenação mais simples nesse PR.

Está tudo bem para você fazer o merge dessas correções?

@leleobhz
Copy link
Author

Offtopic: Resolvi executar seu código porque o NUT não gosta mais dos nobreaks SMS (Vide networkupstools/nut#1987 ) e seu código está indo bem - aparentemente:

Received `{"lastinputVac": 129.0, "inputVac": 129.0, "outputVac": 112.0, "outputPower": 26.0, "powerNow": 377.0, "outputHz": 60.0, "batterylevel": 100.0, "temperatureC": 42.0, "BeepLigado": "on", "ShutdownAtivo": "off", "TesteAtivo": "off", "UpsOk": "on", "Boost": "off", "ByPass": "off", "BateriaBaixa": "off", "BateriaEmUso": "off", "publish_time": "2023-07-28 23:30:34", "info": "", "name": "", "noData": false, "RedeEletrica": "ver"}` from `home/ups_zenith_01/json` topic

Considerando que há um esforço em tentar fazer o NUT suportar, para mim sua implementação virou referência de como fazer - e também não vejo como implementações concorrentes já que quem usa MQTT provavelmente terá demandas distintas de quem usa o NUT direto .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant