Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Showing AIO data on a Pyportal
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.

Re: Showing AIO data on a Pyportal

by brubell on Tue Oct 13, 2020 10:11 am

HarpDude wrote:I'm also seeing this error when using the PyPortal library's push_to_io() function.


adafruit-circuitpython-bundle-6.x-mpy-20201009
Adafruit CircuitPython 6.0.0-beta.2 on 2020-10-05; Adafruit PyPortal with samd51j20


You may want to try downgrading to the Adafruit circuitpython requests library version 1.6.0, requests.get isn't working in the latest build. I'd also downgrade from CircuitPython 6.0 beta to 5.3.1 stable

brubell
 
Posts: 1061
Joined: Fri Jul 17, 2015 10:33 pm

Re: Showing AIO data on a Pyportal

by HarpDude on Tue Oct 13, 2020 11:53 am

Thank you brubell. Do you have a link to that version handy?

FYI, I also tested it with the latest 5.3.1 distribution. Confirmed the same issue.

HarpDude
 
Posts: 174
Joined: Mon Dec 07, 2015 2:52 am

Re: Showing AIO data on a Pyportal

by HarpDude on Tue Oct 13, 2020 3:26 pm

It looks like the version that was included in the 5.3.0 2020-06-23 bundle is working nicely. Thanks!

HarpDude
 
Posts: 174
Joined: Mon Dec 07, 2015 2:52 am

Re: Showing AIO data on a Pyportal

by axelmagnus on Tue Oct 20, 2020 3:17 pm

HarpDude wrote:I'm also seeing this error when using the PyPortal library's push_to_io() function.


adafruit-circuitpython-bundle-6.x-mpy-20201009
Adafruit CircuitPython 6.0.0-beta.2 on 2020-10-05; Adafruit PyPortal with samd51j20


Could you share your code? Has anything changed with the recent the release of 6.0.0 candidate?

axelmagnus
 
Posts: 14
Joined: Thu Oct 20, 2016 5:20 pm

Re: Showing AIO data on a Pyportal

by HarpDude on Tue Oct 20, 2020 11:27 pm

Here's an extract of the code that instantiates the pyportal class and its push_to_io() function. Regardless of the surrounding code, it fails when using push_to_io.

Code: Select all | TOGGLE FULL SIZE
# Import the PyPortal class; includes ESP32 and IO_HTTP client modules
import adafruit_pyportal as pp

# Instantiate the PyPortal class
pyportal = pp.PyPortal(url=ADAFRUIT_IO_DATA_SOURCE,
                       json_path=ADAFRUIT_IO_DATA_LOCATION,
                       status_neopixel=pp.board.NEOPIXEL,
                       default_bg=0x000000)

pyportal.push_to_io(SHOP_HUMIDITY, humidity)


No, I haven't had the time to check it against the latest candidate or bundle, but hope to in the next few days after the project's sensors are received.

HarpDude
 
Posts: 174
Joined: Mon Dec 07, 2015 2:52 am

Please be positive and constructive with your questions and comments.