Kodi Community Forum

Full Version: Client Restriction
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Client Restriction stops working for me. The only change I made was updating my version of xbmc to 13.2 since the older version kept crashing when watching live tv. I am using a fire tv. I did not touch anything in the server side. Any ideas?
WHen asking for help please submit a ServerWMC log file on pastebin (instructions how to do this are in the forum sticky if you dont know how).

At a guess I'd say you previously setup restrictions based on your non windows client's hostname being sent over as their IP address whereas in later versions of pvr.wmc we send the actual hostname instead so ServerWMC wont see a match and apply the client restrictions since the client name is different. You may be running a newer version of pvr.wmc now depending on what you were on previously and which beta of 13.2 you have installed.

A ServerWMC log file will show your ClientRestriction config settings as well as the host names coming in from your clients
Reading your reply I was able to figure what the issue is. I don't understand it but it seems to work. ServerWMC is detecting my fire tv as 'localhost' which is weird. It says under "client online:localhost"
yeah, its actually that the FireTV's hostname is "localhost" and pvr.wmc latest version sends across the host name rather than the IP address. ServerWMC hasnt changed and doesnt "detect" anything... it's just that the newer client is now sending a different name over.

So you can either setup your ClientRestrictions for client named "localhost" or set hte hostname on your FireTV to be something more proper and then use that

Now the fun would be if you had 2 FireTVs that both identified themselves as "localhost" - that would cause all sorts of dramas. We have a fix for that in the next release which isnt out yet
(2014-08-19, 06:37)scarecrow420 Wrote: [ -> ]yeah, its actually that the FireTV's hostname is "localhost" and pvr.wmc latest version sends across the host name rather than the IP address. ServerWMC hasnt changed and doesnt "detect" anything... it's just that the newer client is now sending a different name over.

So you can either setup your ClientRestrictions for client named "localhost" or set hte hostname on your FireTV to be something more proper and then use that

Now the fun would be if you had 2 FireTVs that both identified themselves as "localhost" - that would cause all sorts of dramas. We have a fix for that in the next release which isnt out yet

I was thinking about that drama when I started reading your post so I kind of freeze for a minute until you addressed it Big Grin

I ended up changing the restriction client name to 'localhost' for the time being. I need to find a guide on how to change the firetv hostname. I thought the client was pulling the name of the xmbc so I changed that to 'xbmc-002' and that didn't make a difference. I kind of liked the IP address concept. I am pretty sure you guys have a reason for changing it but it was straight forward.
(2014-08-19, 06:37)scarecrow420 Wrote: [ -> ]Now the fun would be if you had 2 FireTVs that both identified themselves as "localhost" - that would cause all sorts of dramas. We have a fix for that in the next release which isnt out yet

I like the way you guys roll. Anticipating limitations and planning improvements all basically without even any user complaints. I love it! You guys are the sh*t!
lol well it wasnt quite like that. historically in the pvr addon side, we grabbed the host name when on windows and used the IP address when not. Whilst making other changes I saw this and knowing that the get_hostname() call is cross platform figured "what harm could it do" to start using hostname from non windows boxes as well. And it was only after doing all that and getting the changes officially included in XBMC 13.2 Beta 2 that we then realised that many devices such as android phones/boxes and raspberry pi's actually have generic/identical hostnames. But it is quite time consuming to get changes into XBMC official releases so I really couldnt fix it on the client side, but luckily can do some trickery in ServerWMC along the lines of "if i see clients with the same hostname but different IP address generate a new hostname alias to identify them uniquely". I actually coded the fix weeks ago (ie the day after I realised the problem Id caused) but we havent done another ServerWMC release since we dont have many things to release.

There has actually been 1 user who ran into the problem (2 raspberry pi's with same hostname and stealing eachothers tuners/livestreams etc) and now this thread where the client restrictions dont work

Infact this thread reminding me about client restrictions makes me realise that the way ive done the host name aliasing when duplicates are encountered isnt going to always work with client restrictions, since the aliases arent deterministic and could be different each time ServerWMC is restarted, depending on which duplicate named client talks to it first! I originally was just going to append the IP address to the hostname (eg localhost-192.168.1.129) but we thought that was a bit long and ugly so i then went with a "localhost1" "localhost2" etc method. But as I say, the first client to talk to ServerWMC is localhost, then the next is localhost2, so if you setup restrictions on localhost2 that could actually be either of the 2 boxes depending on what order they first communicate with ServerWMC after a restart.

Argh Big Grin So actually, there was no good reason for making this change really (except an innate belief that a hostname should be unique) and I infact regret having done it! Big Grin But thanks for the compliment anyhow Smile
lol. Hoops is testing the version we are readying for release, but I think I can get a fix for this in before the final anyway. I think I will just change the client restriction code to look up by name and failing that IP - seems like that should do it.

PS I still think that change was good too, but I also cannot think of a reason why.
I wish I could agree that the change was good for me Big Grin

I have xbmc on fire tv and it was constantly crashing and no help from forum. Apparently everyone's xbmc is crashing too. The girlfriend was in my ears complaining all day. As last resort I decided to upgrade to the latest xbmc build hoping that would fix the problem. After upgrading this issue appears and the girlfriend was look at me like "dude you just made it worst" :\ . I then spent hours trying to understand what broke since I technically didn't change anything. I kept telling her "I didn't change anything". I went to take a look at the server and saw the device being connected as 'localhost'. Since the word localhost is such a common word in networking that I didn't make anything by it and kept rebooting the server service hoping it would just change it's mine and work. LOL

Are you guys planning on rolling back? I want to monitor this and change the config file for the proper name or ip if necessary.
We are not planning on rolling back (but the older version of serverwmc is on the download page). I made the code fix and it seems to solve the problem, so the next rev, which will release in a day or two will fix this problem. In this rev you can use the IP address of your firetv machine to set the client restriction.
Just a note, if you want to rollback it's the client side that needs to be rolled back , not ServerWMC

Just install pvr.wmc 2.97 and the non windows client will send it's ip address as clientname again
(2014-08-21, 00:01)krustyreturns Wrote: [ -> ]We are not planning on rolling back (but the older version of serverwmc is on the download page). I made the code fix and it seems to solve the problem, so the next rev, which will release in a day or two will fix this problem. In this rev you can use the IP address of your firetv machine to set the client restriction.

Ok. Thanks for the update.

(2014-08-21, 00:06)scarecrow420 Wrote: [ -> ]Just a note, if you want to rollback it's the client side that needs to be rolled back , not ServerWMC

Just install pvr.wmc 2.97 and the non windows client will send it's ip address as clientname again

That's weird. I was running 2.99 on 13.1 and I didn't have that problem before.
Can anyone tell me what's the problem now?

log: http://pastebin.com/raw.php?i=U4S3EFEf
config: http://pastebin.com/raw.php?i=aum2MN4x

Also how do I set restrictions for multiple clients. I thought I new how to until I realized I didn't know Big Grin
Currently your client restriction is set to 'localhost'. Below is from your config, I added a second client call Krusty for an example, the channel group that is being imported is called 'custom'. ( Its hard to read because for some reason I can't get the indents in the post)


<ClientRestrictions>
<ClientRestriction>
<Client>localhost</Client>
<RestrictChannels>RestrictToGroups</RestrictChannels>
<RestrictRecordings>Unrestricted</RestrictRecordings>
<Groups>Custom</Groups>
</ClientRestriction>
<ClientRestriction>
<Client>Krusty</Client>
<RestrictChannels>RestrictToGroups</RestrictChannels>
<RestrictRecordings>Unrestricted</RestrictRecordings>
<Groups>Custom</Groups>
</ClientRestriction>
</ClientRestrictions>
OK here's what happened. Before I reached out for help I did exactly what you did and swmc crashed right after I clicked reload config. I think it crashed because the swmc is running on the same box as my mediabrowser server. Swmc reads it as media browser 'the up symbol' htpc. Its a weird name. Anyway, when i restarted swmc is erased my previous config file and returned with the default. I changed it to what I sent you but my client 'localhost' still doesn't get the channel restrictions. I received all 600+ channels. 'Custom' group only has no more than 60 channels. It ranges from 702 - 777. It used to work and now it doesn't but I can't figure out why.

Also would it be possible to restrict base on subnet. That way I would not have to manually restrict all three clients to the same group(s). Lastly, the client hostname change is very confusing. 10.10.1.2 to me is simpler than localhost which happens to be my fire TV not the actual box its running on. Oops one more thing. How would the client restriction works with MBS on the same box? How can I configure it?
Pages: 1 2