What's new

YazFi Curl not working from router, but does from browser

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

brob2684

New Around Here
Hi,

I'm trying to set up YazFi to separate out my IOT devices from the rest of my personal devices and I've got myself stuck trying to query my inverter running the command:

Code:
curl http://{ip}/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System&DataCollection=CumulationInverterData

When my inverter is located on the main Wifi network, e.g. ip = 192.168.1.90, then I can run the command above in a SSH session on my router and receive a JSON response. I can also receive the same response if I type the command into a browser on my PC.

However, when I move the inverter to the guest network (#2 2.4GHz), e.g. ip = 192.168.3.90, then the command above doesn't yield a response when run from a SSH session on the router, instead failing with the message:

Code:
* Failed to connect to 192.168.3.90 port 80 after 45073 ms: Error
curl: (28) Failed to connect to 192.168.3.90 port 80 after 45073 ms: Error

Interestingly, the command continues to work when run from a browser on my PC, and from the command prompt using curl.

I have tried different combinations of one-way to guest / two-way to guest / client isolation but to no avail.

Is anyone able to shed some light on what I need to change to allow the router to run the command successfully?

Appreciate any suggestions and please let me know if you need more info,
brob2684
 
Last edited:
Small progress, but I don't know what the correct solution is to apply.

If I turn off the firewall on the router (Firewall -> General -> Enable Firewall = No) then I can run the command on the router. When Enable Firewall = Yes, the command does not run.

I figure it's probably not a good idea to keep the firewall off. Does anyone know what I should be doing in this case?
 
It may help if you post the router model and it's firmware version just in case its something specific to both.

To confirm you are not using AiMesh and do not have your IoT devices connected to AiMesh nodes, correct? YazFi doesn't work with AiMesh nodes. See Jack Yaz's post here on AiMesh.

It possible you may have to use custom scripting to open up communication between the router (or main LAN clients) and the YazFi Guest Network client. See the following links for more on custom scripting with YazFi.
 
Thanks for the tips, but so far no change.

Router is Asus RT-67U running Merlin 386.9.

I am using AiMesh, but the IoT device is connected to the main router. Am I correct in understanding that Jack Yaz's post means that any guest device connected to a node has the equivalent access to a device on the main WiFi network?

I have tried unsuccessfully with those custom firewall rules - the YazFi restarts with no error messages, but there is no change in behaviour. Where the examples have 192.168.1.50 I was inserting the address of my router and changing the wl0.1 to wl0.2 reflecting my setup. Does this sound like the correct approach?

Ultimately, if using AiNodes risks making the segregation redundant, do you suppose I might be better off just reverting back to my original setup?
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top