Widgets doesn´t display any values

2 views (last 30 days)
I´m creating an irrigation system, I collect data from a sensor with labview and I send it to a thingspeak channel. When I use thingspeak on my computer, the data I obtain is displayed perfectly in the field one chart. The same numbers should show on the gauge that I placed next to it but it doesn´t work at all even though it is configured to work with the field 1 data. Also, when I try to view the information on my Thingviewer app none of the widgets work.
Does anyone know how I could fix this?
  1 Comment
Christopher Stapels
Christopher Stapels on 19 Apr 2023
Can you show the widget settings dialog, and perhaps an export of one or two recent entries to the channel? (you can use the read API command in your browser address bar, copy from the API keys tab of your channel view)

Sign in to comment.

Accepted Answer

Christopher Stapels
Christopher Stapels on 3 May 2023
You are using a comma as a decimal seperator. I'm sorry but ThingSpeak thinks that is string text, and is not converting it to a number. We use a dot seperator for decimal notation. If you cannot change that at the source, you can write a MATLAB analysis to change the decimal seperator and write the date to a new channel.
ThingView is not made by MathWorks, but you can reach out to the app creator, I think they are listed with the app on google store.
  1 Comment
Natalia
Natalia on 4 May 2023
Thank you! I changed it and it works now :)

Sign in to comment.

More Answers (2)

Natalia
Natalia on 19 Apr 2023
Sure. Please let me know if the recent data file has what you need. Sorry but I couldn´t figure out how to do it with the API command that you mentioned.
  2 Comments
Natalia
Natalia on 19 Apr 2023
It´s public, this is the channel ID: 2078146

Sign in to comment.


Christopher Stapels
Christopher Stapels on 21 Apr 2023
Edited: Christopher Stapels on 21 Apr 2023
The widget isnt showing any value because the value of field1 in your channel is null. When you write only to field 2 in an update, the value of all other fields at that instant is written as null. Same is true when you update only field 1 in an update. Can you tell us how you are updating your channels? If you are using the write API, you can update multiple fields at one by appending each field info to the same comand
i.e. ?field1=2&field2=2&field3=2&field5=231...etc.
here is the recent data from your field so you can see the null entries. I used this address to get the data
https://thingspeak.com/channels/2078146/feed.json?results=2
"channel": {"id": 2078146,"name": "Prueba riego","description": "Prueba en Arduino de sensor de humedad con LED","latitude": "0.0","longitude": "0.0","field1": "Sensor1","field2": "Sensor 2","created_at": "2023-03-23T19:43:25Z","updated_at": "2023-04-19T03:06:42Z","last_entry_id": 15837},"feeds": [{"created_at": "2023-04-21T13:13:41Z","entry_id": 15836,"field1": null,"field2": null},{"created_at": "2023-04-21T13:13:56Z","entry_id": 15837,"field1": null,"field2": "0,00"}]}
  1 Comment
Natalia
Natalia on 22 Apr 2023
Edited: Natalia on 2 May 2023
So I managed to fix the null entries updating all fields at once. But the gauge widgets still don´t work, they only display "NaN", and the ThingView app doesn´t even show all of the widgets that I have on my channel, and it doesn´t show any information for the field charts that do seem to work when I view them in my computer. Is this an error in ThingSpeak? or is it something that I´m still coding wrong?.

Sign in to comment.

Communities

More Answers in the  ThingSpeak Community

Categories

Find more on Configure Accounts and Channels in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!