Closed andrewdavidmackenzie closed 1 year ago
Raspberry PI is needed for the example. If you have USB Cec adapter, changes to example are probably needed. Check out the port parameter
which hardware you are using?
I tried on macos on Mac, and Ubuntu on Thinkpad.
OK.
You need to have suitable hardware... this is one USB HDMI cec adapter https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter (have not tested though)
I am not sure if the devices you mention support HDMI CEC. If they do, at least the port name in the example needs to be changed.
If issues occur with supported hardware, please raise a new ticket
OK, I didn't realize that it was so targetted at Raspberry Pi.
I wanted to write a cross-platform utility for controlling external monitors using CEC (a bit like Monitor Control Lite does for external monitor brightness on macos, but for more things).
It sounds like it's out of scope and at most I should look at building on libcec-sys?
That README mentions Linux and Windows, but not macos nor RPi, so I'm not sure to what extent anything in the stack is trying to be really cross-desktop-platform?
This is cross-platform, similar to libcec itself. There has been even positive usage with windows but Mac has not been tested. It might work. Pull requests are welcome if it is not working.
I was just noting that example is tailored against Raspberry Pi, due to obvious reasons:
Maybe first check port name with prebuilt libcec tools (http://libcec.pulse-eight.com/Downloads), and then try with this one
Understood. It would be great to have an example (CLI) for other platforms, just to see something working after cloning and building, but I know zero about what would be required to get it working (such as "correct" port names).
If I can find them, then I would do a PR where the port-name would be under #[cfg(target_os="...")] and one example would work for all...
I am not sure either how libcec works with this regard in detail...great idea however! We need brave volunteers that could try it out with some other system :)
Update to this: while Macs have HDMI ports, they do not support CEC https://support.apple.com/en-us/HT204388
Mac computers don't support using CEC (Consumer Electronics Control) to control HDMI devices.
So you might actually need an external adapter with Mac: https://reddit.com/r/osx/comments/8cg86s/_/dyg39s5/?context=1
Is it possible to build directly on my Pi (Pi400)?
I'm trying but getting errors on missing headers (cecc.h) even after I installed libcec-dev, and all python dev....
A bit more info on building/cross-build, and pre-requisites, on different build OS would be a great addition to the README.
Thanks for suggestion, indeed this lib is missing basics in readme,
For now, can you try with linux prerequisites listed in libcec-sys: https://github.com/ssalonen/libcec-sys
If the problems continue, please make a new issue
I have tried to run the example on macos and linux, and both fail on the
cfg.open()
This line of code : (I added the expect())
Is this expected to work as-is, or is there any specific hardware I need to be attached to for it to work?
Thanks