Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Gauge block issue?
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Gauge block issue?

by mrxtreme on Thu Nov 12, 2015 4:01 pm

Hello,

As a brand new user of Adafruit IO, I put up a dashboard with 2 feeds. Pressure and Temp from a BMP180 via an ESP8266. Easy peasy to setup with the great tutorials.

The issue is that the temp gauge "ring" disappears after the first update. Oddly the pressure "ring" works fine. The text within the block shows that the values from the temp feed are within the min/max of the gauge block.

As an observation, the text values within the temp gauge is not proportionally space properly as it is with the pressure gauge block I set up.

I've tried deleting the block and adding it again, but the results are the same. I've tried it using Chrome, Firefox, and Explorer and the results are still one dead ring.

Associated with this, is I've tried to delete the temperature feed, but it just pops back up again populated with the latest value sent by the ESP8266 Huzzah.

So a second question would be if the ESP8266 code tries to publish a non-existent feed, is it automagically created on Adafruit IO?

Ideas?

Thanks!

James

mrxtreme
 
Posts: 10
Joined: Fri Aug 03, 2012 12:46 am

Re: Gauge block issue?

by jwcooper on Thu Nov 12, 2015 4:09 pm

What is your min/max for the failing gauge, and what are some examples of values you send that you can re-create the issue with? Any more details and we may be able to fix it quicker. Also, what browser are you using?

Yes, if you send a non-existent feed to IO through MQTT, the system will automatically create the feed for you. This is assuming you haven't used that feed name before.

jwcooper
 
Posts: 679
Joined: Tue May 01, 2012 9:08 pm

Re: Gauge block issue?

by mrxtreme on Thu Nov 12, 2015 5:05 pm

JW,

The min/max that I'm currently using is 0 and 50. I can see a current reading right now of 20.6

I've tried many values of min/max to see if I could isolate the problem, but none of the combinations worked.

As mentioned, I've tried 3 different browsers. Firefox, Chrome, and Explorer running on a Win7 box. I did not mention that I also tried it using Chrome on a Google Nexus 7 tablet. Still no go.

Thanks for the info on MQTT.

James
Attachments
Adafruit IO gauge 11-12-2015.jpg
Adafruit IO gauge 11-12-2015.jpg (64.6 KiB) Viewed 425 times
Adafruit IO gauge edit 11-12-2015.jpg
Adafruit IO gauge edit 11-12-2015.jpg (73.08 KiB) Viewed 425 times

mrxtreme
 
Posts: 10
Joined: Fri Aug 03, 2012 12:46 am

Re: Gauge block issue?

by jwcooper on Thu Nov 12, 2015 5:08 pm

It looks like there is a space between the 20 and the '.60' on the right gauge? Without testing it, I think that could cause the gauge to read the value as a string, and not be able to parse it properly.

I see: 20 .60, when it should be 20.60.

jwcooper
 
Posts: 679
Joined: Tue May 01, 2012 9:08 pm

Re: Gauge block issue?

by mrxtreme on Thu Nov 12, 2015 6:35 pm

JW,

It looks like the problem is on your end. I'm passing a float to you and it is parsed incorrectly.

If I hardwire the value to something above 100 value is parsed correctly and the "ring" works. If I put in a value less than 100, I just tested. 99.99, the values is parsed incorrectly and the ring fails to work. Both of us noticed there is a space inserted (I mentioned it's proportions are off in my first post), before the decimal point.

James
Attachments
Adafruit IO 99.99 parsed 11-12-2015.jpg
Adafruit IO 99.99 parsed 11-12-2015.jpg (95.22 KiB) Viewed 397 times
Adafruit IO 100.99 parsed 11-12-2015.jpg
Adafruit IO 100.99 parsed 11-12-2015.jpg (93.82 KiB) Viewed 397 times

mrxtreme
 
Posts: 10
Joined: Fri Aug 03, 2012 12:46 am

Re: Gauge block issue?

by jwcooper on Thu Nov 12, 2015 7:05 pm

Thanks, missed that in your first post. Will dig into this issue.

jwcooper
 
Posts: 679
Joined: Tue May 01, 2012 9:08 pm

Re: Gauge block issue?

by nejssor on Mon Jan 11, 2016 8:29 pm

I had independently reported this as a bug (before I discovered this forum), but I've since figured out the problem, and it's not Adafruit IO at all. This is a known bug in the implementation of the function dtostrf() in the ESP8266 Arduino core. The Adafruit MQTT library calls dtostrf() on numeric values to convert them to strings before sending them to the Adafruit IO server, and the bug causes this call to introduce an extra space before the decimal point if the number is less than 100, which causes the server to interpret the number as a string. This has been fixed in the most recent version of the ESP8266 Arduino core (2.0.0), but not in the only version that I have been able to get to work (1.6.5-947-g39819f0). These two versions are the only ones available in the boards manager for the Arduino IDE.

nejssor
 
Posts: 3
Joined: Sat Jan 02, 2016 1:08 am

Please be positive and constructive with your questions and comments.