by Linwood » Mon Nov 28, 2022 5:29 pm
Ludek wrote: ↑Mon Nov 28, 2022 12:23 pm
1) Did you intend to support multiple active NIC's? I am not sure it is worth the effort for typical users, but if you do, it is not working properly.
AFAIR it works to discover devices on multiple NICs by binding to '0.0.0.0'; // INADDR_ANY (to bind socket to all available interfaces). And multicast group 224.0.0.251 (port 5353) when doing the mDNS discovery. Couldn't it be rather blocked by firewall in your environment?
No, first both are attached, so one would receive it directly not through the router. But just conceptually if it works with NIC #1, adding NIC #2 (if it is listening on both) would not have an impact on what NIC #1 receives.
Also, Chrome (the browser) on this PC sees all the speakers correctly in the one NIC and two NIC configuration.
Finally, just to be sure, I did a packet capture and I can see the broadcast that defines the group coming in on the expected interface (broadcast to 224.0.0.251 UDP port 5353).
It's been too long since I did any socket programming but it just seems to me that you are giving some preference to one NIC over the other, and (again guessing) it's listening on only one. Or, I guess, it is possible it hears the broadcast (listening on both) but somehow decides it doesn't have a proper path to it, comparing to the other NIC's IP (which is on a different subnet of course).
Regardless, the key test to me is Chrome sees it, but MM does not. However, again, I think this is an unusual configuration, but if you want to make it work, I'm more than happy to collect some data.
Ludek wrote: ↑Mon Nov 28, 2022 12:23 pm
2) Are the speaker groups supposed to appear in LAST_REMOTE_PLAYERS at all? They do not, which prevents it from saving attributes, but also prevents that array from being used for off-subnet groups (it works fine for off-subnet individual speakers).
LAST_REMOTE_PLAYERS was intruduced just like a temporal "cache" to list Google Cast devices that has temporarily failed to discover for some reason, there is currently a timeout (AFAIR 7 days) for which they appear in the list of devices. So maybe in your environment the devices couldn't be discovered temporarily which resulted also in the groups not appearing, right?
OK, but I am not sure I understand the implication. Consider this scenario: I removed LAST_REMOTE_PLAYERS content entirely, and connect to the one NIC on the same subnet as the speakers. I can see the groups and individual speakers, all is good, they all appear exactly as expected. I shut down MM and look at persistent.json. Do you expect the groups to be in the list? All I see are the individual speakers (and NOT the individual speakers that make up the groups).
Other than not persisting volume (and maybe other things) this does not keep it from working on a single nic, but groups (and the groups' components) are not present.
There is also an unrelated oddity I found: If you edit persistent.json in visual studio, allowing visual studio to reformat it, it is no longer acceptable to MM, it gives no error but it discards all (or almost all) of the settings. Editing as one huge string works fine, it is not the editing but the reformatting. That's odd, json should be immune to formatting like that, but it is also hardly an error a typical user will encounter. But I feel if persistent.json is discarded by MM, there should be some popup warning, the old version saved, something.
I cannot replicate this, what's your version of Visual Studio? I tried with Visual Studio Code 1.73.1
[/quote]
I haven't been programming in ages so mine is 16.10.3, but I doubt that is the real issue, I suspect it is something in the data. If you are interested in pursuing, can I send you a copy of an unformatted and formatted persistent.json and see if one works and one fails for you? Though obviously there is context in there for my setup. I'd rather not post publicly, not sure what's in those 10,000 plus lines.
[quote=Ludek post_id=503326 time=1669656205 user_id=7319]
[quote]
1) Did you intend to support multiple active NIC's? I am not sure it is worth the effort for typical users, but if you do, it is not working properly.
[/quote]
AFAIR it works to discover devices on multiple NICs by binding to '0.0.0.0'; // INADDR_ANY (to bind socket to all available interfaces). And multicast group 224.0.0.251 (port 5353) when doing the mDNS discovery. Couldn't it be rather blocked by firewall in your environment?
[/quote]
No, first both are attached, so one would receive it directly not through the router. But just conceptually if it works with NIC #1, adding NIC #2 (if it is listening on both) would not have an impact on what NIC #1 receives.
Also, Chrome (the browser) on this PC sees all the speakers correctly in the one NIC and two NIC configuration.
Finally, just to be sure, I did a packet capture and I can see the broadcast that defines the group coming in on the expected interface (broadcast to 224.0.0.251 UDP port 5353).
It's been too long since I did any socket programming but it just seems to me that you are giving some preference to one NIC over the other, and (again guessing) it's listening on only one. Or, I guess, it is possible it hears the broadcast (listening on both) but somehow decides it doesn't have a proper path to it, comparing to the other NIC's IP (which is on a different subnet of course).
Regardless, the key test to me is Chrome sees it, but MM does not. However, again, I think this is an unusual configuration, but if you want to make it work, I'm more than happy to collect some data.
[quote=Ludek post_id=503326 time=1669656205 user_id=7319]
[quote]
2) Are the speaker groups supposed to appear in LAST_REMOTE_PLAYERS at all? They do not, which prevents it from saving attributes, but also prevents that array from being used for off-subnet groups (it works fine for off-subnet individual speakers).
[/quote]
LAST_REMOTE_PLAYERS was intruduced just like a temporal "cache" to list Google Cast devices that has temporarily failed to discover for some reason, there is currently a timeout (AFAIR 7 days) for which they appear in the list of devices. So maybe in your environment the devices couldn't be discovered temporarily which resulted also in the groups not appearing, right?
[/quote]
OK, but I am not sure I understand the implication. Consider this scenario: I removed LAST_REMOTE_PLAYERS content entirely, and connect to the one NIC on the same subnet as the speakers. I can see the groups and individual speakers, all is good, they all appear exactly as expected. I shut down MM and look at persistent.json. Do you expect the groups to be in the list? All I see are the individual speakers (and NOT the individual speakers that make up the groups).
Other than not persisting volume (and maybe other things) this does not keep it from working on a single nic, but groups (and the groups' components) are not present.
[quote]
There is also an unrelated oddity I found: If you edit persistent.json in visual studio, allowing visual studio to reformat it, it is no longer acceptable to MM, it gives no error but it discards all (or almost all) of the settings. Editing as one huge string works fine, it is not the editing but the reformatting. That's odd, json should be immune to formatting like that, but it is also hardly an error a typical user will encounter. But I feel if persistent.json is discarded by MM, there should be some popup warning, the old version saved, something.[/quote]
I cannot replicate this, what's your version of Visual Studio? I tried with Visual Studio Code 1.73.1
[/quote]
I haven't been programming in ages so mine is 16.10.3, but I doubt that is the real issue, I suspect it is something in the data. If you are interested in pursuing, can I send you a copy of an unformatted and formatted persistent.json and see if one works and one fails for you? Though obviously there is context in there for my setup. I'd rather not post publicly, not sure what's in those 10,000 plus lines.