npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

froniuswebcomponent

v0.1.9

Published

Fronius real-time PV display web component

Downloads

24

Readme

Built With Stencil

Fronweb

This is a web component that displays real-time and archive data from a Fronius inverter. It connects directly to the Fronius inverter API locally rather than via solar web. It is intended to run on a small screen such as a Raspberry Pi gadget. It assumes there is a smart meter installed. It's also not going to work right if your smart meter is on demand rather than supply. Shrug, I'm sure you can figure it out.

Froniusweb screenshot

Fronius REST API is seriously hot garbage. The best I can say is at least there is an API and it generally works. Requests take many seconds to complete with the exception of /solar_api/v1/GetPowerFlowRealtimeData.fcgi, which only takes tens of milliseconds. It seems this fast cgi was some afterthought second process?

Seriously, how hard would it be to realise that all we want is a small set of power data, both instaneous and day accumulated, but no, each API gives you mountains of shit you don't want, most of which you have to guess because they're not explained in the docs, and you're forced to make multiple slow API calls just to get five or six items of data. What's wrong with these guys?

This code makes sparing use of slower API commands, particularly so for the historical data for the graphs which is done on start up and every 15 minutes.

Note that REST requests need CORS enabled end-points to work from web clients. The Fronius inverter doesn't do this naturally, not even whitelisting the local LAN, so it will need to be used in conjunction with a CORS proxy as as https://github.com/Rob--W/cors-anywhere.

You must pass the API URL to the component via the apiurl property. With CORS anywhere proxy, this might look something like this where the first IP/port is the CORS proxy and the second is the address of the inverter on the local network.

<fronweb-component apiurl="http://192.168.1.250:8157/http://192.168.1.240"></fronweb-component>

Methods

pause() --- will pause the updates, and stop data fetching resume() --- resumes data updates

Using this component

Script tag

  • Put a script tag similar to this <script src='https://unpkg.com/froniuswebcomponent/dist/fronweb.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run npm install froniuswebcomponent --save
  • Put a script tag similar to this <script src='node_modules/froniuswebcomponent/dist/fronweb.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc b