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

Can the feed accept decimals?
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.

Can the feed accept decimals?

by kampto on Sun Feb 21, 2016 12:55 pm

I have set up a feed and it sends integers fine and they are fed. But Adafruit IO will not display decimals numbers.. Is this correct?

kampto
 
Posts: 99
Joined: Sun Feb 21, 2016 12:51 pm

Re: Can the feed accept decimals?

by adafruit2 on Tue Feb 23, 2016 12:29 am

you can send any string, the library may have to format it into a string and that may require some noodling

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

by kosmonooit on Tue Feb 23, 2016 3:12 am

But what does the mqtt broker expect to see, and what gets displayed in the Ada IO feeds?

I had the same questions trying to get my feed to work, but could not find any specs in this regard.

kosmonooit
 
Posts: 4
Joined: Thu Nov 12, 2015 2:43 pm

Re: Can the feed accept decimals?

by adafruit2 on Tue Feb 23, 2016 10:57 am

it just sees a raw 'string' of data

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

by kampto on Tue Feb 23, 2016 11:11 am

Im using REST API method with Feather ESP8266 board and Arduino IDE. Why do I need a string to get a floated value to display in the AIO?

kampto
 
Posts: 99
Joined: Sun Feb 21, 2016 12:51 pm

Re: Can the feed accept decimals?

by adafruit2 on Tue Feb 23, 2016 11:56 am

not sure about REST but as for MQTT, the client sends a string, and then its up to the server to parse that out. if you graph the data, the string will be parsed for graphing

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

by kampto on Tue Feb 23, 2016 2:03 pm

But what does a string have to do with the AIO not displaying floated (decimal) values? So in conclusion the AIO can only display integers and not decimals? Which is not going to work if your monitoring LiPo battery voltage that range between 3 to 4 Volts.

kampto
 
Posts: 99
Joined: Sun Feb 21, 2016 12:51 pm

Re: Can the feed accept decimals?

by adafruit2 on Tue Feb 23, 2016 2:08 pm

not sure of what you're asking but you could always send the data in millivolts, then you range from ~2500 to 4300

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

by kampto on Tue Feb 23, 2016 2:45 pm

I can ask it in a more simple way. Can Adafruit IO dashboard plots display numbers with decimals, Yes or No?

My finding suggest No and you previous Answer suggests no as well.

kampto
 
Posts: 99
Joined: Sun Feb 21, 2016 12:51 pm

Re: Can the feed accept decimals?

by adafruit2 on Tue Feb 23, 2016 2:51 pm

not sure about the plots, but the *feed* should be able to store decimal. I'll ask the maintainer

adafruit2
Site Admin
 
Posts: 19225
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

by uniontownlabs on Tue Feb 23, 2016 2:56 pm

you should be able to graph any decimal values. see attached image:
Attachments
decimal.png
decimal.png (103.77 KiB) Viewed 345 times

uniontownlabs
 
Posts: 112
Joined: Wed Dec 17, 2014 10:56 pm

Re: Can the feed accept decimals?

by Karl33to on Fri Feb 26, 2016 6:37 pm

Kampto, the rest library has a bug with float values, if you look in the git issues there has been a fix posted which seems to work well.

https://github.com/adafruit/Adafruit_IO ... ll/2/files

Karl33to
 
Posts: 2
Joined: Mon Jan 11, 2016 3:37 pm

Please be positive and constructive with your questions and comments.