Viewsonic Projector connection using NodeRED and a Raspberry Pi

Hello all,

I’m a recent convert from openHAB. Neither openHAB nor Home Assistant supported an integration (or binding!) for ViewSonic projectors, I developed my own solution for connecting the projector to my smart home. I initially used it under openHAB but successfully migrated it to Home Assistant with minimal effort. Using this technique I have a number of scenes that set my theater room to different modes designed for gaming, movie watching, or LEGO, among other things. My AV receiver, lights, and Apple TV all responded to these scenes so I wanted to make my projector join the party!

I chose to use a dedicated Raspberry Pi for this task. It does not require much horsepower so I used an old Raspberry Pi 2. I suspect a Zero would work as well, though I haven’t tested it. The Pi is mounted on the ceiling alongside the projector and connected via a USB to Serial (RS-232) cable. I chose to power mine using POE for simplicity, but as long as the device gets enough power there are several possible ways to power it.

I don’t have the programming experience to create a custom integration. Another advantage of this approach is that it doesn’t require a USB cable between the Home Assistant computer and the projector, which in my case is 20 feet away.

Serial cable I used:
https://www.amazon.com/gp/product/B0769FY7R7/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1

My solution requires NodeRED to be installed on the Pi, along with a configured connection to the Home Assistant installation. Specific instructions for this are outside the scope of this guide.

HA Integration: https://github.com/zachowj/hass-node-red/blob/main/README.md#installation

NR HA Node: node-red-contrib-home-assistant-websocket (node) - Node-RED

I used the following NodeRED flow to define the entities I wanted to control. Each entity state, when triggered, sends a corresponding serial command to the projector. Note that I included a rate limit node - this is very important! I noticed that my projector crashes when receiving multiple serial commands simultaneously. This logic prevents this from happening. You will also need to change each HA node to use the proper configuraiton node that points to your Home Assistant installation.

[{"id":"6520a95f5394f0da","type":"tab","label":"Projector Example","disabled":false,"info":"","env":[]},{"id":"edb0ac4b5bda0ae0","type":"serial out","z":"6520a95f5394f0da","name":"","serial":"74ac301daf565aa5","x":1400,"y":640,"wires":[]},{"id":"0bc3eb701b31dc96","type":"change","z":"6520a95f5394f0da","name":"ON","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x11\",\"0x00\",\"0x00\",\"0x5D\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":300,"wires":[["1567804ff21e8493"]]},{"id":"7e539dd77c2ca996","type":"change","z":"6520a95f5394f0da","name":"OFF","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x11\",\"0x01\",\"0x00\",\"0x5E\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":340,"wires":[["1567804ff21e8493"]]},{"id":"355973a712313c8d","type":"debug","z":"6520a95f5394f0da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1210,"y":720,"wires":[]},{"id":"8a39c76e178d60e8","type":"change","z":"6520a95f5394f0da","name":"ON","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x09\",\"0x01\",\"0x68\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":400,"wires":[["eabf8c2d2ded2eaa"]]},{"id":"f4a74c02d47e5fbf","type":"change","z":"6520a95f5394f0da","name":"OFF","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x09\",\"0x00\",\"0x67\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":440,"wires":[["eabf8c2d2ded2eaa"]]},{"id":"c044ef8c31da88b0","type":"change","z":"6520a95f5394f0da","name":"ON","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x13\",\"0x00\",\"0x01\",\"0x60\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":500,"wires":[["4f9cb3eed046954e"]]},{"id":"60a333c4b26f09f4","type":"change","z":"6520a95f5394f0da","name":"OFF","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x13\",\"0x00\",\"0x00\",\"0x5F\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":540,"wires":[["4f9cb3eed046954e"]]},{"id":"2a8e9b7fc848e1bf","type":"switch","z":"6520a95f5394f0da","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"brightest","vt":"str"},{"t":"eq","v":"movie","vt":"str"},{"t":"eq","v":"standard","vt":"str"},{"t":"eq","v":"sports","vt":"str"},{"t":"eq","v":"gaming","vt":"str"},{"t":"eq","v":"isfday","vt":"str"},{"t":"eq","v":"isfnight","vt":"str"},{"t":"eq","v":"cycle","vt":"str"},{"t":"eq","v":"user1","vt":"str"},{"t":"eq","v":"user2","vt":"str"}],"checkall":"true","repair":false,"outputs":10,"x":410,"y":660,"wires":[["3d65b331a6524964"],["74c759820ce3e5d6"],["5da181ba08a39073"],["4eae78f7f4e8d4e2"],["5a18e74a41c055e3"],["1526dc639ef69c71"],["70f6f5e5e305a6dd"],["4d55e3a9e84ae86f"],["5dfb346dbce4983d"],["687c056aaa7710b7"]]},{"id":"3d65b331a6524964","type":"change","z":"6520a95f5394f0da","name":"brightest","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x00\",\"0x69\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":600,"wires":[["e5d73914045fd071"]]},{"id":"74c759820ce3e5d6","type":"change","z":"6520a95f5394f0da","name":"movie","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x01\",\"0x6A\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":640,"wires":[["e5d73914045fd071"]]},{"id":"5da181ba08a39073","type":"change","z":"6520a95f5394f0da","name":"standard","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x04\",\"0x6D\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":680,"wires":[["e5d73914045fd071"]]},{"id":"4eae78f7f4e8d4e2","type":"change","z":"6520a95f5394f0da","name":"sports","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x11\",\"0x7A\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":720,"wires":[["e5d73914045fd071"]]},{"id":"5a18e74a41c055e3","type":"change","z":"6520a95f5394f0da","name":"gaming","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x12\",\"0x7B\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":760,"wires":[["e5d73914045fd071"]]},{"id":"1526dc639ef69c71","type":"change","z":"6520a95f5394f0da","name":"isfday","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x16\",\"0x7F\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":800,"wires":[["e5d73914045fd071"]]},{"id":"70f6f5e5e305a6dd","type":"change","z":"6520a95f5394f0da","name":"isfnight","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x17\",\"0x80\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":840,"wires":[["e5d73914045fd071"]]},{"id":"4d55e3a9e84ae86f","type":"change","z":"6520a95f5394f0da","name":"cycle","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x13\",\"0x33\",\"0x00\",\"0x92\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":880,"wires":[[]]},{"id":"5dfb346dbce4983d","type":"change","z":"6520a95f5394f0da","name":"user1","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x18\",\"0x81\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":920,"wires":[["e5d73914045fd071"]]},{"id":"687c056aaa7710b7","type":"change","z":"6520a95f5394f0da","name":"user2","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x0B\",\"0x18\",\"0x81\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":960,"wires":[["e5d73914045fd071"]]},{"id":"e5d73914045fd071","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":780,"wires":[]},{"id":"dcc254510a1d8947","type":"link in","z":"6520a95f5394f0da","name":"Serial USB0","links":["e5d73914045fd071","1567804ff21e8493","9b634b6d2a507111","eabf8c2d2ded2eaa","4f9cb3eed046954e","fc8a5ad6b75c37b5","3ae1ff0baf04d2a9","e28e555a20355735","9db94795be79f8c3"],"x":995,"y":640,"wires":[["355973a712313c8d","bce62fd7ba426e5d"]]},{"id":"1567804ff21e8493","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":300,"wires":[]},{"id":"eabf8c2d2ded2eaa","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":400,"wires":[]},{"id":"4f9cb3eed046954e","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":500,"wires":[]},{"id":"fc8a5ad6b75c37b5","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":1080,"wires":[]},{"id":"3ae1ff0baf04d2a9","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":1300,"wires":[]},{"id":"e28e555a20355735","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":1500,"wires":[]},{"id":"ef3ba31672e82c04","type":"switch","z":"6520a95f5394f0da","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"normal","vt":"str"},{"t":"eq","v":"eco","vt":"str"},{"t":"eq","v":"dynamiceco","vt":"str"},{"t":"eq","v":"supereco","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":450,"y":1080,"wires":[["a9e8b3e6d0857a02"],["25e22a544203abd6"],["4fac2297969bcc64"],["b946e35f05fbfec4"]]},{"id":"a9e8b3e6d0857a02","type":"change","z":"6520a95f5394f0da","name":"normal","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x11\",\"0x10\",\"0x00\",\"0x6D\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1020,"wires":[["fc8a5ad6b75c37b5"]]},{"id":"25e22a544203abd6","type":"change","z":"6520a95f5394f0da","name":"eco","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x11\",\"0x10\",\"0x01\",\"0x6E\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1060,"wires":[["fc8a5ad6b75c37b5"]]},{"id":"4fac2297969bcc64","type":"change","z":"6520a95f5394f0da","name":"dynamiceco","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x11\",\"0x10\",\"0x02\",\"0x6F\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":1100,"wires":[["fc8a5ad6b75c37b5"]]},{"id":"b946e35f05fbfec4","type":"change","z":"6520a95f5394f0da","name":"supereco","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x11\",\"0x10\",\"0x03\",\"0x70\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":1140,"wires":[["fc8a5ad6b75c37b5"]]},{"id":"d9fdf54ab0890b15","type":"switch","z":"6520a95f5394f0da","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"HDMI1","vt":"str"},{"t":"eq","v":"HDMI2","vt":"str"},{"t":"eq","v":"USBC","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":450,"y":1500,"wires":[["104479d3cccf11a6"],["b8cc778ad231b01b"],["d9ccac84bef8126d"]]},{"id":"9a5c3826e4c520bd","type":"switch","z":"6520a95f5394f0da","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"auto","vt":"str"},{"t":"eq","v":"4:3","vt":"str"},{"t":"eq","v":"16:9","vt":"str"},{"t":"eq","v":"16:10","vt":"str"},{"t":"eq","v":"2.35:1","vt":"str"},{"t":"eq","v":"native","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":450,"y":1300,"wires":[["0cf4c9bd3856197a"],["be9a6a1eb5515058"],["f3dbc3d709ff9c37"],["f67a5d033f96cade"],["cb4728eecda649c4"],["c4fc9ddf8c7899f4"]]},{"id":"0cf4c9bd3856197a","type":"change","z":"6520a95f5394f0da","name":"auto","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x04\",\"0x00\",\"0x62\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1200,"wires":[["3ae1ff0baf04d2a9"]]},{"id":"be9a6a1eb5515058","type":"change","z":"6520a95f5394f0da","name":"4:3","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x04\",\"0x02\",\"0x64\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1240,"wires":[["3ae1ff0baf04d2a9"]]},{"id":"f3dbc3d709ff9c37","type":"change","z":"6520a95f5394f0da","name":"16:9","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x04\",\"0x03\",\"0x65\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1280,"wires":[["3ae1ff0baf04d2a9"]]},{"id":"f67a5d033f96cade","type":"change","z":"6520a95f5394f0da","name":"16:10","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x04\",\"0x04\",\"0x66\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1320,"wires":[["3ae1ff0baf04d2a9"]]},{"id":"cb4728eecda649c4","type":"change","z":"6520a95f5394f0da","name":"2.35:1","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x04\",\"0x07\",\"0x69\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1360,"wires":[["3ae1ff0baf04d2a9"]]},{"id":"c4fc9ddf8c7899f4","type":"change","z":"6520a95f5394f0da","name":"native","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x04\",\"0x09\",\"0x6B\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1400,"wires":[["3ae1ff0baf04d2a9"]]},{"id":"104479d3cccf11a6","type":"change","z":"6520a95f5394f0da","name":"HDMI1","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x13\",\"0x01\",\"0x03\",\"0x63\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":1460,"wires":[["e28e555a20355735"]]},{"id":"b8cc778ad231b01b","type":"change","z":"6520a95f5394f0da","name":"HDMI2","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x13\",\"0x01\",\"0x07\",\"0x67\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":1500,"wires":[["e28e555a20355735"]]},{"id":"d9ccac84bef8126d","type":"change","z":"6520a95f5394f0da","name":"USBC","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x13\",\"0x01\",\"0x0F\",\"0x6F\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1540,"wires":[["e28e555a20355735"]]},{"id":"9db94795be79f8c3","type":"link out","z":"6520a95f5394f0da","name":"Serial USB0","mode":"link","links":["dcc254510a1d8947"],"x":885,"y":1660,"wires":[]},{"id":"1a894bb8cf0e5ff7","type":"switch","z":"6520a95f5394f0da","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"auto","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":1660,"wires":[["c6d18abeea73286c"],["8a2aa16417a2cb9c"]]},{"id":"c6d18abeea73286c","type":"change","z":"6520a95f5394f0da","name":"off","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x20\",\"0x00\",\"0x7E\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1600,"wires":[["9db94795be79f8c3"]]},{"id":"8a2aa16417a2cb9c","type":"change","z":"6520a95f5394f0da","name":"auto","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\"0x06\",\"0x14\",\"0x00\",\"0x04\",\"0x00\",\"0x34\",\"0x12\",\"0x20\",\"0x01\",\"0x7F\"]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1640,"wires":[["9db94795be79f8c3"]]},{"id":"9c5c4c1f09d269ad","type":"ha-select","z":"6520a95f5394f0da","name":"Color Mode","version":1,"debugenabled":false,"inputs":0,"outputs":1,"entityConfig":"67bbe9cec571936c","mode":"listen","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":170,"y":680,"wires":[["2a8e9b7fc848e1bf"]]},{"id":"20f233fd53ee9f3b","type":"ha-switch","z":"6520a95f5394f0da","name":"Screen Blank","version":0,"debugenabled":false,"inputs":0,"outputs":2,"entityConfig":"9c4c1a5eb142e0a2","enableInput":false,"outputOnStateChange":true,"outputProperties":[{"property":"outputType","propertyType":"msg","value":"state change","valueType":"str"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":170,"y":400,"wires":[["8a39c76e178d60e8"],["f4a74c02d47e5fbf"]]},{"id":"c87ff42434ab098b","type":"ha-switch","z":"6520a95f5394f0da","name":"Screen Freeze","version":0,"debugenabled":false,"inputs":0,"outputs":2,"entityConfig":"ec54864683a51c29","enableInput":false,"outputOnStateChange":true,"outputProperties":[{"property":"outputType","propertyType":"msg","value":"state change","valueType":"str"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":170,"y":520,"wires":[["c044ef8c31da88b0"],["60a333c4b26f09f4"]]},{"id":"e24b57cb1871e502","type":"ha-switch","z":"6520a95f5394f0da","name":"Power","version":0,"debugenabled":false,"inputs":0,"outputs":2,"entityConfig":"334195d93ddd6e05","enableInput":false,"outputOnStateChange":true,"outputProperties":[{"property":"outputType","propertyType":"msg","value":"state change","valueType":"str"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":150,"y":320,"wires":[["0bc3eb701b31dc96"],["7e539dd77c2ca996"]]},{"id":"9e92972c1361bf09","type":"ha-select","z":"6520a95f5394f0da","name":"Lamp Mode","version":1,"debugenabled":false,"inputs":0,"outputs":1,"entityConfig":"d16aebbe981381f0","mode":"listen","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":190,"y":1080,"wires":[["ef3ba31672e82c04"]]},{"id":"ac5b104b19f7694d","type":"ha-select","z":"6520a95f5394f0da","name":"Aspect Ratio","version":1,"debugenabled":false,"inputs":0,"outputs":1,"entityConfig":"eed28b34a486cacd","mode":"listen","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":190,"y":1300,"wires":[["9a5c3826e4c520bd"]]},{"id":"d33413fcfa179afd","type":"ha-select","z":"6520a95f5394f0da","name":"Source","version":1,"debugenabled":false,"inputs":0,"outputs":1,"entityConfig":"f103dd4532e1eddf","mode":"listen","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":170,"y":1500,"wires":[["d9fdf54ab0890b15"]]},{"id":"15281f2e47617236","type":"ha-select","z":"6520a95f5394f0da","name":"3D Sync","version":1,"debugenabled":false,"inputs":0,"outputs":1,"entityConfig":"8dfbdf89fb90bbe6","mode":"listen","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":180,"y":1660,"wires":[["1a894bb8cf0e5ff7"]]},{"id":"bce62fd7ba426e5d","type":"delay","z":"6520a95f5394f0da","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1190,"y":640,"wires":[["edb0ac4b5bda0ae0"]]},{"id":"74ac301daf565aa5","type":"serial-port","serialport":"/dev/ttyUSB0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"67bbe9cec571936c","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"Color Mode","version":"6","entityType":"select","haConfig":[{"property":"name","value":"Color Mode"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"options","value":["brightest","movie","standard","sports","gaming","isfday","isfnight","cycle","user1","user2"]}],"resend":false,"debugEnabled":false},{"id":"9c4c1a5eb142e0a2","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"Screen Blank","version":"6","entityType":"switch","haConfig":[{"property":"name","value":"Screen Blank"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"ec54864683a51c29","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"Screen Freeze","version":"6","entityType":"switch","haConfig":[{"property":"name","value":"Screen Freeze"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"334195d93ddd6e05","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"Power","version":"6","entityType":"switch","haConfig":[{"property":"name","value":"Power"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"switch"}],"resend":false,"debugEnabled":false},{"id":"d16aebbe981381f0","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"Lamp Mode","version":"6","entityType":"select","haConfig":[{"property":"name","value":"Lamp Mode"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"options","value":["normal","eco","dynamiceco","supereco"]}],"resend":false,"debugEnabled":false},{"id":"eed28b34a486cacd","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"Aspect Ratio","version":"6","entityType":"select","haConfig":[{"property":"name","value":"Aspect Ratio"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"options","value":["auto","4:3","16:9","16:10","2.35:1","native"]}],"resend":false,"debugEnabled":false},{"id":"f103dd4532e1eddf","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"Source","version":"6","entityType":"select","haConfig":[{"property":"name","value":"Source"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"options","value":["HDMI1","HDMI2","USBC"]}],"resend":false,"debugEnabled":false},{"id":"8dfbdf89fb90bbe6","type":"ha-entity-config","server":"8b7309bb62eb3627","deviceConfig":"2ace5ccfe99fbff8","name":"3D Sync","version":"6","entityType":"select","haConfig":[{"property":"name","value":"3D Sync"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"options","value":["off","auto"]}],"resend":false,"debugEnabled":false},{"id":"8b7309bb62eb3627","type":"server","name":"example","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":false},{"id":"2ace5ccfe99fbff8","type":"ha-device-config","name":"Projector","hwVersion":"","manufacturer":"ViewSonic","model":"PX-748 4K","swVersion":""}]

This is the document I used to program the specific commands:

There are a number of projectors supported by this document, but if you own a different ViewSonic projector (or perhaps even a different manufacturer) you may be able to find a document containing the codes you will need. If this is the case, you should be able to substitute the proper codes in the flow I pasted above and port it to your own use case with minimal effort.

I hope someone finds this useful. Happy watching!