Carsten in Discussions
최근 활동: 2023년 6월 6일

Hi all, I am so far on a free account. I have setup 1 channel. I am sending 3 values from a bitShake SmartMeterReader every 20 seconds to this channel. When trying to send additional data from my solar inverter every 5min! and calculate some data coming from my bitShake (e.g. once per hour) and send it back to the channel I receive the following error: Requests are too frequent. For further information, see Limitations in the documentation. Now I understand that my messages (write orperations) to my channel are limited to 3 Mio / year or 8200/day. With my current setup I am at little more than 4K messages per year and since I just recently started my account I have still 2.840.531 messages left. How come I get that error even if I switch even if my message limit is far from reached? Thanks in advance for your time! Much appreciated! Requests are too frequent. For further information, see Limitations in the documentation. Can you show a sample of the code where you are writing to ThingSpeak? You would not get the 429 error (requests too frequent) from overuse of messages, so I would guess that you may be sending messages faster than you think somehow. Hi, thank you for your response. The first code basically imitates the 2.8.0 (Einspeisung) of my solar power. I receive the value every 30 seconds. If it is negative I calculate the watt seconds (basically assume the value was constant fopr the last 30 seconds). After that I transform it into kWh and write it back to the channel once per hour via TimeControl. % Definieren Sie den gewünschten Zeitraum startDate = datetime('today'); % Startdatum endDate = datetime('now'); % Aktuelles Datum % Daten vom Stromverbrauch im gewünschten Zeitraum abrufen consumptionTotal = thingSpeakRead(stromzaehlerChannelID, 'ReadKey', readAPIKey, 'Fields', 2, 'DateRange', [startDate, endDate]); %disp(size(consumptionTotal)); % Rufen Sie die Funktion zur Berechnung des Energieverbrauchs auf energyConsumption = calculateEnergyConsumption(consumptionTotal); % Zeigen Sie das Ergebnis an disp(energyConsumption); thingSpeakWrite(writeChannelID,energyConsumption,'WriteKey',writeAPIKey, 'Fields', 6); function energyConsumption = calculateEnergyConsumption(data) timeInterval = 30; % Zeitintervall in Sekunden % Initialisierung der Summe totalEnergy = 0; % Durchlaufen der Datenpunkte for i = 1:length(data) %disp(['data:',data(i)]); if data(i) < 0 % Überprüfung auf Negativität energy = data(i) * timeInterval; % Berechnung der Energie in Wattsekunden totalEnergy = totalEnergy + energy; % Summierung der Energie %disp(totalEnergy); else %disp(int2str(data(i))); end end energyConsumption = totalEnergy / 7200000; % Umrechnung in Kilowattstunden end The second code is simply receiving data from my Solax Inverter. Also via TimeControl every 10 minutes api_url = 'https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=XXXXXXXXXXXXXX&sn=XXXXXXXXXX'; api_call = webread(api_url) writeChID = 1234567; writeAPIKey = 'XXXXXXXXXXX'; res = struct(api_call.result) acpower = res.acpower yieldtoday = res.yieldtoday getData = thingSpeakWrite(writeChID, [acpower,yieldtoday],'Fields',[4,5],'writeKey',writeAPIKey); *sorry for the DE comments Thats a good start, but the code you have shown has no delay or timing information in it, so I am unable to estimate how often the writes are happening. You do mention that you are writing back to the same channel, that may possibly be a source of overwriting. I suggest using a seperate channel for the derived information. Can you show how you determine when (or how often) to write to thingspeak? Hi @Christopher Stapels, as mentioned I am using the "TimeControl" function ("Every 10 Min" & "Every 1 hour(s)). I already played aroundn with these settings but no improvement. I am new to MATLAB so I was under the impression that this is some kind of scheduler to run the script and it is being written to the channel once per script run? I would encourage you to use more descriptive names for your TimeControls. It is clear you are running the TimeControl every 10 minutes, but I think the code you wrote may be writing to a ThngSpeak channel more than once very time it is run. That could lead to the error you are seeing. Perhaps you could share the full text of the code that you selected to be run by the TimeControl? (feel free to redact api keys and channel id's) That is the full code...First one runs every hour, second one every 10 minutes.... Will name more descriptive though :-) First script only misses the channel definitions % ThingSpeak Channel-ID für den Stromverbrauch stromzaehlerChannelID = 1234567; % Ersetzen Sie dies mit Ihrer tatsächlichen Channel-ID für den Stromverbrauch % ThingSpeak Authentifizierungsschlüssel readAPIKey = 'XXXXXXXXXX'; % Ersetzen Sie dies mit Ihrem tatsächlichen Lese-API-Schlüssel writeAPIKey = 'XXXXXXXXX'; writeChannelID = 123456789; Here is my usage so far.. So both scripts have writes to channel in them. One runs every hour. When it runs, the 10 minute code is also run. Our servers are very fast, so they are running both scripts within 15 seconds, thus you are writing to the same channel twice in under 15 seconds. This is not allowed with a free license. Thus the "requests are too frequent" error message. Things you can do to fix it: Change the second time (60 minutes) to a prime number. Use two different channels to write to (or more ) Change the run time to "fuzzy" Which will work most of the time but may still randomly overlap and cause the error occasionally. other, more complicated fixes @Christopher Stapels Thanks a lot. I have now changed (combination of 1 & 3). Now when you say it it makes total sense that it is highly possible that the three write operations will conflict each other when only one write operation is allowed every 15 seconds. Will observe it not and see if it improved. Thanks again! limitations free messages
rafihath saleh in Discussions
최근 활동: 2022년 5월 16일

I wanted to ask of 3M messages of thingspeak free account will renew every year? Thank You Thingspeak free 3M messages renewal each year. Take a look at the <https://thingspeak.com/pages/license_faq License FAQ> that answers your question and some more. Hi unfortunately I could nt get the correct answer from License FAQ. I am still unsure if the 3M messages free account get will renew everyyear? In other words, will free account expire after you use 3M messages or you can another 3M messages after a year if you have used it up. Thank you. Messages will renew annually for free accounts. thingspeak account renewal free
GnF in MATLAB Answers
최근 활동: 2019년 10월 23일

Hello, I am using thingspeak for a personal non-profit project i build with my son so he can get into this world. Basically we builded a small weather station that collects data locally from a weather website and uploads them here. Since we started uploading more data (changed how frequently, from every 5 minute to one minute uploads) i wanted to see if i calculated the number of uploaded messages per day correct. So right now i am uploading 7150 messages (more or less) per day and that is in the plan. But above that i saw this Expiration Date: 04 Dec 2019 Does that mean that this account will be locked after that date? I am asking because we have put a lot of work and effort on this project, and on this account we have connected a website that collects the data and visualises them in a way we like. Should i start somehow migrate to a new account? can i transfer the data from this account to another? Are there any steps we can do to avoid the expire? Thanks in advance.
P McD in MATLAB Answers
최근 활동: 2019년 10월 21일

Similar to https://uk.mathworks.com/matlabcentral/answers/480414-thingspeak-expired-license-message-upload-stopped-working My uploads stopped working, created Mathworks account as requested and linked, expiry seems to have changes to Dec 4th but uploads still not working. Can;t find any way to re-enable myself. Can I get them re-enabled please? What happens on December 4th? P
MR Smith in MATLAB Answers
최근 활동: 2019년 9월 11일

I am trying to share some data which is acquired real time so that I can add to a web page. So I got this working: This is acquired from my battery tester and has about 27026 records accumulated in a table with 4 columns. The Home license for ThingSpeak was setup an hour ago, but made no difference in the size of jj which allows the thingSpeakWrite operation to succeed. Do I need to wait a day? The Account counter doesn't show I have used any significant amount of daliy messaging space. I have been changing the datetime("2019-MM-DD") so that there won't be duplicate entries, and repeatedly cleared the channel storage. Thanks for any suggestion where I am hitting a limit that isn't greater in Home license than Free license on ThingSpeak.mathworks.com, Best, Mark @W4CHL % Send data to Grinspector test channel via thingSpeakWrite() % 09-09 Student version limited, set jj = Max_records ~500, total size is 26 % 09-10 Home version also limited, but to same jj = ~700 ! Should be larger!? tspchid = 861393; jj = 700; tStamps = datetime("2019-08-30") + seconds(gt_data(1:jj,1)); gt_timetable = timetable(tStamps, gt_data(1:jj,2), gt_data(1:jj,3), gt_data(1:jj,4)); thingSpeakWrite(tspchid,gt_timetable,'WriteKey','write-key');

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.