vectronic / homebridge-jvc-projector

A Homebridge plugin providing standby control for JVC projectors over IP
MIT License
2 stars 2 forks source link

some problems #2

Closed doublejj0321 closed 2 years ago

doublejj0321 commented 3 years ago

I'm able to turn on the projector using the HomeKit switch, however the status quickly changes back to the off position (even though it is on). I'm also unable to Turn off the projector. Thanks for you time John

vectronic commented 3 years ago

Hello,

As per the readme:

What is the projector model you are using?

Can you send me the homebridge logs?

Thanks

doublejj0321 commented 3 years ago

Thanks for the reply! The projector is a JVC DLA-RS420. Like I said in the post Im able to power it on using HomeKit but cannot power it off. The status always switches to off even if it is powered on. I’m not too familiar with home bridge (or coding) I believe this is what you would need to view out of the log. I did follow your instructions. Unsure on how to check if python was installed.

[28/04/2021, 07:02:18] Loaded plugin: @.*** [28/04/2021, 07:02:18] Registering accessory 'homebridge-jvc-projector.JvcProjectorPower’

[28/04/2021, 07:02:19] [Projector] Initializing JvcProjectorPower accessory... [28/04/2021, 07:02:19] [Projector] projectorIp: 192.168.4.68 [28/04/2021, 07:02:19] [Projector] pythonPath: /usr/bin/python [28/04/2021, 07:02:19] [Projector] setPowerScript: /usr/local/lib/node_modules/homebridge-jvc-projector/dist/set_power_state.py [28/04/2021, 07:02:19] [Projector] getPowerScript: /usr/local/lib/node_modules/homebridge-jvc-projector/dist/get_power_state.py [28/04/2021, 07:02:19] [Projector] Projector finished initializing!

Thanks!

On Apr 28, 2021, at 4:14 AM, vectronic @.***> wrote:

Hello,

As per the readme:

Can you check python is installed and accessible by the plugin? Can you ensure the required python project is installed: pip install jvc_projector_remote What is the projector model you are using?

Can you send me the homebridge logs?

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vectronic/homebridge-jvc-projector/issues/2#issuecomment-828294211, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT3W2EROA7MZAGOFNH2OCBTTK7GWBANCNFSM43WEXVDQ.

vectronic commented 3 years ago

Ok - I'll try to have a look in the next week or so... (don't hold your breath!)

vectronic commented 3 years ago

The logs you provided are just from the initial homebridge launch. Later on in the logs (after you have tried turning the projector on or off) you should be seeing things like:

[Projector] Setting projector power: ON

and

[Projector] Projector power state updated to: ON

If you don’t see this, you will need to try setting and getting the state manually. You will need to access a console terminal window where the plugin is installed to try out a few things...

Firstly check if python is available and the location to run it is configured correctly. I assume this is the case as you said the projector does turn on… but it is worth checking. Your logs show the following is used: /usr/bin/python, so just try running the following to see if it works:

/usr/bin/python --version

If it does, then you should be able to check the power state of the projector with:

/usr/local/lib/node_modules/homebridge-jvc-projector/dist/get_power_state.py 192.168.4.68

and set the power state with:

/usr/local/lib/node_modules/homebridge-jvc-projector/dist/set_power_state.py 192.168.4.68 ON

and

/usr/local/lib/node_modules/homebridge-jvc-projector/dist/set_power_state.py 192.168.4.68 OFF

doublejj0321 commented 3 years ago

I'm getting a permission denied when I try to manual off/on. Maybe this is the problem?

pi@homebridge:/var/lib/homebridge $ /usr/bin/python --version Python 2.7.16 pi@homebridge:/var/lib/homebridge $ /usr/local/lib/node_modules/homebridge-jvc-projector/dist/get_power_state.py 192.168.4.68 bash: /usr/local/lib/node_modules/homebridge-jvc-projector/dist/get_power_state.py: Permission denied pi@homebridge:/var/lib/homebridge $ /usr/local/lib/node_modules/homebridge-jvc-projector/dist/set_power_state.py 192.168.4.68 ON bash: /usr/local/lib/node_modules/homebridge-jvc-projector/dist/set_power_state.py: Permission denied pi@homebridge:/var/lib/homebridge $

vectronic commented 3 years ago

Sounds like you need to check the permissions on the python files or the user you are logged in as. The py files should be marked as executable and this should have come through when you installed the plug-in. But maybe something wiped out the executable flag in the file permissions.

vectronic commented 2 years ago

Closing as no response.