Added Scanner identification and MQTT handling

This commit is contained in:
2022-04-13 15:43:20 +02:00
parent 4da41fe1cd
commit 4b7234fa68
18 changed files with 595 additions and 76 deletions

View File

@@ -7,15 +7,15 @@
<textarea id="chat-log" cols="100" rows="20"></textarea><br>
<input id="chat-message-input" type="text" size="100"><br>
<input id="chat-message-submit" type="button" value="Send">
{{ scanner_id|json_script:"room-name" }}
{{ scanner_id|json_script:"scanner_id" }}
<script>
const roomName = JSON.parse(document.getElementById('room-name').textContent);
const scannerId = JSON.parse(document.getElementById('scanner_id').textContent);
const chatSocket = new WebSocket(
'ws://'
+ window.location.host
+ '/ws/scannerdata/'
+ roomName
+ '/ws/scanner/'
+ scannerId
+ '/'
);