[Legacy] IOT & MQTT Support

Post Reply
User avatar
Dave
Site Admin
Posts: 70
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

[Legacy] IOT & MQTT Support

Post by Dave » Sun Dec 20, 2015 9:54 pm

Original post by: Chris

Hi
Been playing around with Internet Of Things (IOT) using MQTT. Would be great to have TC have an MQTT Interface Host so buttons could publish/subscribe to topics.
September 21, 2015 at 2:58 PM Edit Delete Flag Quote & Reply

Dave Arnold
Site Owner
Posts: 681
Hi Chris. I'm not familiar with MQTT, so just curious what types of things you would like to do with it via TC, or what it would enable you to do?

Is there a JavaScript interface to MQTT? If there is, I'd be surprised if you couldn't already use MQTT inside TC today.
September 22, 2015 at 7:13 AM Edit Delete Flag Quote & Reply

Chris
Limited Member
Posts: 6
Hi Dave
This was copied from mqtt.org....
MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. For example, it has been used in sensors communicating to a broker via satellite link, over occasional dial-up connections with healthcare providers, and in a range of home automation and small device scenarios. It is also ideal for mobile applications because of its small size, low power usage, minimised data packets, and efficient distribution of information to one or many receivers
It maybe that There is a sort of work around ? I will have a play when I get some spare time.
Basically you have a broker, it can be cloud based like cloudmqtt or running locally on any platform.
I run "mosquitto" on a raspberry pi, as it is very reliable and as it needs to run 24/7, very low power consumption. It has been running a couple of months now with no problems.
Devices can Publish data to a " Topic" and other devices that are subscribed to the same topic will receive that data.
It may be possible to publish data from TC already, Http, Event trigger??? But I don't know how you would send to a certain topic. And a feedback listener would "Subscribe/listen" for data.
Touch Control already works very similar to this. You press a button and it sends data to a specified device, and the Feedback listener listens for data coming from that device. So instead of it being a " device" it needs to be a "Topic"
all data is sent via the broker, in most cases port 1883.
maybe there isn't a great demand for MQTT from people using TC at the moment, but as Internet of Things gets bigger and smart homes become common place, it looks like this is going to be the protocol of choice!
Chris
September 23, 2015 at 5:09 PM Edit Delete Flag Quote & Reply

Midnight
Limited Member
Posts: 78

I looked at MQTT briefly.

You can easily send and receive device commands from TC now, but interaction with a broker would be preferable. Exactly what this interaction might be depends on the controlled devices. TC could help if there was an application or location level, rather than an activity level interaction with the broker. At the TC application level, one could subscribe to events of interest. Whenever focus is given to the application, TC could check in with the broker. I'm not familiar enough with MQTT to know if brokers are generic or each is a custom device with custom interactions.

Overall, I don't like the idea of a pad/phone being the primary controller of anything important because the pad/phone can be away, asleep, distracted, out of range, etc. and control is not positive. Direct control of non critical items, such as TV's, Blu-ray's, etc. or setting lighting mood, are OK, but critical control of even simple things such as turning a light on at dusk cannot be assured unless there is an independent controller, "broker" if you like, on the network.
September 24, 2015 at 6:20 AM Edit Delete Flag Quote & Reply

xAPPO
Limited Member
Posts: 1
I use MQTT (Mosquite/Pi) in a small way for my home automation system currently. I do however intend to expand on that when I can find the time as it is proving exceptionally robust and useful in ways I keep discovering.

One of the useful aspects for 'ad hoc' clients like Touch Control is that they can connect and get the latest state of various topics (devices) all from one place rather than having to interrogate each device every time. This assumes of course your devices are publishing their state via an MQTT broker. The topics can be updated by 'ad hoc' devices too, for example your location from a mobile phone, so it's a good way to get all devices synchronsed with their last know states.

If you buy into the MQTT model for a home automation system then you need to do quite a bit of work to fully integrate everything to get the real benefit- unless you are just using it for some extra IOT information sources. As Midnight says for any useful control application you'll need a 24/7 controller of some sort which TC is not really purposed for (although I have somewall panels running TC 24/7).

I haven't tried an MQTT connection from TC but it should be very do-able as TC is very capable in this area , and there are Javascript client examples available. I'll watch this topic with interest to see how you get on.

Post Reply