SonnenladenGmbH / APsystems-EZ1-API

The APsystems EZ1 Python library offers a streamlined interface for interacting with the local API of APsystems EZ1 Microinverters.
MIT License
54 stars 7 forks source link

MicroPython port #11

Open tacker66 opened 4 months ago

tacker66 commented 4 months ago

I am trying to call the local API from MicroPython using only the requests module. My approach works with CPython but needs a patched requests module for MicroPython. I raised an issue in micropython-lib describing the problem. Perhaps you could help here?

mawoka-myblock commented 4 months ago

I'm not a huge micropython fan and it's really annoying to get all the files on the esp. This also doesn't have much to do with this library. Wouldn't it just be possible to replace these lines with another request-client?

tacker66 commented 4 months ago

I created this issue because you stated that you are working on a MP port ;-) Problem is there is no urllib3or aiohttp for MP and requests consist only of a minimal implementation for MP. BTW: With the new mipinstaller bringing files to an ESP32/PicoW is quite easy (see my link above)..

mawoka-myblock commented 4 months ago

Oh, forgot the first part 🙈

But the minimal implementation of requests should be sufficient as we aren't using any advanced features.

tacker66 commented 4 months ago

Yeah, but the problem seems to lie in the underlying MP socket implementation (at least my guess).