User Tools

Site Tools


mqtt

If you want to send us your comments, please do so. Thanks
More on comments


MQTT simple

Purpose: Use MQTT on the command line and / or in a script
Home page
Dependency Net::MQTT::Simple needs to be build an installed

cd $HOME
su # Login as root
wget https://metacpan.org/release/JUERD/Net-MQTT-Simple-1.26/raw/bin/mqtt-simple?download=1
chmod 740 mqtt-simple.pl
wget https://cpan.metacpan.org/authors/id/J/JU/JUERD/Net-MQTT-Simple-1.26.tar.gz  # To get Net::MQTT::Simple
tar xf Net-MQTT-Simple-1.26.tar.gz
cd Net-MQTT-Simple-1.26/
cat README # And read the contents of this README file
perl Makefile.PL # Should result in:
  Checking if your kit is complete...
  Looks good
  Generating a Unix-style Makefile
  Writing Makefile for Net::MQTT::Simple
  Writing MYMETA.yml and MYMETA.json
make # Should result in:
  cp lib/Net/MQTT/Simple/SSL.pm blib/lib/Net/MQTT/Simple/SSL.pm
  cp lib/Net/MQTT/Simple.pm blib/lib/Net/MQTT/Simple.pm
  cp bin/mqtt-simple blib/script/mqtt-simple
  "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/mqtt-simple
  Manifying 1 pod document
  Manifying 2 pod documents
make test # Should result in:
  PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
  t/regex.t .. ok     
  t/use.t .... ok   
  All tests successful.
  Files=2, Tests=561,  0 wallclock secs ( 0.07 usr  0.00 sys +  0.25 cusr  0.02 csys =  0.34 CPU)
  Result: PASS
make install # Should result in:
  Manifying 1 pod document
  Manifying 2 pod documents
  Installing /usr/local/share/perl/5.28.1/Net/MQTT/Simple.pm
  Installing /usr/local/share/perl/5.28.1/Net/MQTT/Simple/SSL.pm
  Installing /usr/local/man/man1/mqtt-simple.1p
  Installing /usr/local/man/man3/Net::MQTT::Simple::SSL.3pm
  Installing /usr/local/man/man3/Net::MQTT::Simple.3pm
  Installing /usr/local/bin/mqtt-simple
  Appending installation info to /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/perllocal.pod
exit # Back to being a normal user
$HOME/mqtt-simple --host somehostname.tld --color --subscribe "somehostname/sometopic"

Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
mqtt.txt · Last modified: 02-01-2022 21:51 by wim