rxv
rxv copied to clipboard
Yamaha Blu-ray player detected with wrong control url
rxv detects my Yamaha Blu-ray player, but gets the control url wrong.
As long as Blu-ray players are not supported by the library, they should not be detected.
>>> import rxv
>>> import requests
>>> r = rxv.find()
>>> r
[<RXV model_name="BD-S473" ctrl_url="http://[redacted]:50100/YamahaRemoteControl/ctrl" at 0x7fb96dd9ecd0>, <RXV model_name="RX-S600D" ctrl_url="http://[redacted]:80/YamahaRemoteControl/ctrl" at 0x7fb96dd9ea90>]
>>> r[1].on
True
>>> r[0].on
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/rxv/rxv.py", line 105, in on
assert power in ["On", "Standby"]
AssertionError
>>> requests.get(r[0].ctrl_url).status_code
404
This library unfortunetely does not plan to support Blue ray players, and because I don't have one this was difficult for me to replicate.
If someone is willing to help, preferably filtering thos BD players out, I will accept it.
Perhaps not the most elegant solution, but you could simply filter supported devices by model_name.startswith("RX-")? And whatever prefix the Aventage models use, I suppose those work as well.