Skip to content

achorein/homebridge-viewsonic-projector

Repository files navigation

homebridge-viewsonic-projector

Homebridge plugin for ViewSonic projectors via serial RS232 as HomeKit TVs. Requires iOS >=12.2 and homebridge >=0.4.46.

This plugin connects to a ViewSonic projector via serial RS232. Developed and tested using a Raspberry Pi Zero W and a USB to serial RS232 cable to connect to a ViewSonic PX701HD. For now, it only manage power ON / OFF

Table of Contents

Getting Started

Hardware and OS :

  • Install homebridge

  • Connect to projector via RS232 (make sure it appears in /dev/tty)

  • Auto Install: search for "homebridge-viewsonic-projector" in search bar

  • Or Manual Install using a terminal :

sudo hb-shell
cd /var/lib/homebridge/node_modules/
git clone https://github.com/achorein/homebridge-viewsonic-projector.git
  • Update your config.json, following the example below
  • Restart HomeBridge (from UI)

Configuration

Example configuration

{
   "bridge": {
     ...
   },
   "accessories": [
     ...
   ],
   "platforms": [
        {
            "devices": [
                {
                    "name": "ViewSonic",
                    "model": "PX701HDP",
                    "adapter": "/dev/ttyUSB0",
                    "baudrate": 115200,
                    "pollingInterval": 6000
                }
            ],
            "platform": "ViewSonic-Projector"
        },
        ...
    ]
}

General configuration

Attributes Required Usage
platform Yes Name of homebridge accessory plugin. Must be ViewSonic-Projector.
devices Yes Array of ViewSonic projectors. Each of them must be added manually to the Home app!

Device configuration

Attributes Required Usage
name Yes Name of the projector, how you want it to appear in HomeKit.
adapter Yes Path to serial RS232 adapter.
model No Projector model. Only displayed in accessory details in HomeKit.
pollingInterval No Polling interval in milliseconds (Default: 6000)

Deep Dive

This projector have a strange behaviour, when the power is off it use string values to interact (pow=?, pow=on, ...), but when the power is on we can only use the hexadecimal communication (06 14 00 04 00 34 12 00 00 5E) as mention in the documentation.

More info :

Special thanks to the homebridge-benq-projector plugin, on which this one is very inspired.

Troubleshooting

After updating homebridge this error could happen :

[24/10/2024, 08:13:08] ERROR LOADING PLUGIN homebridge-viewsonic-projector:
[24/10/2024, 08:13:08] Error: Could not locate the bindings file. Tried:
 → /var/lib/homebridge/node_modules/homebridge-viewsonic-projector/node_modules/@serialport/bindings/build/bindings.node
 → /var/lib/homebridge/node_modules/homebridge-viewsonic-projector/node_modules/@serialport/bindings/build/Debug/bindings.node
 → /var/lib/homebridge/node_modules/homebridge-viewsonic-projector/node_modules/@serialport/bindings/build/Release/bindings.node

just rebuild serialport

sudo hb-shell
cd /var/lib/homebridge/node_modules/homebridge-viewsonic-projector
npm rebuild

TODO

  • Manager power on and power off (+ check status)
  • Plublish NPM package (for auto installation)
  • Handle input management (check status, change to hdmi1/hdmi2/...)
  • Handle eco mode (check status, changetto Eco/Dynamic Eco/SuperÉco+,Normal)

Support

Enjoying this project? Wanna show some love? Drop a star and consider buying me a coffee to keep me fueled and motivated

Buy Me A Coffee

Releases

No releases published

Packages

No packages published