Switched back to libcec 1.8.1-1 just to make sure using a later version wasn't the cause. It still does not work as intended but the behaviour changed slightly. The biggest difference is that with libcec 1.8.1-1 the tv does not switch on after the first power off. I won't use libcec 2.1.0-1 any more unless instructed to do so.
I will describe the existing behaviour first before commenting on the results of the suggested changers 1) 2) and 3).
With the TV in standby and starting vompclient it will wake tv and give picture. When the power button is pressed to TV goes into standby as expected. But when its turned on from standby there is no picture. Its possible to get picture back by switching to a NON hdmi input source and then back to the pi hdmi input source. When switching to the non hdmi input source one can observer the following message in the log:
21:25:40.694667 [debug] 3239 Remote - CECSourceActivated: 1 0
There is no such message when switching to other hdmi sources (unconnected).
Results of the suggested testing:
1) If the lines in changePowerState are uncommented.
With TV in standby and starting vompclient it will wake tv and give picture. If put to standby it will turn off and when awakened it will give picture. Note however that the remote commands won't be routed to vompclient. To get the remote functional one have to switch to another input source and back. Any input source could be chosen even the current that the pi is connected to!
2) Uncommenting the CEC_OPCODE_STANDBY
Exactly the same behaviour as observed making the changes in 1).
Have not had the time to check to other suggested combination of CEC_OPCODE_DECK_CONTROL and CEC_OPCODE_PLAY since it appears as if CEC_OPCODE_STANDBY is the offender!
3) If the call to incommingPowerkey is commented out it is not possible to get picture back by switching to another source and then back to the pi connected hdmi input not even if switching to a non hdmi input. Vompclient need to be restarted in order to get in a picture showing state.
I will describe the existing behaviour first before commenting on the results of the suggested changers 1) 2) and 3).
With the TV in standby and starting vompclient it will wake tv and give picture. When the power button is pressed to TV goes into standby as expected. But when its turned on from standby there is no picture. Its possible to get picture back by switching to a NON hdmi input source and then back to the pi hdmi input source. When switching to the non hdmi input source one can observer the following message in the log:
21:25:40.694667 [debug] 3239 Remote - CECSourceActivated: 1 0
There is no such message when switching to other hdmi sources (unconnected).
Results of the suggested testing:
1) If the lines in changePowerState are uncommented.
With TV in standby and starting vompclient it will wake tv and give picture. If put to standby it will turn off and when awakened it will give picture. Note however that the remote commands won't be routed to vompclient. To get the remote functional one have to switch to another input source and back. Any input source could be chosen even the current that the pi is connected to!
2) Uncommenting the CEC_OPCODE_STANDBY
Exactly the same behaviour as observed making the changes in 1).
Have not had the time to check to other suggested combination of CEC_OPCODE_DECK_CONTROL and CEC_OPCODE_PLAY since it appears as if CEC_OPCODE_STANDBY is the offender!
3) If the call to incommingPowerkey is commented out it is not possible to get picture back by switching to another source and then back to the pi connected hdmi input not even if switching to a non hdmi input. Vompclient need to be restarted in order to get in a picture showing state.