Main Content

Results for

Hi everyone,
I'm working on a school project where I need to send sensor data from my Arduino to a Power BI REST API using ThingsHTTP. I've been trying to get this to work, but I'm running into errors like this:
{"error":{"code":"InvalidRequest","message":"Error parsing request for dataset sobe_wowvirtualserver|a7b68fb5-533b-471f-a5da-3bdd6746ee16: Conversion error on column '<pi>pH</pi>': <pi>Input string was not in a correct format.</pi>"}}
I'm a beginner with this, and I'm not sure what I'm doing wrong. What steps should I take to resolve this issue? Also, does anyone know the correct format for an HTTP request body when sending dynamic sensor data?
This is the body format I'm trying to send to Power BI:
[
{
"pH": 98.6,
"TDS": 98.6,
"turbidity": 98.6,
"temperature": 98.6
}
]
Any advice on how to construct the HTTP body with values that change over time would be greatly appreciated! Thanks in advance!"
4 months ago, the new API was published to access content on the MATLAB Central community. I shared my MATLAB code to access the API at that time, but the team just released the official SDK.
Hello people,
I made a program to read a dataset from JSON and make an API request to Thingspeak (bulk_write).
After the transmission I display the response of the request, which is 202 (compliant data).
My data updates fine on my Thingspeak channel but the longitude and latitude fields do not change.
Do you have any explanation for this problem?
Here is the code:
import json
import requests
import time
apiKey = "xxxxxxxxxxxxxxxx"
channel_ID = "xxxxxxx"
url = "https://api.thingspeak.com/channels/" + channel_ID + "/bulk_update.json" # ThingSpeak server settings
message_buffer = []
message = {}
while True:
f = open("data.json", "r")
jsonContent = f.read()
objJson = json.loads(jsonContent)
message['delta_t'] = 15
message['field1'] = (objJson['GPS']['speed'])
message['field2'] = (objJson['GROVE'][3]['degNord'])
message['field3'] = (objJson['GIROUETTE']['degVent'])
message['latitude'] = str((objJson['GPS']['latitude']))
message['longitude'] = str((objJson['GPS']['longitude']))
message['elevation'] = 100
latitude = (objJson['GPS']['latitude'])
longitude = (objJson['GPS']['longitude'])
#print(latitude)
#print(longitude)
message_buffer.append(message)
bulk_data = json.dumps({'write_api_key':apiKey,'updates':message_buffer})
print(bulk_data)
message_buffer = []
request_headers = {"User-Agent":"mw.doc.bulk-update","Content-Type":"application/json","Content-Length":str(len(bulk_data))}
print(request_headers)
response = requests.post(url,headers=request_headers,data=bulk_data)
print (response) # Response 200 : Validated data / Response 429 : Too many request, please wait
print("_________________________________________")
print()
time.sleep(15)
My JSON file :
{
"GPS": {
"latitude": 48.75607,
"longitude": 2.30202,
"speed": 10.04384
},
"GROVE": [
{
"Compas": {
"x": 2.583,
"y": -4.439,
"z": 0.435
}
},
{
"Gyroscope": {
"x": 2.56433,
"y": -4.45352,
"z": 0.47237
}
},
{
"Acceleration": {
"x": 0.28,
"y": 0.01,
"z": 0.93
}
},
{
"degNord": 20.743
}
],
"GIROUETTE": {
"degVent": 30.46389
}
}
Hi all,
I am trying to create a complete learning unit online using laravel. The unit of work is in Internet of Things. Hardware will be provided to students - Its a microbit plus the DFRobot Environment science expansion kit (https://www.dfrobot.com/product-2194.html) . All the video tutorials and project work is assigned via the laravel lms.They will log into the lms via their microsoft logins.
My next step is to simplify the process of users accessing the mathworks account. I would like to pre assign channels for students with API keys to write sensor values from each of their microbit shields to the cloud.
Has anyone tried to do this or has any suggestions how to?
The advantages of students having their own channels on my account is for me to monitor how they are progressing. These are year 9 students at high school who have never done any IoT or mathworks/thingspeak related content before.
Good morning,
I'm working with an Arduino MKR 1010 which takes information about weather from the website "api.openweathermap.org". On a ThingSpeak dashboard I displayed the main numbers (float) information like: temperature, wind speed, humidity, etc. Moreover, from the openweathermap I can also get string sentence (e.g. "light rain" or "broken clouds" etc.). I'm wondering if there is a way to display on the ThingSpeak dashboard string fields. Indeed, in the ThingSpeak Channel Settings I added an extra Field in order to store these string words but I don't know how to print them in the dashboard.
Someone can help me?
Thanks in advance,
Lorenzo
Hello,
I need an endpoint to retrive my file with data from my channel. Do you think is this possible?
Notice that i do not want to press export data button, i want an endpoint to use in a personal project.
Thank you.

Hi, currently I am working on a dashboard that uses Thingspeak and Mendix. I am using a GaugeChart in Mendix and it receives data from Thingspeak. However, I have to refresh the page manually to see the new sensor values. One of my answers I got is that it is the Thingspeak that is not sending the data properly.

Long story short, he said that I have to expose API from Mendix which will produce a URL link (similar to Thingspeak API URL link) and in Thingspeak, I have to put that URL into Thingspeak. I have been looking around in Thingspeak and the closest thing that allows me to put an external URL is at ThingHTTP. However, we did not make use of ThingHTTP when communicating with our hardware and for Mendix, I only use Call rest API to receive data. Please help!