grover / homebridge-dacp

Remotely control Apple TV and iTunes via HomeKit.
MIT License
151 stars 14 forks source link

Can't set automation based on media Type #6

Closed nitaybz closed 6 years ago

nitaybz commented 6 years ago

Hi @grover ! First of all, thank you so much for this plugin! it's very useful to me as I can set automations based on my apple TV play/paused condition and the media type...

the only problem is that I can't set media type in the conditions since the values range are very big which makes it impossible to choose the numbers 1, 2 or 3 or even any number lower than 100000: fullsizeoutput_876

I would suggest to put a max and min limit. I'll open a pull request for that

badrabbit commented 6 years ago

Same problem here. Can't set the media type.

grover commented 6 years ago

Thanks for the pull request. Where did you come up with the max/min-values? I couldn't find a documentation of the media types to be expected, which is the reason I didn't put in any restrictions.

I'm happy to merge this!

nitaybz commented 6 years ago

from HAP-NodeJS: https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L185

thanks for the merge :) and the plugin!

grover commented 6 years ago

I meant the values themselves. Because the 64 in docs came from trial&error. I'm not sure if there's anything beyond that. Also I think validValues might be more appropriate as it looks like the values are all powers of two.

nitaybz commented 6 years ago

Might be... I did the max to 64 according to your logs. I just wanted it to be accessible, but if you see another option, go for it :)

grover commented 6 years ago

I released 0.7.5 yesteday - i think that closes the issue.