ioBroker.chromecast
ioBroker.chromecast copied to clipboard
[Bug]: Cannot Setup Chromecast by IP
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:
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
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?
I have set the log to be verbose, but I cannot see what is going wrong: iobroker.2023-04-12.txt
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
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: https://github.com/iobroker-community-adapters/ioBroker.chromecast/commit/589f6804e63a9843163acf2aaf4dbeaba6b361a5
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.
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?
The original installation was today (2023-04-12) inside of a docker container. I have upgraded to 3a5503d7764a59ec8e83602cbb0f62676a4b9770:
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 ;)
https://github.com/arnew/ioBroker.chromecast/commit/6d914bc85652fe61bda74509b530fcd0907c9e14 This seems to work for me ;)
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.
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.
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?
I think that is the same issue that I posted here: https://github.com/iobroker-community-adapters/ioBroker.chromecast/issues/154
proposing pull request #253 to fix this issue.
fixed with 3.4.0