Skip to content

Instantly share code, notes, and snippets.

@jenschr
Created September 27, 2022 09:54
Show Gist options
  • Save jenschr/168683b7b5cd7f3806b3aa44bf885357 to your computer and use it in GitHub Desktop.
Save jenschr/168683b7b5cd7f3806b3aa44bf885357 to your computer and use it in GitHub Desktop.
TEK303 Mqtt example HTML
<!doctype html>
<html lang="en" data-theme="dark"/>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" type="text/javascript"></script>
<script src="./secret.js" type="text/javascript"></script>
<script src="./mqtt.js" type="text/javascript"></script>
<title>MQTT Demo</title>
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
</head>
<body>
<main class="container">
<form class="grid">
<p><input type="text" id="server" placeholder="status"></p>
<p><input type="text" id="topic" placeholder="status"></p>
<p><input type="text" id="payload" placeholder="send 0 or 1"></p>
<p><button type="submit" id="button" aria-label="Example button" onclick="event.preventDefault()">Waiting for data</button></p>
</form>
<footer><p>CSS by <a href="https://picocss.com/">picocss.com</a></p></footer>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment