• A bright and shiny toy.

    Marcel Chabot02/26/2024 at 00:50 0 comments

    Done in a weekend. Finishing a project isn't a luxury I often get, and doing even a simple one in a weekend is nice.

    The source code can be found here: https://github.com/AardvarkMan/SolarMonitor

    I'll 3D print a case for it later, but from a code and technology standpoint this is done!

  • There is no ESCAPE the Space

    Marcel Chabot02/26/2024 at 00:48 0 comments

    I was having great success with the basic request for the current status. Things were working great. I wanted the 15 minute updated production history. This required a start date time and an end date time.

    Every time I attempted to call that API it would yell at me. It worked fine in Postman, but the ESP32 would generate a 400 error at the web server.

    The problem came down to dates. A lot of API's use a date format like YYYY-MM-DDTHH:MM:SS.sssssZ. The Solar Edge API use YYYY-MM-DD HH:MM:SS. The first format and variations of it are more common today. The issue with the date format used by Solar Edge is that it requires that you replace the space with a %20.

    Postman makes this correction automatically, but in the ESP32 code, you have to remember to swap any spaces in the query string with %20 characters. This easy to overlook requirements is why first example with a T separating date and time is more common.

    To any aspiring web service developers out there: Query string parameters requiring spaces should be avoided.

  • ESP32 to the Rescue

    Marcel Chabot02/26/2024 at 00:41 0 comments

    On a whim I decided to put a LILYGO T-Display S3 into the mix and see if it didn't behave better. The code shouldn't require a change between hardware platforms thanks to the hardware abstraction layer in the Arduino development platform.

    I hit upload and POOF, worked first try. There is something amiss in the Pico implementation of WiFiClientSecure or some other related library. I wanted this to be a Pico project, but an ESP32 project is just fine.

  • The Pico Fight

    Marcel Chabot02/26/2024 at 00:37 0 comments

    Calling a Web Service isn't too difficult and with the SolarEdge documentation and Postman I was about to talk to the system right away. Really easy API Key based system. I would feed the same API calls into the Pi Pico W and it would scream about security. I had to go with a .setInsecure() command on the client to get any response.

    When it did respond, out of the entire JSON datagram all I got was the first "{" and it would hang. Very frustrating.

  • Lightbulb Moment

    Marcel Chabot02/26/2024 at 00:33 0 comments

    I have a Photovoltaic Solar Array on my roof, and as a nerd I just can't NOT know how it is doing up there. Bureaucracy being what it is, it was installed in the summer, and I didn't get Permission to Operate from the local electric company until late November! Located in the snow-covered wasteland of Hoth, my daily entertainment has been watching the daily production climb as we start to see the sun again.

    The problem is that the only way to view the production is via a web page or phone app. Being the ADD person I am, every time a ray of sunshine came through my office window, I was drawn to open the app or load the dashboard web page. Leaving the dashboard up on a spare monitor and a Raspberry Pi just didn't feel right, spending all that electricity to watch my electricity production.

    I do have is the SolarEdge API documentation and a Pi Pico W unit. The adventure begins.