It is currently April 27th, 2024, 2:55 pm

WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Get help with creating, editing & fixing problems with skins
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Post by emp00 »

Dear Team,

I would like to create a skin showing my photo voltaic system status - I have an Enphase system, axxess via this url:
- https://enlighten.enphaseenergy.com/web/5000000/history/graph/hours
- (5000000 is a demo number, my system has a different number)

In my browser I only need to login once - once this is done, this url always shows my PV system status. I would like to grab this page via Webparser and read out my battery status and a few other numbers to be displayed in a rainmeter skin.

Webparserdump.txt attached --> this contains the login page... How can I proceed under rainmeter to login?
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Post by balala »

emp00 wrote: February 29th, 2024, 9:09 pm How can I proceed under rainmeter to login?
Unfortunately you can't, unless the site supports HTTP authentication. But I think that side doesn't support it and if I'm right on this, you can't use Rainmeter to parse the data requiring authentication. See here.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Post by Yincognito »

emp00 wrote: February 29th, 2024, 9:09 pm Dear Team,

I would like to create a skin showing my photo voltaic system status - I have an Enphase system, axxess via this url:
- https://enlighten.enphaseenergy.com/web/5000000/history/graph/hours
- (5000000 is a demo number, my system has a different number)

In my browser I only need to login once - once this is done, this url always shows my PV system status. I would like to grab this page via Webparser and read out my battery status and a few other numbers to be displayed in a rainmeter skin.

Webparserdump.txt attached --> this contains the login page... How can I proceed under rainmeter to login?
Besides the need to authenticate, the site most likely keeps some of the data behind Javascript, based on your attachment. Balala is right, using WebParser to extract data from it is not the way to approach it. There is one other way, by using the WebView plugin, which basically means that you'd display the entire said page in the skin and have little "skin-like" control over it - similar to putting a little (Edge) browser tab in your skin, if you like. Then, you will be able to do what you do in the browser on this page, except it will happen inside your skin. Not sure if it will be what you want, but it's one of the few alternatives.

P.S. There might be ways to build your own local page and try to login from there on the site, using the same plugin, but obviously that requires solid Javascript knowledge and a more complex code (if that's even possible, to begin with).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

Re: WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Post by emp00 »

Thanks @Yincognito and @balala for your feedback. I understand, that Webparser does not work for this task, that's unfortunate.

Using the WebView plugin as suggested is practically the same as using a "Browser-WebApp", see below a screenshot how this looks. My intention using Rainmeter is making a very slim / space-saving version of this dashboard showing only the information I really need, without menus/statusbars etcpp. Even losing no system information at all I'm sure I can make a Rainmeter gadget consuming less than 20% of the space this supplier app needs... That's what I would like to do. Enphase also has an API access plan but the free plan only allows 1000 hits per month, and with my 2-3 computers requesting a data update every 15mins this is tight. The cheapest pay plan is already 250$/month.

So what about this "Plan B": Can I somehow access and read out the running WebApp html/JavaScript output with Rainmeter? The screenshot is an Edge WebApp (see URL in the initial posting) and the data is cached and accessible, I think? Maybe Rainmeter can even hook directly into the running edge.exe process to scrape the numerical system data shown in the WebApp? I'd like to run the WebApp minimized (so that it does not consume screen space) and RegEx the system status data via Rainmeter so that it can be shown in a small custom-made dashboard meter... Is this technically possible? Thanks for your creative ideas!
:)

Image
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Post by Yincognito »

emp00 wrote: March 2nd, 2024, 10:25 am Thanks @Yincognito and @balala for your feedback. I understand, that Webparser does not work for this task, that's unfortunate.

Using the WebView plugin as suggested is practically the same as using a "Browser-WebApp", see below a screenshot how this looks. My intention using Rainmeter is making a very slim / space-saving version of this dashboard showing only the information I really need, without menus/statusbars etcpp. Even losing no system information at all I'm sure I can make a Rainmeter gadget consuming less than 20% of the space this supplier app needs... That's what I would like to do. Enphase also has an API access plan but the free plan only allows 1000 hits per month, and with my 2-3 computers requesting a data update every 15mins this is tight. The cheapest pay plan is already 250$/month.

So what about this "Plan B": Can I somehow access and read out the running WebApp html/JavaScript output with Rainmeter? The screenshot is an Edge WebApp (see URL in the initial posting) and the data is cached and accessible, I think? Maybe Rainmeter can even hook directly into the running edge.exe process to scrape the numerical system data shown in the WebApp? I'd like to run the WebApp minimized (so that it does not consume screen space) and RegEx the system status data via Rainmeter so that it can be shown in a small custom-made dashboard meter... Is this technically possible? Thanks for your creative ideas!
:)

Image
In short, no, your plan B won't work. The only way to even attempt to get something out of it when it comes to the web app is to set it to log the desired data in near real-time to a local (text-like) file, than can be then easily parsed with WebParser.

Anything behind authentication, javascript or an executable is inaccessible to Rainmeter or WebParser, so, apart from using a dedicated plugin to get the data presumably shared / exposed to 3rd parties by an app (which is probably not the case), or parsing some textual output like a html / xml / json / csv / txt file, there's no way Rainmeter can be aware of data used internally by other software. The key word here is internally - as soon as the data is in any way external (either via internal sharing to plugin-like modules, physical sharing to a file, or directly displaying it to STDOUT aka the command line screen) Rainmeter can get it.

Another thing you can try is to see whether that web app is using an actual webpage to display data, and if so, use Chrome's Developer Tools (especially the Network tab via a page refresh) to identify whatever other web resource the page uses to get its data. If the said resource is using an URL query or some json / xml that has the data, then you can attempt to access that directly in WebParser and get what you need.

You could also try to see if that app has command line abilities that could display the data to STDOUT. If so, a RunCommand measure can capture and manipulate that.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

Re: WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Post by emp00 »

Ok - Thanks.

I will initiate Plan C --> install Home Assistant on Raspi and then access my PV-system via this:
https://www.home-assistant.io/integrations/enphase_envoy/

My hopes are, that I will be able to read out the system via Home Assistant using Webparser ...
Will take some time, plan to do this next weekend.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: WebParser for https://enlighten.enphaseenergy.com/web/XXXX (Enphase PV Solar)

Post by Yincognito »

emp00 wrote: March 3rd, 2024, 9:52 pm Ok - Thanks.

I will initiate Plan C --> install Home Assistant on Raspi and then access my PV-system via this:
https://www.home-assistant.io/integrations/enphase_envoy/

My hopes are, that I will be able to read out the system via Home Assistant using Webparser ...
Will take some time, plan to do this next weekend.
Not sure if it will work if the site also requires authentication, but I wish you good luck in making it work! You probably know it already, but with a little effort you can use the raspberry pi (or a smartphone) as a second monitor, and implicitly put skins on it. Doesn't really help in this case, just saying.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth