projects
/
zc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34a87b4
)
set mqtt server and port
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 22 Mar 2021 17:52:55 +0000
(18:52 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 22 Mar 2021 17:52:55 +0000
(18:52 +0100)
zc-send
patch
|
blob
|
history
diff --git
a/zc-send
b/zc-send
index
3e188ca
..
b7fe2c8
100755
(executable)
--- a/
zc-send
+++ b/
zc-send
@@
-54,6
+54,11
@@
if ( $ARGV[0] =~ m/interval/ ) {
print "Set alarm arming $rel_zero\n";
$raw = write_parameter_frame( "\x3a" => "\x11" . pack('C',$rel_zero) );
+} elsif ( $ARGV[0] =~ m/mqtt/ ) {
+ my @mqtt = qw(185 201 196 30 1883);
+ print "Set server port ", join(' ', @mqtt), "\n";
+ $raw = write_parameter_frame( "\x14" => "\x06" . pack('CCCCs',@mqtt) );
+
} else {
print "read_parameter_frame\n";
$raw = read_parameter_frame( "\x00" => "\x04\xe8\x03\x00\x00",