3KUdelta / Solar_WiFi_Weather_Station

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

ThingSpeak channel not updated using French accents #40

Open biwizit opened 3 years ago

biwizit commented 3 years ago

Hello,

The ThingSpeak channel is not updated very often with this sketch (less than 10% of the time), even if I have no error at all in in the serial terminal, every ten minutes. It is working much better (almost 100%) with the original code from opengreenenergy, which is weird because it is almost the same piece of code in the two scripts.

Any idea ? Would it be due to the number of fields which are more important in your sketch (or the additional status) ?

Thank you in advance.

Regards.

biwizit commented 3 years ago

I confirm that it becomes 100% successfull when I comment out the status lines :

// postStr+="&status=";
// postStr+=String(forecast_in_words + ": " + ZambrettisWords + ". " + pressure_in_words + " " + trend_in_words + ". " + accuracy_in_words + " " + accuracy_in_percent + "%25."); // Percentage sign needs to be URL-encoded

I need to investigate why (due to all the accents when using the french translation ?). But the workaround is acceptabe for me at the moment. Thanks.

biwizit commented 3 years ago

I confirm that everything is fine with status added again but when keeping the translation in english or removing the accents in the french translation.

I imagine that the accents are causing some issues somewhere.

I let this ticket open, in case of you want to make this part of the script more solid.

Thank you for all the job !

Regards.

3KUdelta commented 3 years ago

Thank you for your posting. https://ww2.mathworks.cn/matlabcentral/cody/groups/14/problems/853 confirms that they do not like strings with french accents. Maybe someone likes to re-write the part with ThingSpeak and send chars instead of strings.