Widgets doesn´t display any values

조회 수: 12 (최근 30일)
Natalia
Natalia 2023년 4월 19일
댓글: Nikolay Georgiev 2024년 1월 4일
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
Christopher Stapels
Christopher Stapels 2023년 4월 19일
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)

댓글을 달려면 로그인하십시오.

채택된 답변

Christopher Stapels
Christopher Stapels 2023년 5월 3일
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
Natalia
Natalia 2023년 5월 4일
Thank you! I changed it and it works now :)

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Natalia
Natalia 2023년 4월 19일
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
Christopher Stapels
Christopher Stapels 2023년 4월 19일
편집: Christopher Stapels 2023년 4월 19일
use this format in the browser (be sure to replace your api key and channel id.)
https://api.thingspeak.com/channels/123456/feeds.json?api_key=xxxxxxxxxxxxxxxx&results=2
or if your channel is public, you can share the channel ID and Ill take a look.
Natalia
Natalia 2023년 4월 19일
It´s public, this is the channel ID: 2078146

댓글을 달려면 로그인하십시오.


Christopher Stapels
Christopher Stapels 2023년 4월 21일
편집: Christopher Stapels 2023년 4월 21일
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"}]}
  댓글 수: 2
Natalia
Natalia 2023년 4월 22일
편집: Natalia 2023년 5월 2일
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?.
Christopher Stapels
Christopher Stapels 2024년 1월 3일
Right now on your channel, the gauge widgets match the values I read from your fields. They are all zero.

댓글을 달려면 로그인하십시오.


Nikolay Georgiev
Nikolay Georgiev 2024년 1월 3일
편집: Nikolay Georgiev 2024년 1월 3일
I am getting a similar error but only on the Public View web page of the channel. Or it could be completely different one.
I have two gauge widgets which are getting data from the channel fields 3 and 4 - AQI. When creating those at the Private View web page of the channel I am able to get the reading at the bottom part of the gauge (see snap shot below - highlighted value):
vs
Doing absolutely the same over the Public View page I am not able to get the value displayed. If I refresh the page I am getting zero for a second and then it disappears and no value is shown. I've also tried with Android app over my phone I am not able to see the values. Also other web browser doesn't help.
It is interesting that when I click on the pencil icon to edit the gauge at the Public View page the "Display Value" check box is gone:
Here is a link to the channel:
I would appreciate your help since I think it could be a bug.
Thanks,
Nick
  댓글 수: 4
Christopher Stapels
Christopher Stapels 2024년 1월 4일
편집: Christopher Stapels 2024년 1월 4일
My apologies for not reading your issue closely enough. I am able to reproduce your issue for widgets I make chages to (old ones didnt have the issue). I reported this and will update on this other thread becasue I think it is related:
https://www.mathworks.com/matlabcentral/discussions/thingspeak/838555-changing-chart-type-from-line-to-any-other-doesn-t-produce-an-effect-anymore?s_tid=srchtitle
Nikolay Georgiev
Nikolay Georgiev 2024년 1월 4일
No worries. Looking at the related issue you sent I am also facing it. In my channel I have Field 5 and 6 calculating overnight 24h average from the past day and I made it to be bar/column chart. It is not changing and keeping the line style graph in both Private and Public Views.
Thank you for helping out :)

댓글을 달려면 로그인하십시오.

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 Visualize Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by