Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYNO.Mesh.Network.WANStatus generates error #1

Closed
stephan1827 opened this issue Nov 29, 2023 · 6 comments
Closed

SYNO.Mesh.Network.WANStatus generates error #1

stephan1827 opened this issue Nov 29, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@stephan1827
Copy link

Hi,
I am using the sample and get the following error message "error (main) API does not exist" for the command const wanStatus = await client.getWanStatus()

The rest of the script executes fine. I am using a RT6600 router with SRM 1.3.1. Update 8

@nioc
Copy link
Owner

nioc commented Nov 29, 2023

Hello, you're right, I can not find it in the GUI either, maybe this method has been deprecated.

I will update the library in order to request the SYNO.Core.Network.Router.ConnectionStatus which replies something more precise:

Request:

{
    "api": "SYNO.Core.Network.Router.ConnectionStatus",
    "method": "get",
    "version": 1
},

Reply:

{
	"ipv4": {
		"conn_status": "normal",
		"ifname": "eth0",
		"ip": "192.168.1.16",
		"pppoe": false,
		"vpn_profile": ""
	},
	"ipv6": {
		"conn_status": "not available",
		"ifname": "",
		"ip": "",
		"pppoe": true
	}
}

@nioc nioc self-assigned this Nov 29, 2023
@nioc nioc added the bug Something isn't working label Nov 29, 2023
@stephan1827
Copy link
Author

Thx for the quick response. ConnectionStatus seems to work fine. Is there any kind of documentation what API function calls are available?

@nioc
Copy link
Owner

nioc commented Nov 29, 2023

From Synology, not to my knowledge, I look at the HTTP requests launched from the GUI...
For this library, you can look in the test file for mocked API replies.

@nioc nioc closed this as completed in 0303dd7 Nov 29, 2023
@nioc
Copy link
Owner

nioc commented Nov 29, 2023

@stephan1827 Fix is available in version 1.1.1 on npm

@stephan1827
Copy link
Author

The function getWifiDevices also throws the same error. I looked through the web code, but I could not find an equivalent function.

The function getMeshNodes also throws an error, I think the version in the function must be changed from 3 to 4

@nioc nioc reopened this Dec 2, 2023
nioc added a commit that referenced this issue Dec 2, 2023
nioc added a commit that referenced this issue Dec 2, 2023
…lter

Version 5 add `network` attribute in response for online devices.
Providing `conntype` parameter allow filtering Wi-Fi devices (default to `all`, as previous behaviour).
Contribute to #1
@nioc nioc closed this as completed in f59a30c Dec 2, 2023
@nioc
Copy link
Owner

nioc commented Dec 2, 2023

@stephan1827 Fix for both method is available in version 1.1.2 on npm.
I also update sample code in README.MD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants