04.05.2021, 09:56
(04.05.2021, 06:22)admin Wrote: Example:
Code:<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="http://192.168.10.111/apps/js/jquery.js.gz"></script>
<script src="http://192.168.10.111/apps/js/localbus.js.gz"></script>
<script src="http://192.168.10.111/scada/vis/busdecode.js.gz"></script>
</head>
<body>
<button id="example">Click to write</button>
<script>
$(function() {
// listen to all groupwrite telegrams
localbus.listen('groupwrite', function(event) {
console.log(event);
});
localbus.init('http://192.168.10.111', 'admin:admin');
$('#example').click(function() {
localbus.write('0/0/10', true);
});
});
</script>
</body>
</html>
Thank you, now I have something to work on