Author Topic: WeatherCat to MQTT (Mosquitto) Bridge  (Read 3269 times)

mangrovemike

  • Calm
  • *
  • Posts: 9
    • DW6277
    • INSWMERE2
    • Merewether Weather
  • Station Details: Davis Station Vantage Vue Pro
WeatherCat to MQTT (Mosquitto) Bridge
« on: October 30, 2012, 12:00:29 AM »
Hi folks,

I've just written a WeatherCat to MQTT bridge using the excellent WeatherCat Applescript interface.

MQTT allows lightweight publish and subscribe functionality and is used for process control, Arduino projects and lots of other fun things. The bridge I've written uses the open source MQTT tool Mosquitto (http://mosquitto.org) to publish the WeatherCat data.

It is pretty straightforward and can be found at GitHub (https://github.com/mangrovemike/WeatherCatMosquittoBridge).

The code was based upon the Applescript in the WeatherCat docs and can be customised to replace the call to the 'mosquitto_pub' to any OSX shell script or command.

Have fun,

Mangrove Mike





Quote
What is MQTT? (from http://mqtt.org)
MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging ?machine-to-machine? (M2M) or ?Internet of Things? world of connected devices, and for mobile applications where bandwidth and battery power are at a premium.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: WeatherCat to MQTT (Mosquitto) Bridge
« Reply #1 on: October 30, 2012, 05:45:55 PM »
Excellent - good stuff [tup]

Many thanks,
Stu.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Thank you!! (Re: WeatherCat to MQTT (Mosquitto) Bridge)
« Reply #2 on: October 30, 2012, 08:57:57 PM »
Dear Mangrove Mike, Stu, and WeatherCat fans,

Thank you for creating this bridge!! 

Glad to see more use of the AppleScript interface!!  [tup]

Cheers, Edouard  [cheers1]

mangrovemike

  • Calm
  • *
  • Posts: 9
    • DW6277
    • INSWMERE2
    • Merewether Weather
  • Station Details: Davis Station Vantage Vue Pro
Re: WeatherCat to MQTT (Mosquitto) Bridge
« Reply #3 on: November 01, 2012, 05:42:46 AM »
As usual, thanks Stu for great code and making the Applescript interface to WeatherCat so useful.

Mangrove Mike