3KUdelta / Solar_WiFi_Weather_Station

Based on the work of Open Green Energy: First solar Zambretti Forecaster
111 stars 50 forks source link

ThingSpeak not updating anymore #48

Closed polanskiman closed 2 years ago

polanskiman commented 2 years ago

Hello,

Due to some update done on ThingSpeak's end, the code is broken and data is not being sent anymore to ThingSpeak servers. It is discussed here: https://www.mathworks.com/matlabcentral/discussions/thingspeak/745015-all-my-thingspeak-channels-stopped-receiving-data-on-the-same-date-april-13th-2022-at-around-10-00?s_tid=srchtitle

Since I don't often check my ThingSpeak channel, I actually only noticed a few days ago that my ThingSpeak Channel also stopped receiving data at the exact same date (April 13). Having little to no knowledge on coding I can't fix this myself.

Any help would be appreciated.

Thank you.

Maigoland commented 2 years ago

Hi I have the same problem, the last data published in ThingSpeak is on 2022/12/4.

Any ideas to solve this problem?

Thanks

3KUdelta commented 2 years ago

It seems that they have changed parts of the file format. I did not notice it either. Probably not a big deal - I will have a look into it.

polanskiman commented 2 years ago

Seems to be an url encoding issue. Spaces should be formated as %20 Here it is disscussed too: https://www.mathworks.com/matlabcentral/discussions/thingspeak/744635-channel-status-update-strings-including-space-chars?s_tid=srchtitle

3KUdelta commented 2 years ago

Do you want to try to fix it? I can start looking into it coming Sunday.

polanskiman commented 2 years ago

I would if I had the knowledge. It can wait. It’s been down for 5 months, a few more days won’t change anything ;)

polanskiman commented 2 years ago

If I may suggest, in addition to the fix above, it might be worth adding some piece of code to know what happened when a requests was sent to the server. As it currently is, there is no feedback and nothing is printed in the serial monitor as to wether the request was successful or not. We get a "Data written to Thingspeak ..." but that happens no matter what, so it's not very useful to track connection problems.

3KUdelta commented 2 years ago

Good idea - will look into it.

polanskiman commented 2 years ago

Wanting to find the solution I contacted ThingSpeak directly. So far I haven't found the way, however at ThingSpeak they recommended using the ThingSpeak library for arduino and esp instead.

https://www.mathworks.com/matlabcentral/answers/1789110-thingspeak-channel-stopped-receiving-data-since-april-13th-2022

3KUdelta commented 2 years ago

Fixed it with by using the ThingSpeak library. Please be aware that you need to enter your channel id and your key in Settings.h.

polanskiman commented 2 years ago

Awesome. Will try it out.

polanskiman commented 2 years ago

All is working smoothly for me now. Also thank you for pointing out the Blynk code will be deprecated by the end of the year. I will try to look into how to update it. Gives me 4 months to learn about coding ;)

jspanitz commented 2 years ago

Blynk code will be deprecated by the end of the year

Hmm, where is this noted and what does it mean in terms of using the existing blynk app - will it stop working or just be unsupported?

Edit: Found on main project page: https://blynk.io/blog/what-will-happen-to-the-legacy-blynk-platform

So basically, this project is dead for anyone just starting out - lovely!

3KUdelta commented 2 years ago

Not quite true - there are so many replacements:

polanskiman commented 2 years ago

@jspanitz I have updated the code in my fork to work with the New Blynk. Have a look at it. Changes are really minimal.

3KUdelta commented 1 year ago

I finally found some time - thank you @polanskiman for your input. I also have done the few updates for Blynk. It is more to do on Blynk's side than on the code here.