miracle2k / onkyo-eiscp

Control Onkyo A/V receivers over the network; usuable as a script, or as a Python library.
MIT License
466 stars 110 forks source link

Command is working, but is giving an error, why? #91

Open megapearl opened 6 years ago

megapearl commented 6 years ago

Hi,

root@ubuntu-server:/usr/share/homeassistant/config/shellcommands# /usr/local/bin/onkyo --host 10.0.0.5 --port 60128 zone3.power=on zone3.selector=internet-radio zone3.net-tune-network=play TX-NR818: power = on TX-NR818: selector = network,net Traceback (most recent call last): File "/usr/local/bin/onkyo", line 11, in load_entry_point('onkyo-eiscp==1.2.5', 'console_scripts', 'onkyo')() File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.5-py3.5.egg/eiscp/script.py", line 179, in run File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.5-py3.5.egg/eiscp/script.py", line 136, in main File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.5-py3.5.egg/eiscp/core.py", line 470, in raw File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.5-py3.5.egg/eiscp/core.py", line 270, in filter_for_message ValueError: Timeout waiting for response. root@ubuntu-server:/usr/share/homeassistant/config/shellcommands# `

Amplifier is switching on, zone2 is powered on, source gets on 'NET' and internet radio is playing, why is it giving an error?

What could be wrong?

megapearl commented 5 years ago

Still having this error, is there any development?

root@ubuntu-server:/etc/homeassistant/shellcommands# /usr/local/bin/onkyo --host amplifier-livingroom.flissinger.local NPR03 Traceback (most recent call last): File "/usr/local/bin/onkyo", line 10, in <module> sys.exit(run()) File "/usr/local/lib/python3.6/dist-packages/eiscp/script.py", line 179, in run sys.exit(main() or 0) File "/usr/local/lib/python3.6/dist-packages/eiscp/script.py", line 136, in main response = receiver.raw(iscp_message) File "/usr/local/lib/python3.6/dist-packages/eiscp/core.py", line 470, in raw return filter_for_message(self.get, iscp_message) File "/usr/local/lib/python3.6/dist-packages/eiscp/core.py", line 270, in filter_for_message raise ValueError('Timeout waiting for response.') ValueError: Timeout waiting for response. root@ubuntu-server:/etc/homeassistant/shellcommands#

mikerodrigues commented 5 years ago

Looks like it's just not seeing the response that comes back. This could be because it is actually timing out, or because filter_for_message isn't catching it. The timeout is hard coded, so kind of a pain to test.

Lenart12 commented 4 years ago

Some of the eiscp commands (mainly CMND(NET USB)) do not send an acknowledgment back but are expected in the code. This should be fixed in the firmware but as a workaround you can disable raising an error.

megapearl commented 4 years ago

Will look into it, thank you!

Lenart12 commented 4 years ago

Until firmware gets fixed, I recommend using eISCP.send() method instead of eISCP.raw() which does not wait for a response and this way no modification of the code is required.