MQTT, faites communiquer vos objets simplement
La communication entre « objets connectés » ou tout simplement dans votre environnement domotique est probablement l’une des choses essentielles. Dans les protocoles de communication que l’on retrouve le plus souvent, vous avez bien sûr http (et ses fameuses API Rest (ou pas)), xPL (dont je vous ai souvent parlé), XAP, XMPP, SNMP (si si je vous assure qu’il y en a qui ont essayé…) et d’autres trucs plus ou moins bien conçus. Un protocole devrait pourtant tenir rapidement le « haut du pavé » et devenir le standard de l‘i.o.t (comprendre l’internet des objets (ou « internet of things » pour reprendre le terme officiel) : MQTT. Et pour couronner le tout, MQTT est devenu depuis quelque jours un standard s’échange OASIS (OASIS (Organization for the Advancement of Structured Information Standards) est un consortium chargé d’aider au développement, à la convergence et l’adoption de standards ouverts pour « la société mondiale de l’information » (oui je mets des guillemets…). et dans les logs :
packet - GoDoc
import "github.com/yosssi/gmq/mqtt/packet" Package packet provides MQTT Control Packets. Package Files ¶ base.go connack.go connect.go connect_options.go decode.go disconnect.go doc.go encode.go fixed_header.go packet.go pingreq.go pingresp.go puback.go puback_options.go pubcomp.go pubcomp_options.go publish.go publish_options.go pubrec.go pubrec_options.go pubrel.go pubrel_options.go strings.go sub_req.go suback.go subscribe.go subscribe_options.go types.go unsuback.go unsubscribe.go unsubscribe_options.go Constants ¶ const ( TypeCONNECT byte = 0x01 TypeCONNACK byte = 0x02 TypePUBLISH byte = 0x03 TypePUBACK byte = 0x04 TypePUBREC byte = 0x05 TypePUBREL byte = 0x06 TypePUBCOMP byte = 0x07 TypeSUBSCRIBE byte = 0x08 TypeSUBACK byte = 0x09 TypeUNSUBSCRIBE byte = 0x0A TypeUNSUBACK byte = 0x0B TypePINGREQ byte = 0x0C TypePINGRESP byte = 0x0D TypeDISCONNECT byte = 0x0E ) MQTT Control Packet types const SUBACKRetFailure byte = 0x80 Return Code Failure Variables ¶ Error values Error value type CONNACK ¶
Home.Pi Reloaded - Home Automation with Ionic and MQTT
24/09/14 by Dennis Schulte 5 Comments Today I want to inform you about a new release of my home automation solution “Home.Pi”. First I want to apologize to all those whom I have not yet replied to their questions after the first post. Maybe the following article answers some of them and helps you to get it running on your own hardware or cloud service. The reason why I choose Ionic and MQTT is simple. To get it running just read the following instructions or go directly to Github for further and maybe updated instructions. 1. 2. 3. 4. 5. 5. 6. 7. As a next step you have to setup a device controller. Actually I am running the following controllers in my home: mqtt-exec (control switches with rc-switch) mqtt-zway (control thermostats and dimmers with Z-Wave) mqtt-temperature with Spark (not yet supported in the GUI) mqtt-google-calendar (schedule events with Google Calendar) Unfortenately there are only 3 device types supported at the moment (on_off, dimmer, thermostats). Example: Get a value
Help me for data binding - Ionic
Hi, I'm testing ionic for my app. My simple test is .. When MQTT data arrived periodically, the data on html page should be changed without user's page refreshing or reload. Contorller is And HTML is
Installing Mosquitto on a Raspberry Pi
I was talking to a friend, extolling the features and future of @OwnTracks, a project I talked about not so long ago. Said friend asked about where to place the MQTT broker, and I said "for example, on your home-server". He doesn't have one. Come to think of it, not many of my friends do, so here comes a small post on setting up an MQTT broker, specifically Mosquitto, on a Raspberry Pi, which most people can easily set up. The hardest bit is installing an OS, say, Raspbian Wheezy, onto an SD card, but there are many tutorials on how to do that. Roger Light, Mosquitto's creator has thankfully (!) curl -O sudo apt-key add mosquitto-repo.gpg.key rm mosquitto-repo.gpg.key cd /etc/apt/sources.list.d/ sudo curl -O sudo apt-get update Now we can go ahead and install Mosquitto proper. all three packages together require about 665Kb of space, which we can easily afford even on the tiny Pi.
Getting Started with MQTT and Clojure
About this guide This guide is a quick tutorial that helps you to get started with the MQTT protocol in general and the Machine Head in particular. It should take about 15 minutes to read and study the provided code examples. This guide covers: Installing an MQTT brokerAdding Machine Head dependency with Leiningen or MavenRunning a "Hello, world" messaging example that is a simple demonstration of 1:1 communication.Creating a "Twitter-like" publish/subscribe example with one publisher and four subscribers that demonstrates 1:n communication.Creating a topic routing example with two publishers and eight subscribers showcasing n:m communication when subscribers only receive messages that they are interested in. This work is licensed under a Creative Commons Attribution 3.0 Unported License (including images and stylesheets). What version of Machine Head does this guide cover? This guide covers Machine Head 1.0.0, including beta releases. Supported Clojure Versions Supported MQTT Brokers but not
How to handle XML services in AngularJS?
Related:
Related: