HDMI CEC not working when switching to TV 0.0.0.0 using iobroker docker, node red, and pulse eight adapter

112 Views Asked by At

I am attempting to control my HDMI CEC-enabled devices using iobroker running in a docker container on my pc, along with node red and the node red cec plugin. I am using a pulse eight adapter to facilitate communication between the devices.

I have two function nodes in my node red flow, one for switching to HDMI 1 and one for switching to the digital cable source (TV 0.0.0.0). The function node for switching to HDMI 1 is as follows:

msg.payload = {
    "source": "0x4",
    "target": "0x15",
    "opcode": "0x82",
    "args": "1.0.0.0"
}
return msg;

The function node for switching to (TV 0.0.0.0) is as follows:

msg.payload = {
    "source": "0x0",
    "target": "0x15",
    "opcode": "0x82",
    "args": "0.0.0.0"
};
return msg;

Switching to HDMI 1 works fine, but I am having trouble switching back to the old source or to (TV 0.0.0.0). The switch simply does not work in these cases.

I have verified that the adapter and my devices are functioning properly, as switching to HDMI 1 and changing the input work correctly. I have also ensured that the iobroker container has the necessary privileges (--privileged and --cap-add=ALL) and that it is restarting automatically (--restart always).

Here is the command I am using to run the iobroker container:

docker run -p 8091:8081 -p 1880:1880 --privileged --cap-add=ALL --name iobroker -h iobroker --restart always buanet/iobroker

I am not sure what else to try in order to fix this issue. Any help would be greatly appreciated.

I also have a get active source node in my flow:

msg = {
  "command": "getactivesource"
}
return msg;

When I run this node after switching to TV 0.0.0.0, it shows that the active source has indeed switched from 1.0.0.0 to 0.0.0.0, but the TV still displays HDMI 1.

I have dummy tested several sources from 0x0 to 0x5 and have found that I am unable to switch to any of them using the function node for switching to TV 0.0.0.0.

I also have a function node that changes the input on the TV:

msg.payload = {
    "source": "0x1",
    "target": "0x0",
    "opcode": "0x44",
    "args": "0x34"
}
return msg;

This function node works fine for switching inputs, but I do not want to toggle through the inputs. I want to be able to switch directly to a specific input.

I am using docker to run iobroker on multiple devices, and I have followed the instructions in the following readme:

https://github.com/iobroker-community-adapters/ioBroker.cec2

However, I am not using the plugin mentioned in that readme. Instead, I am using the following node red cec plugin:

https://flows.nodered.org/node/node-red-contrib-cec

https://github.com/damoclark/node-red-contrib-cec

https://github.com/senzil/cec-monitor/blob/master/src/HDMI-CEC.1.4.js

I am also using the following docker image for iobroker:

https://hub.docker.com/r/buanet/iobroker

0

There are 0 best solutions below