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
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)
{
"bridge": {
...
},
"accessories": [
...
],
"platforms": [
{
"devices": [
{
"name": "ViewSonic",
"model": "PX701HDP",
"adapter": "/dev/ttyUSB0",
"baudrate": 115200,
"pollingInterval": 6000
}
],
"platform": "ViewSonic-Projector"
},
...
]
}
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! |
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) |
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 :
- Official documentation
- More information on ViewSonic RS-232 Protocol
- Thread about projector problem : https://www.remotecentral.com/cgi-bin/mboard/rs232-ip/thread.cgi?812
- Note: Updagrading the projector firmware to v1.01 does not improve the rs-232 communication
Special thanks to the homebridge-benq-projector plugin, on which this one is very inspired.
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
- 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)
Enjoying this project? Wanna show some love? Drop a star and consider buying me a coffee to keep me fueled and motivated