20.10.2022, 11:24
grp.taglisten is only available in the visualization context. In apps/.lp files you can only listen to all group addresses. This only works for authorized users.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Localbus</title>
<script src="/apps/js/jquery.js.gz"></script>
<script src="/scada/vis/busdecode.js.gz"></script>
<script src="/apps/js/localbus.js.gz"></script>
</head>
<body>
<script>
$(function() {
localbus.init();
localbus.listen('groupwrite', function(event) {
console.log(event.dst, event.value);
});
});
</script>
</body>
</html>