Change Min Max in program
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.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- AstroGuy
- Posts: 14
- Joined: Mon Dec 15, 2014 1:42 pm
Change Min Max in program
I would like to change the min and max settings of a feed on the fly (from within the program) using inputted data....
- brubell
- Learn User Page
- Posts: 2010
- Joined: Fri Jul 17, 2015 10:33 pm
Re: Change Min Max in program
Which library are you working with?
What do you mean by "min and max settings of a feed"
What do you mean by "min and max settings of a feed"
- AstroGuy
- Posts: 14
- Joined: Mon Dec 15, 2014 1:42 pm
Re: Change Min Max in program
this is not a library it is the IOT....I have a gauge as one feed that has a min of 0 and a max of 400...can I change that in my python code or do I need to change the gauge online every time I run my project....
- jwcooper
- Posts: 1004
- Joined: Tue May 01, 2012 9:08 pm
Re: Change Min Max in program
You can edit blocks via the api. In that situation, you could programmatically update the min/max values of the gauge block.
Here is the documentation:
https://io.adafruit.com/api/docs/?shell#replace-a-block
One note, the "dashboard_id" in the api call should be the 'key'. We'll have to update that. For now, you can get the key by using the last value in the url when viewing your dashboard, or by getting the key from the dashboards API.
Here is the documentation:
https://io.adafruit.com/api/docs/?shell#replace-a-block
One note, the "dashboard_id" in the api call should be the 'key'. We'll have to update that. For now, you can get the key by using the last value in the url when viewing your dashboard, or by getting the key from the dashboards API.
- AstroGuy
- Posts: 14
- Joined: Mon Dec 15, 2014 1:42 pm
Re: Change Min Max in program
Thanks, but API docs mean nothing to me...I need examples in python but the examples in the api doc are useless.
- jwcooper
- Posts: 1004
- Joined: Tue May 01, 2012 9:08 pm
Re: Change Min Max in program
I don't believe our python clients support modifying blocks programmatically as this isn't a common use case.
We do accept pull requests, and you can find our python libraries below if you'd like to contribute this feature:
https://github.com/adafruit/Adafruit_Ci ... AdafruitIO
https://github.com/adafruit/Adafruit_IO_Python
We do accept pull requests, and you can find our python libraries below if you'd like to contribute this feature:
https://github.com/adafruit/Adafruit_Ci ... AdafruitIO
https://github.com/adafruit/Adafruit_IO_Python
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.