Chris Nas in MATLAB Answers
Letzte Aktivitätam 19 Apr. 2024

Hey, I am currently programming something in ArduinoIDE for an ESP8266 to read my sensor data that is already uploaded to TS. For this, I use the function: ThingSpeak.readMultipleFields(CHANNELID,READKEY). Unfortunately, I found that the server no longer returns the correct data. Here some debug Log from the Arduino library right after caling ThingSpeak.readMultipleFields(CHANNELID,READKEY): ts::readRaw (channelNumber: 13xxxxx readAPIKey: H89OOxxYFXxxxxxx suffixURL: "/feeds/last.txt?status=true&location=true") Connect to default ThingSpeak: api.thingspeak.com:80...Success. GET "/channels/13xxxxx/feeds/last.txt?status=true&location=true" Got Status of 200 Content Length: 210 Found end of header Response: "{"created_at":"2021-04-06T20:25:06Z","entry_id":5,"field1":null,"field2":null,"field3":null,"field4":null,"field5":"27.82000","field6":"28.96680","latitude":null,"longitude":null,"elevation":null,"status":null}" Read: "{"created_at":"2021-04-06T20:25:06Z","entry_id":5,"field1":null,"field2":null,"field3":null,"field4":null,"field5":"27.82000","field6":"28.96680","latitude":null,"longitude":null,"elevation":null,"status":null}" disconnected. As you can see, field 4 returns "null". When reading the same Channel and field with the function: ThingSpeak.readFloatField(CHANNELID,FIELD ID,READKEY) I get: ts::readStringField(channelNumber: 13xxxxx readAPIKey: H89OOxxYFXxxxxxx field: 4) ts::readRaw (channelNumber: 13xxxxx readAPIKey: H89OOxxYFXxxxxxx suffixURL: "/fields/4/last") Connect to default ThingSpeak: api.thingspeak.com:80...Success. GET "/channels/13xxxxx/fields/4/last" Got Status of 200 Content Length: 8 Found end of header Response: "29.94141" Read: "29.94141" disconnected. And this is the right value. Im using the latest Version from TS arduino Library. I already opend an issue on Github but there is no reaction on it. https://github.com/mathworks/thingspeak-arduino/issues/80 Does anyone have any ideas? Greetings!

Info zu ThingSpeak

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.