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
}
]
Ok.
Thanks for pointing that out.
I’ll try to make that more visible.
Is everything working as expected now?
Regards,
Sara