Merewether Weather, Merewether Tides and Solar Power Monitoring for Merewether, NSW, Australia - Newcastle Weather

Twitter Contact Login Search

Main

Node-Red Flow to take RAPT Webhook and push to mqtt

Date:
By Mangrove Mike
Categories: Brewing | Node-Red

Here is a webhook version of a Node-Red flow to take data from your RAPT devices and push to your MQTT server.

Need to do the following steps

  1. Set up your Node-Red Flow
  2. Define your Webhook in the RAPT Cloud Portal
  3. Enjoy Your Output

1. Set up your Node-Red Flow

Import this flow in and then you will need to do some configuration

  • Update your node-red end-point (the first node)
  • Configure your MQTT Broker/Server details.
  • Deploy your Flow

 

2. Define your Web hook in the RAPT Cloud Portal

  1. Under Your Account, go to Web Hooks
  2. Create a New Webhook

 

Payload

Put this into the Payload tab

{
   "device_id": "@device_id", 
  "device_type": "@device_type", 
  "device_name": "@device_name", 
  "temperature": "@temperature",
  "target_temperature": "@target_temperature",
  "temp_unit": "C", 
  "gravity": "@gravity",
  "gravity_unit": "G",
  "battery": "@battery",
  "rssi": "@rssi",
  "created_date": "@created_date"
}

Devices

Choose which of your RAPT devices to push data to the web hook.

 

 

 

That's it - wait a while and you should start to see some output. Use the Node Red debugging as required and your MQTT output should be like the following

 

house/rapt/oldyella/device_type Hydrometer

house/rapt/oldyella/device_name Old Yella

house/rapt/oldyella/temperature 2.74

house/rapt/oldyella/rssi -71.36363983154297

house/rapt/oldyella/created_date 2023-02-02T00:27:50.9223007+00:00

house/rapt/oldyella/gravity 1.0028

house/rapt/oldyella/battery 99.39

house/rapt/fatcontroller/device_id e4705650-4936-4081-ab67-13421324

house/rapt/fatcontroller/device_type TemperatureController

house/rapt/fatcontroller/device_name Fat Controller

house/rapt/fatcontroller/temperature 24.39

house/rapt/fatcontroller/rssi -16

house/rapt/fatcontroller/created_date 2023-02-02T00:27:50.9178816+00:00

house/rapt/fatcontroller/temperature 24.39

house/rapt/oldyella/device_id 31332048-7698-4231-b5e2-132r123r

house/rapt/oldyella/device_type Hydrometer

house/rapt/oldyella/device_name Old Yella

house/rapt/oldyella/temperature 2.89

house/rapt/oldyella/rssi -60.58333206176758

house/rapt/oldyella/created_date 2023-02-02T00:38:50.6513466+00:00

house/rapt/oldyella/gravity 1.0030

house/rapt/oldyella/battery 99.39

house/rapt/cellarfermentationchamber/device_id b4632792-6432-4353-9cc9-13243214

house/rapt/cellarfermentationchamber/device_type FermentationChamber

house/rapt/cellarfermentationchamber/device_name Cellar Fermentation Chamber

house/rapt/cellarfermentationchamber/temperature 3.05

house/rapt/cellarfermentationchamber/rssi -21

house/rapt/cellarfermentationchamber/created_date 2023-02-02T00:38:50.6476076+00:00

house/rapt/cellarfermentationchamber/temperature 3.05

house/rapt/oldyella/device_id 31332048-7698-4231-b5e2-34121234

house/rapt/oldyella/device_type Hydrometer

house/rapt/oldyella/device_name Old Yella

house/rapt/oldyella/temperature 2.95

house/rapt/oldyella/rssi -73.0999984741211

house/rapt/oldyella/created_date 2023-02-02T00:42:51.2066270+00:00

house/rapt/oldyella/gravity 1.0030

house/rapt/oldyella/battery 99.39

house/rapt/fatcontroller/device_id e4705650-4936-4081-ab67-12342314

house/rapt/fatcontroller/device_type TemperatureController

house/rapt/fatcontroller/device_name Fat Controller

house/rapt/fatcontroller/temperature 24.39

house/rapt/fatcontroller/rssi -16

house/rapt/fatcontroller/created_date 2023-02-02T00:42:51.2027961+00:00

house/rapt/fatcontroller/temperature 24.39