Różnice
Różnice między wybraną wersją a wersją aktualną.
| Poprzednia rewizja po obu stronach Poprzednia wersja Nowa wersja | Poprzednia wersja | ||
| programowanie:python:mqtt [2024/10/18 15:57] – [Połączenie] sases | programowanie:python:mqtt [2024/10/18 15:58] (aktualna) – [Publikacja] sases | ||
|---|---|---|---|
| Linia 43: | Linia 43: | ||
| def subscribe(client: | def subscribe(client: | ||
| def on_message(client, | def on_message(client, | ||
| - | | + | |
| for topic in topics: | for topic in topics: | ||
| Linia 59: | Linia 59: | ||
| status = result[0] | status = result[0] | ||
| if status == 0: | if status == 0: | ||
| - | print(f" | + | logging.info(f" |
| else: | else: | ||
| - | print(f" | + | logging.error(f" |
| </ | </ | ||
| \\ | \\ | ||