• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

How to Publish sensor with JSON

Q&A Forum › Category: ESP32 › How to Publish sensor with JSON
0 Vote Up Vote Down
Haris Maulana asked 1 year ago

Hi Sir this Smart-Home-eBook. How to Publish format JSON ?
Module 5_2

4 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Just format your message as a json object, and then stringify.
You can use a simple library like https://github.com/arduino-libraries/Arduino_JSON
 
Or something more advanced like this: https://arduinojson.org/
 
Regards,
Sara

0 Vote Up Vote Down
Haris Maulana answered 1 year ago

yes, i like this.
how to modif in sample code in module ebook smart home?
please

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

What data do you want to send?

0 Vote Up Vote Down
Haris Maulana answered 1 year ago

i want to send data like this: 
{
“VAC”: 220.6,
“IAC”: 0,
“PAC”: 0,
“EAC”: 1.343,
“PFAC”: 0,
“BV2”: 26.09,
“BI2”: 0,
“SOC2”: 32,
“CS2”: “Not Chg”,
“BS2”: “Under”,
“PV2”: 0,
“PI2”: 0,
“PP2”: 0,
“PE2”: 0,
“PEM2”: 12.61,
“BV1”: 26,
“C1”: 3.249,
“C2”: 3.251,
“C3”: 3.252,
“C4”: 3.249,
“C5”: 3.253,
“C6”: 3.252,
“C7”: 3.252,
“C8”: 3.251,
“BI1”: -0.72,
“BT1”: 29.7,
“BT2”: 27.9,
“LONG”: 0,
“LAT”: 0,
“JAR”: 0,
“TIME”: “20:42:24 29/02/2024”
}

and a lot more data.
Please help me

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.