Control a projector via the PJLink protocol

A flow to control projectors supporting the PJLink protocol. Uses the pjlink node.
The first output sends data from queries, the second output sends errors.

You can send the following commands as a text string in msg.payload

  • on
  • off
  • muteon
  • muteoff
  • getmute
  • getname
  • getmanufacturer
  • getmodel
  • getlamps
  • getinputs
  • getinput
  • getinfo
  • getpowerstate
  • getclass
  • geterrors

You can also set the inputs by sending this object as msg.payload

{"setinput": {"source": 3, "channel": 3}}

[{"id":"22947ef0.dd6b82","type":"inject","name":"","topic":"","payload":"on","payloadType":"string","repeat":"","crontab":"","once":false,"x":110,"y":240,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"5c4e7429.a3b18c","type":"debug","name":"Error","active":true,"console":"false","complete":"payload","x":510,"y":540,"z":"fcef9dcc.03106","wires":[]},{"id":"316b7b12.ce9484","type":"inject","name":"","topic":"","payload":"off","payloadType":"string","repeat":"","crontab":"","once":false,"x":110,"y":280,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"a52c29e3.5ad3d8","type":"pjlink","ip":"10.10.80.117","port":4352,"name":"","x":370,"y":520,"z":"fcef9dcc.03106","wires":[["ae736301.518ca"],["5c4e7429.a3b18c"]]},{"id":"ac02fb71.53fd08","type":"inject","name":"","topic":"","payload":"getname","payloadType":"string","repeat":"","crontab":"","once":false,"x":112,"y":560,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"ae736301.518ca","type":"debug","name":"Out","active":true,"console":"false","complete":"payload","x":510,"y":500,"z":"fcef9dcc.03106","wires":[]},{"id":"1da26669.e25d9a","type":"inject","name":"","topic":"","payload":"getmanufacturer","payloadType":"string","repeat":"","crontab":"","once":false,"x":136,"y":440,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"4bbedb6c.b44124","type":"inject","name":"","topic":"","payload":"getlamps","payloadType":"string","repeat":"","crontab":"","once":false,"x":113.5,"y":480,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"5ea2be91.a15d4","type":"inject","name":"","topic":"","payload":"getinputs","payloadType":"string","repeat":"","crontab":"","once":false,"x":113.5,"y":520,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"6bc294bd.943d6c","type":"inject","name":"","topic":"","payload":"getinfo","payloadType":"string","repeat":"","crontab":"","once":false,"x":110,"y":640,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"adb1369a.524ec8","type":"inject","name":"","topic":"","payload":"getpowerstate","payloadType":"string","repeat":"","crontab":"","once":false,"x":129,"y":680,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"b4e1833a.4b1e8","type":"inject","name":"","topic":"","payload":"getinput","payloadType":"string","repeat":"","crontab":"","once":false,"x":110,"y":600,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"d643d32d.29bc3","type":"inject","name":"","topic":"","payload":"getmodel","payloadType":"string","repeat":"","crontab":"","once":false,"x":114,"y":720,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"4d36792e.b2c988","type":"inject","name":"","topic":"","payload":"getmute","payloadType":"string","repeat":"","crontab":"","once":false,"x":110.5,"y":400,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"5240db17.adbf24","type":"inject","name":"","topic":"","payload":"getclass","payloadType":"string","repeat":"","crontab":"","once":false,"x":110.5,"y":760,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"66abb38.f99544c","type":"inject","name":"","topic":"","payload":"geterrors","payloadType":"string","repeat":"","crontab":"","once":false,"x":113,"y":800,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"ecf62a9a.1309d8","type":"template","name":"Set input","field":"payload","template":"{\"setinput\": {\"source\": 3, \"channel\": 3}}","x":236,"y":840,"z":"fcef9dcc.03106","wires":[["a3c3d3d9.5c3c3"]]},{"id":"494f3bc0.b6b0c4","type":"inject","name":"","topic":"","payload":"","payloadType":"none","repeat":"","crontab":"","once":false,"x":110,"y":840,"z":"fcef9dcc.03106","wires":[["ecf62a9a.1309d8"]]},{"id":"a3c3d3d9.5c3c3","type":"json","name":"","x":370,"y":840,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"3a94ebdc.c56b14","type":"inject","name":"","topic":"","payload":"muteon","payloadType":"string","repeat":"","crontab":"","once":false,"x":110,"y":320,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]},{"id":"aa82cda1.557d3","type":"inject","name":"","topic":"","payload":"muteoff","payloadType":"string","repeat":"","crontab":"","once":false,"x":110,"y":360,"z":"fcef9dcc.03106","wires":[["a52c29e3.5ad3d8"]]}]
natcl

Flow Info

created 2 years, 8 months ago

Node Types

Core
  • debug (x2)
  • inject (x16)
  • json (x1)
  • template (x1)
Other

Tags

  • pjlink
  • projector
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option