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.
Locked
User avatar
kampto
 
Posts: 100
Joined: Sun Feb 21, 2016 12:51 pm

Can the feed accept decimals?

Post by kampto »

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?

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

Post by adafruit2 »

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

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

Re: Can the feed accept decimals?

Post by kosmonooit »

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.

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

Post by adafruit2 »

it just sees a raw 'string' of data

User avatar
kampto
 
Posts: 100
Joined: Sun Feb 21, 2016 12:51 pm

Re: Can the feed accept decimals?

Post by kampto »

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?

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

Post by adafruit2 »

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

User avatar
kampto
 
Posts: 100
Joined: Sun Feb 21, 2016 12:51 pm

Re: Can the feed accept decimals?

Post by kampto »

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.

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

Post by adafruit2 »

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

User avatar
kampto
 
Posts: 100
Joined: Sun Feb 21, 2016 12:51 pm

Re: Can the feed accept decimals?

Post by kampto »

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.

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Can the feed accept decimals?

Post by adafruit2 »

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

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

Re: Can the feed accept decimals?

Post by uniontownlabs »

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

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

Re: Can the feed accept decimals?

Post by Karl33to »

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

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”