• 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

6.5 – Monitoring GPIO States on InfluxDB

Q&A Forum › Category: Questions › 6.5 – Monitoring GPIO States on InfluxDB
0 Vote Up Vote Down
Roger Yacobucci asked 2 years ago

Page 264
Everything appears similar except that the change node doesn’t appear to change the (true, false) to a (1,0).
The table is showing true/false in the _value column instead of 0/1.  I am attaching the GPIO 4 flow

So I went back and I found that I hadn’t selected boolean for true/false and number for 0/1.  I change those and will let you know.

The influxdb doesn’t seem to be updating now.  I will add more later.

Still not updating.

OK so I went back and deleted the bucket and generated a new bucket with the same name  and new API.  Took only a few minutes to update the API in the flow modules.  Everything is now working.

It was my error however I would suggest calling attention to the boolean and number selections for the change nodes ion page 259.

Regards,

 

Roger

 

 

Start your code here

[
{
“id”: “3acd52e5ef854653”,
“type”: “ui_switch”,
“z”: “b34d6a4553d6361a”,
“name”: “GPIO 4”,
“label”: “GPIO 4”,
“tooltip”: “Controls GPIO 4”,
“group”: “df783b95ef08c596”,
“order”: 1,
“width”: 0,
“height”: 0,
“passthru”: true,
“decouple”: “false”,
“topic”: “topic”,
“topicType”: “msg”,
“style”: “”,
“onvalue”: “true”,
“onvalueType”: “bool”,
“onicon”: “”,
“oncolor”: “”,
“offvalue”: “false”,
“offvalueType”: “bool”,
“officon”: “”,
“offcolor”: “”,
“animate”: false,
“className”: “”,
“x”: 1140,
“y”: 380,
“wires”: [
[
“1052d26a7f789fda”
]
]
},
{
“id”: “1052d26a7f789fda”,
“type”: “mqtt out”,
“z”: “b34d6a4553d6361a”,
“name”: “GPIO 4”,
“topic”: “esp/digital/4”,
“qos”: “2”,
“retain”: “true”,
“respTopic”: “”,
“contentType”: “”,
“userProps”: “”,
“correl”: “”,
“expiry”: “”,
“broker”: “a58e9066e27837f8”,
“x”: 1280,
“y”: 380,
“wires”: []
},
{
“id”: “b9e234696e487f3a”,
“type”: “change”,
“z”: “b34d6a4553d6361a”,
“name”: “”,
“rules”: [
{
“t”: “change”,
“p”: “payload”,
“pt”: “msg”,
“from”: “true”,
“fromt”: “str”,
“to”: “1”,
“tot”: “str”
},
{
“t”: “change”,
“p”: “payload”,
“pt”: “msg”,
“from”: “false”,
“fromt”: “str”,
“to”: “0”,
“tot”: “str”
}
],
“action”: “”,
“property”: “”,
“from”: “”,
“to”: “”,
“reg”: false,
“x”: 1340,
“y”: 460,
“wires”: [
[
“37601fb815650463”
]
]
},
{
“id”: “37601fb815650463”,
“type”: “function”,
“z”: “b34d6a4553d6361a”,
“name”: “function 4”,
“func”: “msg.payload = [{\n state: msg.payload\n},\n{\n device: \”ESP32\”,\n gpio: \”4\”,\n room: \”office\”\n}];\nreturn msg;”,
“outputs”: 1,
“noerr”: 0,
“initialize”: “”,
“finalize”: “”,
“libs”: [],
“x”: 1520,
“y”: 460,
“wires”: [
[
“66ba62b82a44b936”
]
]
},
{
“id”: “66ba62b82a44b936”,
“type”: “influxdb out”,
“z”: “b34d6a4553d6361a”,
“influxdb”: “99c08344d755be87”,
“name”: “”,
“measurement”: “outputs”,
“precision”: “”,
“retentionPolicy”: “”,
“database”: “database”,
“precisionV18FluxV20”: “s”,
“retentionPolicyV18Flux”: “”,
“org”: “MyStuff”,
“bucket”: “Home”,
“x”: 1730,
“y”: 460,
“wires”: []
},
{
“id”: “fe6faac5e175e14a”,
“type”: “mqtt in”,
“z”: “b34d6a4553d6361a”,
“name”: “”,
“topic”: “esp/digital/4”,
“qos”: “2”,
“datatype”: “auto-detect”,
“broker”: “a58e9066e27837f8”,
“nl”: false,
“rap”: true,
“rh”: 0,
“inputs”: 0,
“x”: 1150,
“y”: 460,
“wires”: [
[
“b9e234696e487f3a”
]
]
},
{
“id”: “df783b95ef08c596”,
“type”: “ui_group”,
“name”: “Controls”,
“tab”: “89a08773fc0cc2ed”,
“order”: 4,
“disp”: true,
“width”: “6”,
“collapse”: false,
“className”: “”
},
{
“id”: “a58e9066e27837f8”,
“type”: “mqtt-broker”,
“name”: “”,
“broker”: “localhost”,
“port”: “1883”,
“clientid”: “”,
“autoConnect”: true,
“usetls”: false,
“protocolVersion”: “4”,
“keepalive”: “60”,
“cleansession”: true,
“birthTopic”: “”,
“birthQos”: “0”,
“birthPayload”: “”,
“birthMsg”: {},
“closeTopic”: “”,
“closeQos”: “0”,
“closePayload”: “”,
“closeMsg”: {},
“willTopic”: “”,
“willQos”: “0”,
“willPayload”: “”,
“willMsg”: {},
“userProps”: “”,
“sessionExpiry”: “”,
“credentials”: {}
},
{
“id”: “99c08344d755be87”,
“type”: “influxdb”,
“hostname”: “127.0.0.1”,
“port”: “8086”,
“protocol”: “http”,
“database”: “database”,
“name”: “Database”,
“usetls”: false,
“tls”: “”,
“influxdbVersion”: “2.0”,
“url”: “http://localhost:8086”,
“rejectUnauthorized”: false
},
{
“id”: “89a08773fc0cc2ed”,
“type”: “ui_tab”,
“name”: “A”,
“icon”: “dashboard”,
“order”: 2,
“disabled”: false,
“hidden”: false
}
]

3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Ok.
Thanks for pointing that out.
I’ll try to make that more visible.
Is everything working as expected now?
Regards,
Sara

0 Vote Up Vote Down
Roger Yacobucci answered 2 years ago

Yes everything is working.  Thanks Sara.
 
Regards,
Roger

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Great.
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

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.