this graph and related code is mentioned in the thread already. just need to search my previous post, I did mention all the configuration.yaml and graph code in a previous post.
@alex5 here is the post. do check post above it too.
this graph and related code is mentioned in the thread already. just need to search my previous post, I did mention all the configuration.yaml and graph code in a previous post.
@alex5 here is the post. do check post above it too.
thank you very much for pointing me in the right direction, much appreciated
eureka!! I finally install openwrt on my WR802N, but now, I stick to set up the parameter. My ISP rooter is 192.168.1.1 but the WR802N also, so how can I connect my wr802N, on my router ? and how to access to the config panel of WR802N taking into account that they have the same IP ?
start following this thread
Connect to Huwaei SUN2000 inverter using fiber modem - #20 by KOA - Network and Wireless Configuration - OpenWrt Forum
and this
@trevee you will be setting your tplink router in “dumb AP” mode, it will acquire dhcp from your ISP router, and you will set up a static route in ISP router.
Static route, obviously your isp modem will be different
Dumb Ap setup instructions
followed by connecting to Huwaei sun2000 inverter in client mode.
* network -- wireless -- scan -- connect to Sun200HVxxxxxxxxx wifi with password change me.
followed by either the custom rules method or GUI method of port forwarding. whichever you like
Would you be so kind to add the info from these posts to the ‘Connecting to the inverter’ wiki-page? They contain very useful information, but get lost in the 1700+ replies in this topic. Maybe you can split the OpenWRT-part into a GUI-based and a CLI-based guide?
I cannot possibly help everybody personally with limited computer networking knowledge to get their setup working, but I do want to provide good documentation were possible
Hello, how can you update the LAN interface into DHCP because when I tried to save and apply the change, it’s get stuck on “Failed to confirm apply with 90s…”
NB: The ipv4 adresse is hiden in your post and i dont know why, it should be 192.168.1.1 nan?
Hello wlcrs, in your tuto you said that :
Blockquote
Note that failing to set ‘defaultroute’ to 0 will result in loss of internet connectivity as the OpenWRT router will try to route all internet traffic over the inverter instead of your ISP!
Blockquote
Do you know how to do it through GUI ? because cannont access to your file in SSH (permission denied). I think this is my problem…
thanks a lot for you help but i stick on this configuration
did you enable ssh on the OpenWRT router?
as for DHCP, you have to follow this guide
Your router Ip will change to something in range of your ISP modem/router subnet mask 192.168.1.x where X can be any value from 2-254.
see Point 4
Give the wireless AP router an IP address “next to” your main router. By default, the main router will have an address of 192.168.1.1, so use something like 192.168.1.2. (The address should be on the same subnet as your main router but out of the DHCP range used when assigning addresses to connected devices. By default, that means the wireless AP router IP should be between 192.168.1.2 and 192.168.1.100.)
did you enable ssh on the OpenWRT router?
yes
Your router Ip will change to something in range of your ISP modem/router subnet mask 192.168.1.x where X can be any value from 2-254.
see Point 4
OK, will try again tonight, yesterday was tough
first we need to write a draft here.
@trevee to summarise the steps
this is the end of Part 1. I will try to write parts 2 and 3 tomorrow.
thank you so much for your help, really appreciated !!! I’ll do it right now!!
Thanks @yousaf465 for your help.
I tried also to put as detail as posible of this procedure above all that the procedure of openwrt is not really updated in terms of ergonomic / presentation of their workflow.
Step 1 : configure the second router as client with OpenWRT (model : TP LINK WR802N)
Connect the WR802N (or other) directly to your PC in ethernet
Disconnect wifi of the PC (to ensure to have only one access) and go to 192.168.1.1. to open the openwrt interface (w/o password but to be define later)
Go to Network → Interfaces and click on the Edit button of the LAN interface.
Give the wireless AP router an IP address “next to” your main router. By default, the main router will have an address of 192.168.1.1, so use something like 192.168.1.2.(at list what I did)
Click on Save and then Save & apply
Into the browser, replace the IP 192.168.1.1 to the new one 192.168.1.2
Go to Network → Interfaces and click on the Edit button of the LAN interface in General Settings tab and change the IPv4 gateway to point to your main router, 192.168.1.1 by default in my case.This sets the wireless AP router to use the main router for Internet access.
then in advanced settings tab, enter your main router ip adress (192.168.1.1 in my case)
To save resources on the wireless AP router, disable some now unneeded services. Navigate to System → Startup. Disable the services labeled firewall, dnsmasq and odhcpd.
Click the Save and Apply button.
When rebooted, disconnect the client modem (WR802N in my case) from power and ethernet. Connect the client modem to the main router (ISP) though ethernet. You may need to reboot or power cycle either or both routers, the device connecting your main router to the Internet, and potentially any connected devices. In many cases this will not be necessary.
then, browse your new ip adress of the client modem (192.168.1.2 in my case).You should be connected to the GUI interface of openwrt (but now in Lan with the main ISP router)
Select your Inverter in the list and click join. Put the password of the inverter wifi (“Changeme” by default) and valid.
It works unitil here…
A big big thanks to @yousaf465 for its patience !
Waiting for the second part!!! by huge step done today for me
hope it will help otherone like me (a bit newbie).
PS: at this step, not able to ping the inverter through HA (I guess it’s normal)
@trevee let’s start part 2.
This will involve setting up the static route in your ISP’s modem/router. This process is unique to everyone. For you, since you are using F@st 5366 (I do have that modem/router with me, but don’t have access to it right now Optus branded one https://www.optus.com.au/content/dam/optus/documents/for-you/broadband-internet/modems/Sagemcom_F%40ST_5366_TN_Modem_User_Guide.pdf )
On F@st 5366
Step 3.
Once you have done this I will write step 3.
Blockquote
PS: at this step, not able to ping the inverter through HA (I guess it’s normal)
You can’t ping inverter from HA right now, bcz port forwarding isn’t enabled yet. which we will do in next steps.
@trevee Now start Step 3
Download and install the latest Winscp from WinSCP :: Official Site :: Download
Run WinScp
*select Scp as protocol.
You will be presented with these windows with OpenWRT folders. In these folders/paths, you will find the files mentioned by @wlcrs in his GitHub page. Connecting to the inverter · wlcrs/huawei_solar Wiki · GitHub
double click on three dots icons
Navigate to the first file by double-clicking etc and then config. Here you will find all the three files “network” “wireless” and “firewall”
double click on the “network” and copy-paste the following code at the end of the files. remember to set defaultroute '0" as mentioned in the github wiki.
config interface 'wlan'
option proto 'dhcp'
option defaultroute '0'
config wifi-iface 'wifinet0'
option key 'Changeme'
option ssid 'SUN2000-HV0123456789'
option device 'radio0'
option mode 'sta'
option bssid '94:25:33:12:34:56'
option encryption 'psk2'
option network 'wlan'
config zone
option input 'ACCEPT'
option name 'sun'
option output 'ACCEPT'
option forward 'ACCEPT'
option masq '1'
option network 'wlan'
config forwarding
option dest 'sun'
option src 'lan'
config forwarding
option dest 'lan'
option src 'sun'
iptables -I PREROUTING -t nat -p tcp -d 192.168.1.2 --dport 6607 -j DNAT --to-destination 192.168.199.1:6607
iptables -I POSTROUTING -t nat -d 192.168.199.1 -p tcp --dport 6607 -j MASQUERADE
it will look like this, but obviously, IP will be different
And report back. for step 4 and 5.
ok, so I put the rule on :
network => OK
firewall => OK
Custom rules => OK
Wireless => ?? i did it also with my SSID and BSSID but strange results.
After rebooted I got :
What do you think?
@trevee only use it with wifinet0
try pinging from HA now. It seems to be connected, but the link speed is low, move openwrt router closer to your inverter.