I’ve been searching since yesterday but can’t find an answer. I just received my 4K+. I have everything setup, but I really like the Vero remote itself instead of the TV remote. Is it possible to make the Vero remote volume buttons control the TV volume, not the Vero output volume? Also, can I set press and hold home to turn the TV off, then back on if I just press home? If so is there a GUI or am I editing XML? It’s a 2019 6 series Samsung TV. CEC is working because the Samsung remote controls the Vero.
If CEC is working then Kodi should have automatically switched from adjusting the volume internally to sending CEC commands. There may be some setting that needs to be adjusted on your TV or in Kodi via settings>system>input>peripherals>CEC adapter> although i’m not sure what that would be.
As for the home button and power control you can do that but in order to enable it to be sent you have to set in Kodi’s CEC settings (the location listed above)…
enabled> (on)
switch source to this device on startup> (on)
devices to power on during startup> (TV)
devices to power off during shutdown> (TV)
make sure to click “OK” after editing your settings as pressing the return button will exit without saving. You must also reboot.
The way the keymap is configured currently to power on you may have to press home two or three times depending as the first button press just wakes from the screensaver and ignores the mapping and a third press would be needed if you were not on the home screen where the action is mapped to. I think the Vero should normally turn on with the first button press (as it has a separate wakeup as part of its sleep function) in stock config but i’m not 100% on that as I don’t have a Vero with working CEC and I know they have been working on some changes to that feature lately. On my RPi I have to press it twice normally.
To power off the home long-press is only on the home screen so you would normally press home once or twice to get there and then hold down the home button and your TV should turn off.
You can find out more info about how the remote is configured here…
Thank you for the reply. This info has been quite helpful. Unfortunately I still haven’t been able to get volume to cooperate, but I do have the power working. I want to fine tune it to my liking of no repeated button presses or auto power on screensaver, but it does work as you described now. Thanks again.
Please post some logs so we can see what happens when you press the volume button
Sam
Those aren’t debug logs, so unfortunately we can’t tell what’s going on.
Sam
So you want to make the home button into a dedicated power only function? Short press to power on and long press to power off, regardless of which screen your on? If so I can work up a keymap that will do that. Let me know.
I did see you were running your UI in a high resolution and we recommend against this. Please see the following…
We recommend people with 4K TV’s set their user interface (UI) to 1080p. Kodi’s UI is not optimized for 4K yet and this can put unnecessary demands on your device and can lead to a suboptimal picture quality, as well as potentially cause other issues.
The settings we recommend are as follows…
Settings>System>Display>Resolution> 1920x1080p
Settings>System>Display>Whitelist> (empty) *
Settings>Player>Videos>Adjust display refresh rate> On start/stop
Some televisions may also need, or benefit from, the following being set…
System>Display>Force 4:2:2 colour subsampling> (enable)
With the above settings your UI will be output in Full HD and your 4K content will be output in 4K. *Information regarding the whitelist can be found here. If you have any doubt, feel free to upload some logs so we can verify that your settings are indeed correct.
I did not yet know of the 1080 menu. I was under the impression that it was basically telling Kodi what the maximum resolution of the display is. For instance, if set to 1080 and a 4K movie was selected, it would scale down to 1080 which I didn’t want. I set the settings as you suggested and it seems to be working correctly. I can upload logs in a bit.
As for the home button, it would be awesome if a single push would turn the TV on if off, just send the esc command as usual if it’s already on. From integration system programming, I don’t see an issue if it always sent both commands as the display would just ignore the power on if it already was on. I assume that’s still the case here but I’m all IR, 232, and IP control. CEC is my enemy at work lol
For power off, yes, just press and hold of the home button. No other function.
Thanks!
If you want a single button to do both you would have to test to see if this works on your TV (for this test you will have to be on the home screen) and if it does I can work something up around that. On my TV’s that action didn’t work so I had to program it as explicit on and off commands, which seems to have much better support on various equipment, which is why the OSMC remote is keymapped the way it is.
<keymap>
<home>
<keyboard>
<escape>CECToggleState</escape>
</keyboard>
</home>
</keymap>
If you don’t already know how to do this you can find instructions in the long-press keymap howto I linked to above.
Thanks.
I’ll give it a try, see what happens, and let you know. FYI, I definitely prefer discrete commands by a mile. I don’t ever use toggle for anything if I can avoid it any way possible.
With ir i’m totally with you especially if you were using something like a harmony. In this case if you can double up a button for power on/off then it leaves the long-press to perform other functions which can be helpful with a limited number of buttons.
Agreed.
I can tie in an integration remote and send commands via JSON if I need to. That’s how my big HTPC in the Fam Rm is configured. I just really don’t want to use one of those at $800/ea if I can avoid it. This is the only source in this bedroom and the OSMC remote is nice. Small, simple, and easy to replace if it winds up in a cup of juice or bathtub or whatever lol
Is it possible to map two commands to one button? Meaning esc and cec power on are always sent when the home button is pressed? Then I can just leave the long command for power off.
The command above when added to the keymap will turn the TV off with a single quick press from the home screen. Neither it or any other button on the remote will turn the TV back on. If I use the TV remote to power it back on, the Kodi menu is there and fully functional so it isn’t doing anything weird to the Vero that I know of
Quick update: CECActivateSource works for power on and doesn’t seem to affect the normal esc function. Power off works on longpress so I think we’re pretty much there for this step of TV power
The keymap only allows for a one button to one action mapping. It is possible to call external scripts that you can program to send multiple JSON commands but you would be on your own if you wanted to go that far. The mapping is per window with a global fallback and so you would normally recycle keys by programing them specific to the area your working in. That is how the home key is currently setup. In most screens the home button will short-press to the home screen, and long-press to toggle full screen. On the home screen it does power on/off as obviously your already home, and the return button (when you are on the home screen) is already standard Kodi behavior to toggle to the full-screen view. This allows you from pretty much any screen to push the home button a couple times and then hold it down to power off. If you had powered off when not on the home screen then pressing it a couple times takes you to the home screen where it would then send the activatecec action to power on and switch source. As you don’t care about preserving the direct the home function (which just keeps you from pressing the return button as much) and the full screen action, then we can just dedicate that button to power.
You’ve confused me now. Doing the toggle state doesn’t toggle (like I said, it doesn’t seem to be well supported) so your back to using the original commands which we started with if you just swapped in that command for the toggle. I can post a keymap to make that a dedicated power only button tomorrow. It is getting a bit late tonight and it is a bit of work to sort through everything that needs to get changed.
I’m equally as confused lol. If the cec command isn’t in the gen.xml, it may take several presses of the home button to get it to turn on the TV. This is with Kodi being on the home screen when I hold to shut off. With the command there in gen.xml, it seems to work the first time every time which is what I’m after. Idiot proof.
If that’s just duplicating the default programming, I don’t know why it works one way but not the other. Not that it matters I guess. I just like knowing how stuff works.
Either way, thanks for your help. I look forward to the keymap when you have a chance. I’m picking this up quickly and things like examples are tremendously helpful. I’ll keep playing tomorrow. It’s late here as well and my brain is shorting out so I’m going to crash.
It is working the first time while your testing it as your already on the home screen and the screensaver is not on (which would make it disable with the first button push instead of sending the mapped command).
I didn’t test it but this should make the home button dedicated to power commands. Let me know if that is working as expected and i’ll add it as an example in my keymap guide.
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<global>
<keyboard>
<escape>CECActivateSource</escape>
<escape mod="longpress">CECStandby</escape>
</keyboard>
</global>
<FullscreenVideo>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</FullscreenVideo>
<FullscreenGame>
<keyboard>
<escape/>
</keyboard>
</FullscreenGame>
<Visualisation>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</Visualisation>
<MusicOSD>
<keyboard>
<escape/>
</keyboard>
</MusicOSD>
<slideshow>
<keyboard>
<escape/>
</keyboard>
</slideshow>
<VideoOSD>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</VideoOSD>
<VideoMenu>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</VideoMenu>
<VideoBookmarks>
<keyboard>
<escape/>
</keyboard>
</VideoBookmarks>
<Videos>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</Videos>
<VideoPlaylist>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</VideoPlaylist>
<MusicInformation>
<keyboard>
<escape/>
</keyboard>
</MusicInformation>
<MusicPlaylist>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</MusicPlaylist>
<SongInformation>
<keyboard>
<escape/>
</keyboard>
</SongInformation>
<MovieInformation>
<keyboard>
<escape/>
</keyboard>
</MovieInformation>
<PictureInfo>
<keyboard>
<escape/>
</keyboard>
</PictureInfo>
<PVROSDChannels>
<keyboard>
<escape/>
</keyboard>
</PVROSDChannels>
<PVRChannelGuide>
<keyboard>
<escape/>
</keyboard>
</PVRChannelGuide>
<AddonInformation>
<keyboard>
<escape/>
</keyboard>
</AddonInformation>
<yesnodialog>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</yesnodialog>
<selectdialog>
<keyboard>
<escape/>
</keyboard>
</selectdialog>
<contextmenu>
<keyboard>
<escape/>
</keyboard>
</contextmenu>
<addonsettings>
<keyboard>
<escape/>
</keyboard>
</addonsettings>
<addonbrowser>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</addonbrowser>
<filemanager>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</filemanager>
<interfacesettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</interfacesettings>
<systeminfo>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</systeminfo>
<eventlog>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</eventlog>
<playersettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</playersettings>
<mediasettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</mediasettings>
<pvrsettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</pvrsettings>
<servicesettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</servicesettings>
<gamesettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</gamesettings>
<profiles>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</profiles>
<systemsettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</systemsettings>
<music>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</music>
<pictures>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</pictures>
<skinsettings>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</skinsettings>
<musicplaylisteditor>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</musicplaylisteditor>
<games>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</games>
<programs>
<keyboard>
<escape/>
<escape mod="longpress"/>
</keyboard>
</programs>
</keymap>
On volume controls, CEC will send volume change messages to the audio device (3 on the bus IIRC). I don’t think there’s a way of making the TV appear as an audio device.
YMMV.
On the CEC volume control I think I was wrong in believing that Kodi would send those commands to a TV. I think Kodi is only switching over if it sees an amplifier device on the CEC bus. This doesn’t mean you can’t use the volume buttons though. It just means that you have to set the TV’s volume up higher and then adjust the volume down in Kodi itself (and not use passthrough). Sorry about that.
Yeah, that’s what I’ve been doing on the volume. I was hoping for CEC, but I can deal the way you mentioned. At least for now.
Your keymap above works as you expect. At least anywhere I’ve tried it anyway. Thanks for that. It was very helpful. Both in operation and me learning the keymap side. I’m spoiled by JSON at this point lol