8 lines
321 B
Python
8 lines
321 B
Python
from flask import Flask # Import the Flask class
|
|
app = Flask(__name__) # Create an instance of the class for our use
|
|
|
|
import paho.mqtt.client as mqtt
|
|
print("Starting up...")
|
|
client = mqtt.Client("Web2Mqtt")
|
|
client.connect("192.168.178.36",1884,keepalive=60)
|
|
client.publish("web2mqtt/status","Web2Mqtt starting up...") |