Widgets doesn´t display any values

11 ビュー (過去 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 Center および File ExchangeVisualize Data についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by