Update arduinojson

Add help about ucs iot post
This commit is contained in:
Martijn Scheepers
2022-08-10 16:01:19 +02:00
parent 718200cec1
commit 031b2bde54
5 changed files with 25 additions and 6 deletions

View File

@@ -3,5 +3,8 @@
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

12
H1602_WSEN.code-workspace Normal file
View File

@@ -0,0 +1,12 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"files.associations": {
"functional": "cpp"
}
}
}

View File

@@ -46,7 +46,7 @@
<tr>
<td>Rustig knipperen</td>
<td>Rustig knipperen</td>
<td>Kan geen verbinding maken met de ingestelde Node-RED` server</td>
<td>Kan geen verbinding maken met de ingestelde Node-RED server</td>
</tr>
<tr>
<td>Snel knipperen</td>
@@ -76,7 +76,10 @@
<li>Potentiaal vrij contact, hier kan direct een schakelaar op worden aangesloten</li>
<li>Potentiaal vrij contact, hier kan direct een schakelaar op worden aangesloten</li>
</ol>
<h4>UCS IOT gebruik</h4>
<p>
Gebruikt voor de url http://192.168.0.141 dus MET http://
</p>
</div>
</div>
</body>

View File

@@ -16,7 +16,7 @@ board_build.f_cpu = 160000000L
framework = arduino
lib_deps =
https://github.com/me-no-dev/ESPAsyncWebServer.git
bblanchon/ArduinoJson@^6.18.0
bblanchon/ArduinoJson@^6.19.4
monitor_speed = 115200
check_tool = cppcheck, clangtidy
check_skip_packages = yes

View File

@@ -21,7 +21,7 @@ void noderedServerUpdate()
jsonBuffer["version"] = String(GIT_REV);
jsonBuffer["serial"] = getEeprom()->serialnumber;
JsonObject channels = jsonBuffer.createNestedObject("channels");
JsonObject channels = jsonBuffer.createNestedObject("channels");
for (int i = 1; i < INPUT_CHANNELS; i++)
{
if (getEepromChannel(i)->enable)
@@ -57,8 +57,7 @@ void noderedServerUpdate()
http.addHeader(F("Content-Type"), F("application/json")); //Specify content-type header
int httpCode = http.POST(JSONmessageBuffer); //Send the request
String payload = http.getString(); //Get the response payload
http.end(); //Close connection
String payload = http.getString(); //Get the response payload
#ifdef DEBUG_MSG
Serial.print(F("httpCode = ")); //Print HTTP return code
@@ -67,6 +66,8 @@ void noderedServerUpdate()
Serial.println(payload); //Print request response payload
#endif
http.end(); //Close connection
if (httpCode == -1)
{
noderedErrorFlag = true;