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

Get device's name #21

Open
fishfitz opened this issue Dec 1, 2019 · 9 comments
Open

Get device's name #21

fishfitz opened this issue Dec 1, 2019 · 9 comments

Comments

@fishfitz
Copy link

fishfitz commented Dec 1, 2019

My use case is the following: I'm trying to auto-detect my camera when it is connected to the local network. Working from a w10 computer.

In my physical router interface, I can see it displayed over the name of LUMIX, which is something I could definitely work with.

But when I run the package, the only name I get is "?". Actually in none of the examples I can find in this repository's issues a device name is ever shown. Why?

Is there a way to retrieve the LUMIX name somehow, so I can auto-select it? Any suggestion about that?

Thanks you very much,

@natterstefan
Copy link
Collaborator

natterstefan commented Dec 11, 2019

Hi @cobaltway, I am sorry I haven't helped you yet. Have you figured it out in the meantime?

@Miosame
Copy link
Contributor

Miosame commented Jan 13, 2020

@cobaltway just note down your camera mac-address instead and search for it.

@fishfitz
Copy link
Author

I was not able to find anything for now.

@Miosame Sure your solution may work for my precise device. It is far from ideal to automatically detect a new camera on the network by the way. But it may be not possible.

@Miosame
Copy link
Contributor

Miosame commented Jan 13, 2020

@cobaltway the issue is that a lot of devices don't report a host name to others, besides to the router via dhcp.

I've tried plenty of solutions like arp, nmap, smb-tools,.. all couldn't get a host name most of the time.

A hacky solution but which would work is to write a wrapper for your router dashboard and read out the host names there.

Another could be to run your own dhcp server similar to how pihole handles it.

And the final would be to just discover all devices that are available via this module and then go through those detecting which of them gives a webcam feed (assuming your webcams are IPcams).

@fishfitz
Copy link
Author

I'll probably go for the last solution. My cams have a very specific API that could be used to detect wether or not the device is compatible. Nice idea.

@natterstefan
Copy link
Collaborator

Hi @cobaltway, hi @Miosame,

thanks for supporting each other and I want to apologize for the delayed response.

Does the solution work for you @cobaltway?

@jpolstre
Copy link

I found this package in npm: https://www.npmjs.com/package/network-list
It seems to do what you need (it shows the names of the computers too), but it also shows an error which does not affect the result. Test and write if it gave you the desired result

@doc-han
Copy link

doc-han commented Jan 31, 2021

Device names can be retrieved using an NSLOOKUP. So when you have a list of ip addresses for the local devices.
The command nslookup IP_HERE will return the name of the connected device. example below

C:\Users\Han\Desktop\file-sharer\server>nslookup 192.168.43.84
Server:  UnKnown
Address:  192.168.43.1

Name:    DESKTOP-K5ENA7C
Address:  192.168.43.84


C:\Users\Han\Desktop\file-sharer\server>

@fukemy
Copy link

fukemy commented Nov 22, 2023

any solution please

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

6 participants