Open kamils85 opened 4 years ago
Unless you use --net=host
, containers cannot see the Chromecasts.
I did run it with --net=host option enabled hence the logs showing the device. It's just the admin portal that won't show them.
I have also tried with manual installation (not the docker) and it's the same. The TV's are being discovered by the avahi driver but the admin page still won't show them :/
It seems the device was detected at some point but is not anymore. I don't have much clue as why nodecastor is able to see it and not dashkiosk... Maybe update mdns package?
Is there a cli command I can use to send a test url to the chromcast device?
You can try with nodecastor. But nodecastor sees the Chromecast while Dashkiosk doesn't.
I have updated the mdns package to the lastest but still no luck. What's the best way to debug Dashkiosk?
At https://github.com/vincentbernat/dashkiosk/blob/master/lib/chromecast.js#L133, you see you should get a log message when a new device is detected. You don't get it. It's called from https://github.com/vincentbernat/dashkiosk/blob/master/server.js#L41. Just to be sure, you did specifically enable Chromecast support (either in config file or on command line)?
I do get it. If I switch on more TVs I get more logs that they have been discovered unless we are talking about different things.
{"address":"192.168.15.29","port":8009,"id":"7a45c2096bd3c44e54babb002af33ea4","friendlyName":"tv1","level":"info","message":"New Chromecast device discovered","timestamp":"2020-10-15T18:22:40.487Z"}
Just not sure where to go next.
Oh, I have missed this! With nodecastor's chromecast
, can you check the status of the Chromecast? Something like:
bin/chromecast status 192.168.15.29 8009
info: Status received:
{ applications:
[ { appId: 'E8C28D3C',
appType: 'WEB',
displayName: 'Backdrop',
iconUrl: '',
isIdleScreen: true,
launchedFromCloud: false,
namespaces:
[ { name: 'urn:x-cast:com.google.cast.debugoverlay' },
{ name: 'urn:x-cast:com.google.cast.cac' },
{ name: 'urn:x-cast:com.google.cast.sse' },
{ name: 'urn:x-cast:com.google.cast.remotecontrol' } ],
sessionId: '86a380a9-b589-4ddb-bb4f-2f6c296eb8ca',
statusText: '',
transportId: '86a380a9-b589-4ddb-bb4f-2f6c296eb8ca',
universalAppId: 'E8C28D3C' } ],
userEq: {},
volume:
{ controlType: 'master',
level: 0.05000000074505806,
muted: false,
stepInterval: 0.009999999776482582 } }
It seems OK. Can you run Dashkiosk with log.level
set to debug
? It should tell more why it doesn't handle the Chromecast.
I will try to set it up but just to let you know my TV just got discovered few minutes ago.
Now the status looks like this:
info: Status received:
{ applications:
[ { appId: '5E7A2C2C',
appType: 'WEB',
displayName: 'Dashkiosk Chromecast receiver',
iconUrl: '',
isIdleScreen: false,
launchedFromCloud: false,
namespaces:
[ { name: 'urn:x-cast:com.google.cast.debugoverlay' },
{ name: 'urn:x-cast:com.google.cast.cac' },
{ name: 'urn:x-cast:com.deezer.cast.dashkiosk' } ],
sessionId: '7a21922e-96e2-44e2-b64f-5b6d75009df8',
statusText:
'Receiver: http://192.168.15.30:8081/receiver#register=Gde4LPXIy6U5aBZwDeZdrtahxPfJykwFmYzlCwpQEmU=|1602816549|BGMp35pFFg4KTQ==|Aje39vTzvAKuoKUSwSPCWA==|YmvVvro5iD5xQowahwsC1AkTtrQbBu0y1OtnqxHst7uWQ6s7jnnrnXv0fyj2Dr5ZhdQ0gVc+aoYAUEkvCfeD7Q==',
transportId: '7a21922e-96e2-44e2-b64f-5b6d75009df8',
universalAppId: '5E7A2C2C' } ],
isActiveInput: true,
isStandBy: false,
userEq: {},
volume:
{ controlType: 'master',
level: 0.05000000074505806,
muted: false,
stepInterval: 0.009999999776482582 } }
Ok, yesterday all the Chromcast TV's appeared on the admin menu but after rebooting them they are no longer visible and we're back to where we started.
I have enabled the debug logs and here is the result:
{"level":"info","message":"Rescan Chromecast devices","timestamp":"2020-10-21T13:31:22.446Z"}
{"protocol_version":0,"source_id":"sender-1IAXXNFV3L","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:23.073Z"}
{"protocol_version":0,"source_id":"sender-JBJO3P7UJM","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:23.074Z"}
{"protocol_version":0,"source_id":"sender-ICB1E6EI8T","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:23.075Z"}
{"protocol_version":0,"source_id":"sender-H3RY5YYAQ1","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:23.115Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-1IAXXNFV3L","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:23.153Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-JBJO3P7UJM","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:23.153Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-ICB1E6EI8T","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:23.154Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-H3RY5YYAQ1","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:23.155Z"}
{"protocol_version":0,"source_id":"sender-1IAXXNFV3L","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:53.154Z"}
{"protocol_version":0,"source_id":"sender-JBJO3P7UJM","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:53.156Z"}
{"protocol_version":0,"source_id":"sender-ICB1E6EI8T","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:53.156Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-1IAXXNFV3L","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:53.160Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-JBJO3P7UJM","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:53.161Z"}
{"protocol_version":0,"source_id":"sender-H3RY5YYAQ1","destination_id":"receiver-0","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":"STRING","payload_utf8":"{\"type\":\"PING\"}","payload_binary":null,"level":"debug","message":"Sent to Chromecast","timestamp":"2020-10-21T13:31:53.162Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-ICB1E6EI8T","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:53.163Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"sender-H3RY5YYAQ1","namespace":"urn:x-cast:com.google.cast.tp.heartbeat","payload_type":0,"payload_utf8":"{\"type\":\"PONG\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:31:53.166Z"}
Also when I cast from Chrome browser to the TV I see this in logs:
{"protocol_version":0,"source_id":"receiver-0","destination_id":"*","namespace":"urn:x-cast:com.google.cast.receiver","payload_type":0,"payload_utf8":"{\"requestId\":0,\"status\":{\"userEq\":{},\"volume\":{\"controlType\":\"master\",\"level\":0.10000000149011612,\"muted\":false,\"stepInterval\":0.009999999776482582}},\"type\":\"RECEIVER_STATUS\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:34:53.535Z"}
{"id":"7a45c2096bd3c44e54babb002af33ea4","chromecast":"tv1","level":"debug","message":"Chromecast device is NOT on home screen","timestamp":"2020-10-21T13:34:53.539Z"}
{"protocol_version":0,"source_id":"receiver-0","destination_id":"*","namespace":"urn:x-cast:com.google.cast.receiver","payload_type":0,"payload_utf8":"{\"requestId\":0,\"status\":{\"userEq\":{},\"volume\":{\"controlType\":\"master\",\"level\":0.10000000149011612,\"muted\":false,\"stepInterval\":0.009999999776482582}},\"type\":\"RECEIVER_STATUS\"}","payload_binary":null,"level":"debug","message":"Received from Chromecast","timestamp":"2020-10-21T13:34:53.553Z"}
{"id":"7a45c2096bd3c44e54babb002af33ea4","chromecast":"tv1","level":"debug","message":"Chromecast device is NOT on home screen","timestamp":"2020-10-21T13:34:53.553Z"}
at the moment all my Chromcast devices show this status:
info: Status received:
{ userEq: {},
volume:
{ controlType: 'master',
level: 0.10000000149011612,
muted: false,
stepInterval: 0.009999999776482582 } }
I can ping them by dns name in case this helps
ping 1ac20f47-3f80-2881-205f-d05b3ef6f625.local
PING 1ac20f47-3f80-2881-205f-d05b3ef6f625.local (192.168.15.29) 56(84) bytes of data.
64 bytes from Android-4.local (192.168.15.29): icmp_seq=1 ttl=64 time=1.78 ms
64 bytes from Android-4.local (192.168.15.29): icmp_seq=2 ttl=64 time=1.55 ms
64 bytes from Android-4.local (192.168.15.29): icmp_seq=3 ttl=64 time=1.80 ms
64 bytes from Android-4.local (192.168.15.29): icmp_seq=4 ttl=64 time=1.76 ms
any other suggestions?
@vincentbernat I managed to get it to work only if I manually run this command:
chromecast dashkiosk 192.168.15.29 https://anywebsite.com
Once I've done that the device appears on the admin portal and I can move to a group. I ran this command for all my TVs and they all came up on the dashkiosk however if I switch the TV off and back on again I need to run this command again to make them online if that makes sense.
Appreciate your help so far. Do you have any more suggestions?
I've also noticed that the dashkiosk likes to crash very often when I disconnect my TVs from the network but that's probably another issue.
":44,"15132":34,"15133":49,"15134":51,"15135":54,"15136":53,"15137":34,"15138":58,"15139":49,"15140":48,"15141":49,"15142":44,"15143":34,"15144":49,"15145":51,"15146":54,"15147":54,"15148":34,"15149":58,"15150":49,"15151":49,"15152":52,"15153":44,"15154":34,"15155":49,"15156":51,"15157":54,"15158":55,"15159":34,"15160":58,"15161":51,"15162":52,"15163":44,"15164":34,"15165":49,"15166":51,"15167":54,"15168":56,"15169":34,"15170":58,"15171":53,"15172":56,"15173":44,"15174":34,"15175":49,"15176":51,"15177":54,"15178":57,"15179":34,"15180":58,"15181":57,"15182":49,"15183":44,"15184":34,"15185":49,"15186":51,"15187":55,"15188":48,"15189":34,"15190":58,"15191":57,"15192":51,"15193":44,"15194":34,"15195":49,"15196
<--- Last few GCs --->
[1:0x3a6f040] 864603 ms: Scavenge 616.6 (644.4) -> 600.8 (644.4) MB, 0.8 / 0.0 ms (average mu = 0.976, current mu = 0.966) allocation failure
[1:0x3a6f040] 864624 ms: Scavenge 616.6 (644.4) -> 600.8 (644.4) MB, 0.9 / 0.0 ms (average mu = 0.976, current mu = 0.966) allocation failure
[1:0x3a6f040] 864646 ms: Scavenge 616.6 (644.4) -> 600.8 (644.4) MB, 0.8 / 0.0 ms (average mu = 0.976, current mu = 0.966) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x2a066305be1d]
Security context: 0x0d3fbb19e6e9 <JSObject>
1: derez(aka derez) [0x35fc3b882241] [/dashkiosk/dist/node_modules/cycle/cycle.js:~46] [pc=0x2a066337bacf](this=0x23a664a026f1 <undefined>,value=0x25bb1d983a91 <Uint8Array map = 0x207c53e05539>,path=0x0954cd473999 <String[170]: $["logger"]["transports"]["file"]["_stream"]["_writableState"]["bufferedRequest"]["next"]["next"]["next"]["next"]["next"]["next"...
FATAL ERROR: invalid table size Allocation failed - JavaScript heap out of memory
1: 0x8fa0c0 node::Abort() [node]
2: 0x8fa10c [node]
3: 0xb0026e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb004a4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xef49b2 [node]
6: 0x1059baa v8::internal::OrderedHashTable<v8::internal::OrderedHashSet, 1>::Allocate(v8::internal::Isolate*, int, v8::internal::PretenureFlag) [node]
7: 0x105cdfb v8::internal::OrderedHashTable<v8::internal::OrderedHashSet, 1>::Rehash(v8::internal::Handle<v8::internal::OrderedHashSet>, int) [node]
8: 0x105d3c9 v8::internal::OrderedHashTable<v8::internal::OrderedHashSet, 1>::EnsureGrowable(v8::internal::Handle<v8::internal::OrderedHashSet>) [node]
9: 0x105d4c0 v8::internal::OrderedHashSet::Add(v8::internal::Handle<v8::internal::OrderedHashSet>, v8::internal::Handle<v8::internal::Object>) [node]
10: 0xfcf6f5 v8::internal::KeyAccumulator::AddKey(v8::internal::Handle<v8::internal::Object>, v8::internal::AddKeyConversion) [node]
11: 0xe6e7a0 [node]
12: 0xfd16ab v8::internal::KeyAccumulator::CollectOwnElementIndices(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::JSObject>) [node]
13: 0xfd2b12 v8::internal::KeyAccumulator::CollectOwnKeys(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::JSObject>) [node]
14: 0xfd37d5 v8::internal::KeyAccumulator::CollectKeys(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::JSReceiver>) [node]
15: 0xfd3c03 v8::internal::FastKeyAccumulator::GetKeys(v8::internal::GetKeysConversion) [node]
16: 0x115d533 v8::internal::Runtime_ForInEnumerate(int, v8::internal::Object**, v8::internal::Isolate*) [node]
17: 0x2a066305be1d
Sorry for not helping. 644 MB seems to be a lot and there may be a leak somewhere. I didn't run into this issue, but I am not using Chromecasts since a long time. Dashkiosk works for me, but the code is getting pretty old, depending on old versions of many libraries and I have no time and no motivation to update. JS is not my favorite language and the ecosystem moves too fast for me. I am just saying that for you not to spend too much time on trying to make it work.
So, for the leak, no clue. For the problem to detect Chromecast, your best bet is to add many logger.info()
into chromecast.js
and see what step is missing to detect the Chromecasts. It seems the problem is on the detection of the Chromecast being on the homepage, but the status
command you got is correct, it shows E8C28D3C as the ID of the current app and it should be enough to detect it's on homescreen and therefore to take control of them. Moreover, you should get a debug message and your last debug trace didn't show that.
Hello,
Similar issue to #99 but it's now working for me. I run Docker version of the kiosk and I can see the device in the cli but it's not showing up in the admin menu.
Would really appreciate any advice :)