{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshuzo-kino.hateblo.jp%2Fentry%2F2022%2F10%2F28%2F232634\" title=\"Python\u3067MQTT\u306e\u9001\u53d7\u4fe1\u3059\u308bpaho\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046 - Bye Bye Moore\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","url":"https://shuzo-kino.hateblo.jp/entry/2022/10/28/232634","version":"1.0","published":"2022-10-28 23:26:34","blog_url":"https://shuzo-kino.hateblo.jp/","image_url":null,"categories":["mqtt"],"height":"190","width":"100%","provider_url":"https://hatena.blog","title":"Python\u3067MQTT\u306e\u9001\u53d7\u4fe1\u3059\u308bpaho\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046","description":"\u524d\u56de\u307e\u3067\u306bUIFlow\u3068NodeRed\u306eMQTT\u901a\u4fe1\u304c\u3067\u304d\u308b\u69d8\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u4eca\u5ea6\u306fPC\u4e0a\u306ePython\u304b\u3089\u901a\u4fe1\u3057\u3066\u307f\u307e\u3059\u3002 \u5b9f\u969b\u306e\u3068\u3053\u308d from paho.mqtt import client as mqtt_client import time import random ## For MQTT broker = '192.168.8.119' port = 1883 topic = \"/sensor\" client_id = f'python-mqtt-{random.randint(0, 1000)}' threshold = 500 def connect_mqtt(): def o\u2026","blog_title":"Bye Bye Moore","author_name":"shuzo_kino","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/shuzo_kino/"}