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

[Bug]: Cannot Setup Chromecast by IP #160

Closed
arnew opened this issue Apr 12, 2023 · 13 comments
Closed

[Bug]: Cannot Setup Chromecast by IP #160

arnew opened this issue Apr 12, 2023 · 13 comments

Comments

@arnew
Copy link

arnew commented Apr 12, 2023

Contact Details

What happened?

I have tried to set up the plugin with 4 chromecast devices. However, only the last one shows up in the device list:
image
Also, the DeviceName is getMac, which looks broken to me.
Since the devices are addressed by ip and are not necessarily in the same physical domain it may be impossible to determine the mac-address...

Adapter Version

3.0.3

JS-Controller Version

18.15.0

Node JS Version

4.0.24

NPM Version

?

Operating System

Ubuntu

Relevant log output

No response

Anything else?

No response

@arnew arnew added the bug label Apr 12, 2023
@raintonr
Copy link
Contributor

raintonr commented Apr 12, 2023

Also, the DeviceName is getMac, which looks broken to me.

Yes, absolutely.

Works here on node v16.19.1 so maybe that could be a clue.

Do you see any, Cannot get MAC for errors in the log? Or anything else for that matter?

@arnew
Copy link
Author

arnew commented Apr 12, 2023

I have set the log to be verbose, but I cannot see what is going wrong:
iobroker.2023-04-12.txt

@arnew
Copy link
Author

arnew commented Apr 12, 2023

And another go where i have deleted the device in the setup and the objects from the tree before readding the device in the config:
iobroker.2023-04-12_readded.txt

@raintonr
Copy link
Contributor

This looks very odd to me. You have this message...

2023-04-12 19:42:47.870 - debug: chromecast.0 (14555) New device 1655 at 1655b165-4402-fbfc-d35e-97ac576944c3:8009

... but I can't find the string New device anywhere in the codebase.

Moreover, you have messages like this...

2023-04-12 19:42:47.800 - silly: chromecast.0 (14555) sendTo "getMac" to system.adapter.net-tools.0 from system.adapter.chromecast.0: 1655b165-4402-fbfc-d35e-97ac576944c3
2023-04-12 19:42:47.803 - silly: chromecast.0 (14555) States system redis pmessage system.adapter.chromecast.0.logLevel/system.adapter.chromecast.0.logLevel:{"val":"silly","ack":true,"ts":1681321367784,"q":0,"from":"system.adapter.chromecast.0","lc":1681320913345}
2023-04-12 19:42:47.848 - silly: chromecast.0 (14555) States system redis pmessage io.messagebox.system.adapter.chromecast.0/io.messagebox.system.adapter.chromecast.0:{"command":"send","message":"getMac","from":"system.adapter.net-tools.0","callback":{"message":"1655b165-4402-fbfc-d35e-97ac576944c3","id":1,"ack":true,"time":1681321367802},"_id":41583212}

... which implies net-tools is being used for MAC address stuff, but that was removed in this commit: 589f680

Looks to me like you have some way messed up the install. When did you last install and/or update the adapter? I would suggest fully removing it, checking it's gone from your node_modules folder and re-installing.

@raintonr
Copy link
Contributor

So I looked at this 3.0.3 in NPM and the net-tools stuff appears to still be there.

Could you please try installing the master here from Github and see if the issue persists?

@arnew
Copy link
Author

arnew commented Apr 12, 2023

The original installation was today (2023-04-12) inside of a docker container. I have upgraded to 3a5503d:

chromecast.3 2023-04-12 20:32:51.526 error 8d81 - Error: The id is empty! Please provide a valid id.
chromecast.3 2023-04-12 20:32:51.522 error 8d81 - Cannot get MAC for "8d8178c3-f01b-f630-cf2a-a8a76ec85188": TypeError: Cannot read properties of undefined (reading 'replaceAll')
chromecast.0 2023-04-12 20:32:51.407 error 1655 - Error: The id is empty! Please provide a valid id.
chromecast.0 2023-04-12 20:32:51.403 error 1655 - Cannot get MAC for "1655b165-4402-fbfc-d35e-97ac576944c3": TypeError: Cannot read properties of undefined (reading 'replaceAll')
chromecast.1 2023-04-12 20:32:51.348 error 2d02 - Error: The id is empty! Please provide a valid id.
chromecast.1 2023-04-12 20:32:51.296 error 2d02 - Cannot get MAC for "2d02e1b6-120f-810a-10a8-2f19838e2661": true
chromecast.3 2023-04-12 20:32:50.788 info starting. Version 3.1.0 (non-npm: iobroker-community-adapters/ioBroker.chromecast#3a5503d7764a59ec8e83602cbb0f62676a4b9770) in /opt/iobroker/node_modules/iobroker.chromecast, node: v18.15.0, js-controller: 4.0.24
chromecast.0 2023-04-12 20:32:50.585 silly States system redis pmessage system.adapter.chromecast.0.logLevel/system.adapter.chromecast.0.logLevel:{"val":"silly","ack":true,"ts":1681324370557,"q":0,"from":"system.adapter.chromecast.0","lc":1681320913345}
chromecast.0 2023-04-12 20:32:50.410 info starting. Version 3.1.0 (non-npm: iobroker-community-adapters/ioBroker.chromecast#3a5503d7764a59ec8e83602cbb0f62676a4b9770) in /opt/iobroker/node_modules/iobroker.chromecast, node: v18.15.0, js-controller: 4.0.24
chromecast.2 2023-04-12 20:32:50.545 error 7a3c - Error: The id is empty! Please provide a valid id.
chromecast.2 2023-04-12 20:32:50.524 error 7a3c - Cannot get MAC for "7a3c31f5-24f2-3939-afeb-53067ebc269f": TypeError: Cannot read properties of undefined (reading 'replaceAll')
chromecast.1 2023-04-12 20:32:50.081 info starting. Version 3.1.0 (non-npm: iobroker-community-adapters/ioBroker.chromecast#3a5503d7764a59ec8e83602cbb0f62676a4b9770) in /opt/iobroker/node_modules/iobroker.chromecast, node: v18.15.0, js-controller: 4.0.24
chromecast.2 2023-04-12 20:32:49.517 info starting. Version 3.1.0 (non-npm: iobroker-community-adapters/ioBroker.chromecast#3a5503d7764a59ec8e83602cbb0f62676a4b9770) in /opt/iobroker/node_modules/iobroker.chromecast, node: v18.15.0, js-controller: 4.0.24

At least now it is properly broken ;)

@arnew
Copy link
Author

arnew commented Apr 12, 2023

arnew@6d914bc
This seems to work for me ;)

@raintonr
Copy link
Contributor

arnew@6d914bc This seems to work for me ;)

Yeah... not ideal. We really need the MAC and the device creation should fail without.

Can you explain what devices and/or groups you have setup? I'm curious as to where the hostname 1655b165-4402-fbfc-d35e-97ac576944c3 came from.

@arnew
Copy link
Author

arnew commented Apr 14, 2023

The devices are the (now discontinued) Lenovo version of the google smart display (2x 10", 2x smart clock). These UUID-style hostnames are their default DHCP name...
iobroker is running in a docker container on a synology nas. IPs for my containers are from a separate subnet to the one my router handles. for direct access to these machines, apart from the usual host-port-forwarding, I have setup a static route for this subnet on my router.

@raintonr
Copy link
Contributor

I'm thinking it's your subnets that might be messing stuff up here. Did you try with all your Chromecast devices and IoB host on the same subnet?

@neopholus
Copy link
Contributor

I think that is the same issue that I posted here: #154

neopholus added a commit to neopholus/ioBroker.chromecast that referenced this issue Mar 16, 2024
…rs#160

Add additional documentation on the Device tab. Trying to read id from configuration before trying to determine MAC as ID.
@neopholus
Copy link
Contributor

proposing pull request #253 to fix this issue.

neopholus added a commit to neopholus/ioBroker.chromecast that referenced this issue Mar 17, 2024
mcm1957 added a commit that referenced this issue Apr 13, 2024
@mcm1957 mcm1957 added the fixed label Apr 13, 2024
mcm1957 added a commit that referenced this issue Apr 13, 2024
* (neopholus) Support for devices located in different subnets has been added. [#154, #160]
* (mcm1957) Dependencies have been updated
@mcm1957
Copy link
Member

mcm1957 commented May 15, 2024

fixed with 3.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants