Main Content

Results for

Louis
Louis
Last activity on 6 Jan 2023

Accidentally clicked on the "X" and field 1 chart disappeared. How do I recall the chart ?

Hi,
I'm trying to send data from a LoRa Node to the dragino Lg01-N gateway and then to the thinkspeak platform. Actually, the data arrives to the gateway and i get the following result read from the gateway
but the value does not reach the thingspeak platform.
on the other side i tried to send the data manually from the gateway using the following command
and the data is written successfully at the thingspeak. In this link we set the topic -t as channels/XXXXX/publish. but at the first figure the topic which is sent automatically from the gateway to the thingspeak is channels/XXXXX/publish/APIkey
i think the problem is here. i don't know how to change the form of the topic received by the gateway and sent to the thingspeak...is it possible to modify that? i tried to modify the mqtt_process.sh file, but all my changes do not make anny effect on the received packet from the lora node.
could you help me please to resolve this problem?
thank you in advance
Hello, I need help with a simple example. I am trying to do a simple bulk update using JSON in Javascript, using this parm, header and body:
$.post("https://api.thingspeak.com/channels/xxxxxxxxx/bulk_update.json" ,{
"Content-Type": "application/json",
"write_api_key" : "xxxxxxxxxxxxxxxx",
"updates": [
{
"created_at": "2022-12-30 10:26:2 -0800",
"field1": 100,
"field2": 100,
"field3": 200,
"field5": 600
},
{
"created_at": "2022-01-12 10:27:2 -0800",
"field2": 100,
"field3": 200,
"field5": 600
}],
function(data){
console.log(data) // log anything returned to the console
}
});
When I run the above (Mac OS, Chrome, Javascript) I receive this error message:
Access to XMLHttpRequest at 'https://api.thingspeak.com/channels/1283582/bulk_update.json' from origin 'https://backpaqlabs.com'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
api.thingspeak.com/channels/1283582/bulk_update.json:1
Failed to load resource: net::ERR_FAILED
Is there something wrong with the syntax or JSON payload that can cause this CORS error? I have tried both local command line and from my hosted server. I am starting to see CORS errors with Javascript getJSON calls as well, so wondering if there is something going on at the endpoint. In this example, I have literally taken it from the example in the doc, so I assume it should comply with the API endpoint. Does seem to work OK with same code on Postman and CURL, so I believe syntax is correct. Ideas?
Any help appreciated!
Hi there,
I am attempting to obtain a location history (thus the location of each of the previous messages recived) and the current location of my device on Thingspeak. I have not found any examples of how to do this on Thingspeak. Please may someone guide me or advise me on how to do this.
Thank you
When making a ThingHttp request via POST, the server response header does not include: "Content-Length:". Instead it is using "Transfer-Encoding: chunked". This makes it dificult to confirm that the entire response has been recieved. Any way to change this?
21:09:55.812 -> POST /apps/thinghttp/send_request HTTP/1.1
21:09:55.812 -> Host: api.thingspeak.com
21:09:55.812 -> Content-Type: application/x-www-form-urlencoded
21:09:55.812 -> Content-Length: 60
21:09:55.812 ->
21:09:55.812 -> headers=false&api_key=[removed]&message=Arduino Reset
21:09:55.906 ->
21:09:57.040 ->
21:09:57.040 ->
21:09:57.040 -> HTTP/1.1 200 OK
21:09:57.040 -> Date: Thu, 15 Dec 2022 02:09:57 GMT
21:09:57.040 -> Content-Type: text/html; charset=utf-8
21:09:57.040 -> Transfer-Encoding: chunked
21:09:57.040 -> Connection: keep-alive
21:09:57.040 -> Status: 200 OK
21:09:57.040 -> Cache-Control: max-age=0, private, must-revalidate
21:09:57.040 -> X-Request-Id: 798bbb62-da97-4ff8-a15b-c60b68fd60d3
21:09:57.040 -> ETag: W/"408e73c03e9c23fc2318c396c21c09e8"
21:09:57.040 ->
21:09:57.040 -> 2d
21:09:57.040 -> Congratulations! You've fired the alert event
21:09:57.040 -> 0
21:09:57.040 ->
I am trying to send data to a channel using thingspeak writefield and I keep getting an error no matching function... On reading the documents I am having a problem with "Write key". I can find no info on write key. what is it?
Hi there, I have been attempting to try and access the loaction of my device using the following code:
myChannel=*******;
ReadAPIKey='xxxxxxxxxxxx';
myData=thingSpeakRead(myChannel,'ReadKey', ReadAPIKey,'numpoints',100,'outputformat','timetable','location',1);
myVector=(myData.Latitude).^2+(myData.Longitude).^2+myData.Altitude.^2;
maxVector=max(myData.Latitude)^2+max(myData.Longitude)^2+max(myData.Altitude)^2;
myVector=myVector/maxVector;
myMap=geoscatter(myData.lat,myData.long,15,myVector,'filled');
geobasemap('satellite');
colormap jet;
I have about 100 entry points at this stage. However, i get the following error:
Error using .
Unrecognized table variable name 'lat'.
Error in Custom (no starter code) 2 (line 7)
myMap=geoscatter(myData.lat,myData.long,15,myVector,'filled');
I am attempting to access the location of a moving device. Meaning, the longitude and latitude values will be constantly changing, thus, I do not want to set my latitude or longitude value as a constant but i want it to keep on updating as my device moves around. How would I do this? How would I ammend this error without setting the "lat" or "long" as a consant before hand?
Further, my device should be constantly sending messages, this, the number of entries to which it will see the location of will be contantly changing. How can I thus not set the entry points as a specific value but rather have it update as my device sends messags?
Is there an easier or better way to do this?
Thanks
Hello, I have a some problem with my OneWire communication and ThingSpeak (ESP8266). Quiet often I have got -127 value, but everything with connections should be OK. I have a free license a TS and two channels in my account. I think that this piece of code may be problem:
void loop()
{
readKWHMeterPC();
readKWHMeterHeat();
read3WayValve();
digitalWrite(POWER_LED, LOW);
if ((millis() - lastTimeLoop) >= DELAY_TIME_LOOP){
readTemperatures();
calcenergyPC();
calcenergyHeat();
avgpowerPC(); // nie liczy w pierwszym przebiegu pracy dokładnie i w ostatnim, bo niekoniecznie jest załączenie/wył. równą minutę przed wysłaniem na TS -> w efekcie liczy moc z mniejszej ilości impulsów niż normalnie w ciągu minuty jest przy stałym obciążeniu
avgpowerHeat();
write2TSDataCH1( CH1channelID , CH1dataFieldOne , valveState , CH1dataFieldTwo , meterPulsesPC, CH1dataFieldThree, energyPC, CH1dataFieldFour, meterPulsesHeat , CH1dataFieldFive ,energyHeat, CH1dataFieldSix , powerPC, CH1dataFieldSeven, powerHeat );
write2TSDataCH2( CH2channelID , CH2dataFieldOne , tempC1 , CH2dataFieldTwo , tempC2, CH2dataFieldThree, tempC3 );
lastTimeLoop = millis();
}
Can I send data to TS to 2 channels in the same time or not?
Hi, I want to collect the simulation data by using NASA HL-20 model, then the data will transmit to ThingSpeak. However, I don't have the block for ThingSpeak Channel at the Simulink Library Browser. Is it because the block has its own version of simulink (meaning I have to update my version) or is there any else that I don't know? Besides, can you suggest which methods are suitable for me to successfully transfer the simulation data to ThingSpeak?
We have to create a few 10s of channels all with the same public view and settings. Is there any way of automating this ?
Doing it manually is time consuming and results in omissions and small mistakes.
Hi there, I am trying to reach out to anyone who has successfully completed the project of building a weather station using an Arduino MKRFOX1200 board, a dht11 sensor across the Sigfox and Thingspeak networks. I’ve been attempting to build the weather station over the SigFox and things.io network for over a year now but I was unsuccessful. I then found this tutorial on how to build this using Thingspeak: https://create.arduino.cc/projecthub/masteruan/arduino-mkr-fox-1200-sigfox-meteo-station-423609 . I have now been attempting to build it using this network but am still unsuccessful.
My SigFox and arduino is working. I made the arduino code convert temperature to Celsius (rather than Kelvin which is what the tutorial does). However, I am unable to access the location of the device on Thingspeak (my SigFox atlas is activated) and I am getting humidity values of approximately -30k. Please may someone assist me or give me a detailed approach on how to fix these issues. My goal is to have my thingspeak like this: https://thingspeak.com/channels/227248. I have followed the tutorial and projecthub but I cannot figure out why I am obtaining a confusing humidity reading. Please please may someone help.
Thank you so much for your time.
hello, how i can show module image in to public view.
in widget public dont show the option.
exist any code for MATLAB?
hello, i buy a license for upload images to channel and ESP32CAM, after compile and upload the example code, then reset the esp32.
the serial monitor only show
Brownout detector was triggered
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4
i have another code working for esp32cam and send image to telegram... maybe any can show why works there and not here please.
here the config
Hello, I need help with this code to show the longitude and latitude from the neo6m module. When the map is displayed, it looks very close. How can I fix it?
It is for a university project I hope you can help me thanks
code:
lat = thingSpeakRead(1962341,'Fields',3,'ReadKey','ZHIVMUHTJXI4xxxx','NumPoints',10,'Timeout',50);
lon = thingSpeakRead(1962341,'Fields',4,'ReadKey','ZHIVMUHTJXI4xxxx','NumPoints',10,'Timeout',50);
geoscatter(lat,lon,'h');
geobasemap('satellite');
Hello!
The fields sometimes will update most of the times but not always. The Serial monitor shows the following output when it does not update:
while when it update it shows the following:
There is no issue with the update rate since it is more than 15 seconds.
Iam using a feather fona and the chunk of the code Iam using to send the data is the following:
if (gprsSerial.available())
Serial.write(gprsSerial.read());
gprsSerial.println("AT");
delay(1000);
gprsSerial.println("AT+CPIN?");
delay(1000);
gprsSerial.println("AT+CREG?");
delay(1000);
gprsSerial.println("AT+CGATT?");
delay(1000);
gprsSerial.println("AT+CIPSHUT");
delay(1000);
gprsSerial.println("AT+CIPSTATUS");
delay(2000);
gprsSerial.println("AT+CIPMUX=0");
delay(2000);
ShowSerialData();
gprsSerial.println("AT+CSTT=\"internet\"");//start task and setting the APN,
delay(1000);
ShowSerialData();
gprsSerial.println("AT+CIICR");//bring up wireless connection
delay(3000);
ShowSerialData();
gprsSerial.println("AT+CIFSR");//get local IP adress
delay(2000);
ShowSerialData();
gprsSerial.println("AT+CIPSPRT=0");
delay(3000);
ShowSerialData();
gprsSerial.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\"");//start up the connection
delay(6000);
ShowSerialData();
gprsSerial.println("AT+CIPSEND");//begin send data to remote server
delay(8000);
ShowSerialData();
delay(4000);
gprsSerial.println(str3);//begin send data to remote server
delay(8000);
ShowSerialData();
delay(6000);
gprsSerial.println((char)26);//sending
delay(6000);//waitting for reply, important! the time is base on the condition of internet
gprsSerial.println();
ShowSerialData();
gprsSerial.println("AT+CIPSHUT");//close the connection
delay(3000);
ShowSerialData();
delay(3000);
}
Thank you in advance!
Using a Thingspeak42 node with NodeRed on a RaspberryPi 4. The node is showing data is being sent but nothing gets populated on graph in Thingspeak.
I would like to have a widget to control a pump connected to Thingspeak via Talkback. I have also established a connection with thingspeak where I publish my sensor data to the channel and can visualize the data through the various widgets. But I cant find a widget or method to control the pump from a graphical perspective on the channel (like a switch or button interface where clicking them would turn the pump on or off). Thingsboard seems to have the feature, not sure of thingspeak. If anyone knows a way please do comment out. Have a great day!
Martin
Martin
Last activity on 29 Nov 2022

Hi,
I use micro:bit and iot:bit to collect data about temperature and humidity (via BME 280, but I cant connect with ThingSpeak, but Iam connected on wifi.
What I make wrong?
Hi all
Learning home automation and found your webpage via cookbook sample code, which I cannot get work, i.e. sending a tweet. Somehow API keys should be OK as I got another sample from your page (bulkdata upload with Raspi) working just fine
Code seem to run and response is OK 200, am I just missing how to check this from twitter or? if I change API key to xxx response is 400 so
import time, os
import requests
MAX_TEMP = 19.0
MIN_T_BETWEEN_WARNINGS = 1 # Minutes
BASE_URL = 'https://api.thingspeak.com/apps/thingtweet/1/statuses/update/'
KEY = 'xxx'
def send_notification(temp):
status = 'Thingtweet: Room getting hot. room temp=' + str(temp)
data = {'api_key' : KEY, 'status' : status}
response = requests.post(BASE_URL, json=data)
print(response)
print(data)
def room_temp():
f = open('/mnt/1wire/28.55CA95F0013C/temperature','r')
room_temp = f.read()
return float(room_temp)
while True:
temp = room_temp()
print("room Temp (C): " + str(temp))
if temp > MAX_TEMP:
print("room TOO HOT!")
send_notification(temp)
print("No more notifications for: " + str(MIN_T_BETWEEN_WARNINGS) + " mins")
time.sleep(MIN_T_BETWEEN_WARNINGS * 1)
time.sleep(10)