Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

MQTT JSON + Adafruit IO
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

MQTT JSON + Adafruit IO

by Copy on Sat Feb 22, 2020 10:47 am

I found this app that can control MQTT-enabled lights, but it sends the brightness values is in a JSON format. Here is an example
Code: Select all | TOGGLE FULL SIZE
{
 "mqqt_dashboard":{
  "color":"#FFFFFF",
  "brightness": 100
 }
}

Can I make that work with Adafruit IO?
The app : https://play.google.com/store/apps/deta ... tdashboard

Copy
 
Posts: 2
Joined: Sat Feb 22, 2020 10:41 am

Re: MQTT JSON + Adafruit IO

by Copy on Sun Feb 23, 2020 6:06 am

UPDATE:
I found out that I need to send "value" not "brightness"
Is there any way to change that

Copy
 
Posts: 2
Joined: Sat Feb 22, 2020 10:41 am

Re: MQTT JSON + Adafruit IO

by brubell on Tue Feb 25, 2020 9:50 am

Copy wrote:UPDATE:
I found out that I need to send "value" not "brightness"
Is there any way to change that

Adafruit IO Feeds use the following JSON format:

Code: Select all | TOGGLE FULL SIZE
{
  "id": "string",
  "value": "string",
  "feed_id": 0,
  "feed_key": "string",
  "created_at": "datetime",
  "location": {},
  "lat": 0.0,
  "lon": 0.0,
  "ele": 0.0,
  "created_epoch": 0,
  "expiration": "datetime"
}


You may want to contact the application developer to see if it's possible to edit the JSON from the application, before it's sent to Adafruit IO.

brubell
 
Posts: 792
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.