We're surrounded by things that can be measured, and that measurement data can be used, whether it's the temperature of your fridge, the amount of water you've used today, the amount of electricity you've used in the past hour, the temperature of your fish tank, how many people have walked past your house, how many times your home phone has rung whilst you were out etc etc. All of this data can be used for something. MQTT is the protocol that will allow you to do something with that data.
Now without a source of data, it can be hard to grasp what can be done. Luckily there's a broker running at test.mosquitto.org that will provide you with a large stream of topics, and data to watch flowing. That site also tells you how to subscribe to the broker using the mosquitto_sub client using both Linux and Windows.
There are a vast amount of topics available, and there's a list available at test-mosquitto.heroku.com which is an mqtt to web bridge for test.mosquitto.org. Each of the topics listed there will give you the last message listed under that topic.
Now using that vast list of topics it's possible to experiment with them and try to get only the specific information you want. For example,
mosquitto_sub -h test.mosquitto.org -t \energy/# -vWill provide only the energy topics, and
mosquitto_sub -h test.mosquitto.org -t energy/generation/realtime/wind/# -vshould provide all of the realtime wind data. Of course, what you do with this data is another matter entirely. Put it in a database, make some funky web page out of it, mash the figures into another person's for comparison, the list is limited by your imagination.
Once you've had a ponder on that, consider the fact that you can also send mqtt messages that would be able to turn the heating up/down at home, open your garage door automatically when you get close enough, turn your porch light on, again the list is endless.
No comments:
Post a Comment