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

Searchin devices is not consistent #1

Open
rapiertg opened this issue Nov 26, 2016 · 3 comments
Open

Searchin devices is not consistent #1

rapiertg opened this issue Nov 26, 2016 · 3 comments

Comments

@rapiertg
Copy link

Hello,

When I search devices several times, than sometimes the searched devices show as 'a' and sometimes as 'x' with --all parameter. Sometimes they are randomly missing too. ex:

python2  dlnap.py --all
Discovered devices:
 [a] Kodi (LibreELEC) @ 192.168.1.20
 [a] Volumio @ 192.168.1.29
 [a] Marantz M-CR611 @ 192.168.1.26
python2 dlnap.py --all
Discovered devices:
 [a] Kodi (LibreELEC) @ 192.168.1.20
 [a] Volumio @ 192.168.1.29
 [a] Marantz M-CR611 @ 192.168.1.26
python2 dlnap.py --all
Discovered devices:
 [a] Marantz M-CR611 @ 192.168.1.26
 [a] Volumio @ 192.168.1.29
 [x] Kodi (LibreELEC) @ 192.168.1.20
python2 dlnap.py --all
Discovered devices:
 [a] Volumio @ 192.168.1.29
 [a] Marantz M-CR611 @ 192.168.1.26
[kamil@kamildesktop dlnap]$ python2 dlnap.py --all
Discovered devices:
 [a] Marantz M-CR611 @ 192.168.1.26
 [a] Volumio @ 192.168.1.29
 [a] Kodi (LibreELEC) @ 192.168.1.20
@cherezov
Copy link
Owner

Hi!
Thanks for using dlnap :)
It requires some time for devices to receive discover request and send response back to script, so it can happen that default timeout is not enough. You can easily increase discover timeout with --timeout argument.
By default dlnap.py discovers supported only devices via sending special request. Only devices with AVTransport feature are replying. In case of --all argument all devices sends their information back to script. Script extracts AVTransport information from device description xml. It is really magic for me now, but some devices (e.g my Samsung TV) misses such information sometime.
I'll try to investigate this issue when possible.
Thanks for reporting this :)

@rapiertg
Copy link
Author

Didnt notice a parameter for it and was changeing inside the code :). With --timeout 3 I am getting about 100% of accuraccy. With timeout 1 about 20%. Maybe it should be higer by default?

@cherezov
Copy link
Owner

cherezov commented Nov 26, 2016

Personally I never felt in timeout issue due to using --ip argument. Anyway it is a good idea to increase default timeout, I'll change it while next commit.

cherezov pushed a commit that referenced this issue Sep 15, 2017
Added seek, get_volume, position_info function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants