mwittig / node-fronius-solar

Access PV live logs using the Fronius Solar API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to find the inverter's IP?

arodriguezju opened this issue · comments

Hi @mwittig, thank you very much for the code. I was looking for some information regarding the connection to a Fronius inverter and stumbled across your repo.
I do have 2 questions though:
1 - I can imagine the IP has to be changed, from localhost to the IP of the inverter, right? Is there a way of knowing this IP?
2 - Is there a way of testing this API without having an inverter at home?

Thank you!

I've just used this collector with great success (here in 2020) so I can help here, a little bit

Assuming that you have the inverter connected to your home network, it is likely getting a DHCP IP address. To check this, you will need to log in to your router and look for LAN Clients, or DHCP leases or something along those lines. My command looks like this:

fronius-exporter -u http://10.0.10.11/solar_api/v1/GetPowerFlowRealtimeData.fcgi --bindAddr ":8080"

10.0.10.11 is the IP of my inverter.

As for testing with out an inverter locally I don't believe this will work, unless you can find an "example" inverter out on the net somewhere.

@IceaTronic Thanks for replying to this issue which I should have covered earlier. As you pointed out out the common case is that inverter is connected to the home network and the inverter obtains a dynamic IP address from the home router. So, as you have suggested one way of obtaining the IP is to log into the router and check the information available, e.g., list of local network clients, DHCP leases, or Log Messages. Unfortunately, this may involve a bit guess work as some users reported their inverters do not advertise a sensible host name like "Fronius ..." which would be helpful to spot the right entry. Depending on the type of the router the name field may be empty, may contain the IP address too, or contains some other placeholder value. Two thoughts on this:

  • Check if the inverter, provides the IP address as part of the configuration settings which can be accessed via the inverter setup panel. For me it'd make sense for the vendor to provide this information
  • Check if the MAC addresses of the inverter are documented somewhere, e.g. as of the product documentation or printed on the product itself. As most routers show the MAC address along with IP address for client connected to the LAN this will help to spot the right entry

Regarding point 2) raised by @arodriguezju the answer is Yes. The test folder which contains server.js providing a mockup used for testing. Simply start node server.js which listens on port 8001. This way you can query data from localhost as outlined in the usage example.