- Posts: 443
- Thank you received: 36
Now we're talking! Random thoughts after a successful setup!
- Nillaz
- Topic Author
- Offline
- User
-
Less
More
2 years 5 months ago #997
by Nillaz
Macro|
// Source activation macro for Shield TV!
// SetActiveSource creates the following server variables!
// activesource_sourceid_<clientname>, activesource_source_<clientname>, activesource_sourcename_<clientname>!
// activesource_image_<clientname>, activesource_macro_<clientname>, activesource_type_<clientname>!
// activeroom_<clientname>!
//!
SetActiveSource|Shield TV!
//!
SetVariable|{{activeroom_{{clientname}}}}_source~{{activesource_sourcename_{{clientname}}}}!
// Tell the driver what device is active!
AV|{{{{activeroom_{{clientname}}}}_shieldtv_id}}~SelectDevice!
//!
// This next section is for systems that utilize audio and video distribution via AV switchers!
// If your system does not use this technology then you can ignore all of the following section!
// The Audio and/or Video switcher inputs this source is on!
// Uncomment and set if needed!
// SetVariable|{{activeroom_{{clientname}}}}_audio_switcher_input~0!
// SetVariable|{{activeroom_{{clientname}}}}_sonos_switcher_input~0!
// SetVariable|{{activeroom_{{clientname}}}}_video_switcher_input~0!
//!
// Now do the switching if necessary!
//!
// If|isGT##{{{{activeroom_{{clientname}}}}_video_switcher_input}}##0##AV|{{{{activeroom_{{clientname}}}}_video_switcher_id}}~Source~{{{{activeroom_{{clientname}}}}_video_switcher_input}}!
// If|isGT##{{{{activeroom_{{clientname}}}}_audio_switcher_input}}##0##AV|{{{{activeroom_{{clientname}}}}_audio_switcher_id}}~Source~{{{{activeroom_{{clientname}}}}_audio_switcher_input}}!
// If|IsGT##{{{{activeroom_{{clientname}}}}_sonos_switcher_input}}##0##Sonos|{{{{activeroom_{{clientname}}}}_sonos_switcher_id}}~LineIn~{{{{activeroom_{{clientname}}}}_sonos_switcher_input}}!
//!
// Additional commands!
// Set Denon to Media Player!
AV|2~Source~MPlay!
// Pause to ensure TV accepts input switch!
Pause|2!
// Set TV to HDMI2!
AV|1~Source~HDMI2!
// Set HDFury matrix to InputSel3!
Control|2~SendIR~HD Fury-4K Diva~INPUTSEL3!
// Ensure Xbox is turned off!
Control|4~SendIR~Microsoft-Xbox Series X~POWER OFF!
// Ensure Bluray player is off!
Control|4~SendIR~Panasonic-DMP-UB9000~POWER OFF!
// Ensure Apple TV is off!
AV|5~Power~Off!
//!
// Finally everything is ready. Send the client to the appropriate page!
LoadScene|shieldtv!
// fini
Basically I've appended all of my additional commands to the end of the macro sequence just before the remote loads the shieldtv.html page. It's probably not best practice to do it this way but hey I'm not a coder and have no idea what best practices actually are.
I'll clean this up eventually but hey it works! For now if it ain't broke I ain't fixin' it!
Replied by Nillaz on topic Now we're talking! Random thoughts after a successful setup!
Sure, my macro for my Nvidia Shield looks like this!Looks really good, I attached marantz ir and serial codes xls, denon & marantz use the same codes.
I finally have myserver talking to all my devices so will start configure remote next.
But having issues wrapping my head around how the macro formatting
could you post one of your activity macros.
Thanks
Macro|
// Source activation macro for Shield TV!
// SetActiveSource creates the following server variables!
// activesource_sourceid_<clientname>, activesource_source_<clientname>, activesource_sourcename_<clientname>!
// activesource_image_<clientname>, activesource_macro_<clientname>, activesource_type_<clientname>!
// activeroom_<clientname>!
//!
SetActiveSource|Shield TV!
//!
SetVariable|{{activeroom_{{clientname}}}}_source~{{activesource_sourcename_{{clientname}}}}!
// Tell the driver what device is active!
AV|{{{{activeroom_{{clientname}}}}_shieldtv_id}}~SelectDevice!
//!
// This next section is for systems that utilize audio and video distribution via AV switchers!
// If your system does not use this technology then you can ignore all of the following section!
// The Audio and/or Video switcher inputs this source is on!
// Uncomment and set if needed!
// SetVariable|{{activeroom_{{clientname}}}}_audio_switcher_input~0!
// SetVariable|{{activeroom_{{clientname}}}}_sonos_switcher_input~0!
// SetVariable|{{activeroom_{{clientname}}}}_video_switcher_input~0!
//!
// Now do the switching if necessary!
//!
// If|isGT##{{{{activeroom_{{clientname}}}}_video_switcher_input}}##0##AV|{{{{activeroom_{{clientname}}}}_video_switcher_id}}~Source~{{{{activeroom_{{clientname}}}}_video_switcher_input}}!
// If|isGT##{{{{activeroom_{{clientname}}}}_audio_switcher_input}}##0##AV|{{{{activeroom_{{clientname}}}}_audio_switcher_id}}~Source~{{{{activeroom_{{clientname}}}}_audio_switcher_input}}!
// If|IsGT##{{{{activeroom_{{clientname}}}}_sonos_switcher_input}}##0##Sonos|{{{{activeroom_{{clientname}}}}_sonos_switcher_id}}~LineIn~{{{{activeroom_{{clientname}}}}_sonos_switcher_input}}!
//!
// Additional commands!
// Set Denon to Media Player!
AV|2~Source~MPlay!
// Pause to ensure TV accepts input switch!
Pause|2!
// Set TV to HDMI2!
AV|1~Source~HDMI2!
// Set HDFury matrix to InputSel3!
Control|2~SendIR~HD Fury-4K Diva~INPUTSEL3!
// Ensure Xbox is turned off!
Control|4~SendIR~Microsoft-Xbox Series X~POWER OFF!
// Ensure Bluray player is off!
Control|4~SendIR~Panasonic-DMP-UB9000~POWER OFF!
// Ensure Apple TV is off!
AV|5~Power~Off!
//!
// Finally everything is ready. Send the client to the appropriate page!
LoadScene|shieldtv!
// fini
Basically I've appended all of my additional commands to the end of the macro sequence just before the remote loads the shieldtv.html page. It's probably not best practice to do it this way but hey I'm not a coder and have no idea what best practices actually are.
I'll clean this up eventually but hey it works! For now if it ain't broke I ain't fixin' it!
The following user(s) said Thank You: JGrana01
Please Log in to join the conversation.
- Nillaz
- Topic Author
- Offline
- User
-
Less
More
- Posts: 443
- Thank you received: 36
2 years 5 months ago #998
by Nillaz
Replied by Nillaz on topic Now we're talking! Random thoughts after a successful setup!
I totally forgot that Denon/Marantz share the same IR codeset, so shame on me! I just checked and sure enough the GC database has the entire codeset I require and I just imported the whole thing. Thanks for the friendly tip, it's one less thing I have to deal with now!Looks really good, I attached marantz ir and serial codes xls, denon & marantz use the same codes.
I finally have myserver talking to all my devices so will start configure remote next.
But having issues wrapping my head around how the macro formatting
could you post one of your activity macros.
Thanks
Please Log in to join the conversation.
- Nillaz
- Topic Author
- Offline
- User
-
Less
More
- Posts: 443
- Thank you received: 36
2 years 5 months ago #1000
by Nillaz
As far as I can tell the smartremote will only issue a command upon release of a button rather than a press. The command it issues depends on how long you hold the button, either a short press or a long press. As far as I can tell it has no conception of the duration of time that passes from the moment you press a button to the moment when you release it.
So for example, if I want to turn the volume down on my receiver I can either short press vol down to increase the volume by one increment or long press to send a hacky command that sends the vol up command a predetermined number of steps...say 10 of them. My Denon receivers set volume levels in .5 increments. So if someone walks into the room and I want to turn down the volume 25 steps I don't want to press volume down 50 frigging times (remember, it's in .5 increments) or long press the volume button 5 times. What I would like to see is a structure where when I press vol down it continues to issue vol down commands smoothly and repeatedly until I release the button, the same as just about every other remote I have ever used. Most standard IR remotes works this way. So does Harmony, Sofabaton, etc.
This is also a thing on the Nvidia Shield (and to my understanding Roku plus possibly other streaming devices). It has the capability to do things based on a single press, double press, or long press. Single press works fine and I don't care about double presses at all, but long press is a total no go. A long press of the OK button on the Shield dashboard should bring up submenus so you can add/remove/change the sort order of things. It also brings up submenus in apps where you can do things like add a video to a watch list for later viewing or subscribe/unsubscribe to a channel. As far as I can tell there's no way to change this behavior either other than to change the accessibility settings in the Shield, but this does so globally where every press becomes recognized as a long press and that's no good either.
My fear is that this is a hardware limitation and if this is indeed so I would call it a facepalm worthy oversight. In my mind the entire concept of an automation system is that common controls should be implemented in a simple and intuitive way. If I have to teach someone the difference between a short press and long press for such a basic thing as volume control then this paradigm has failed miserably. Anyone who picks up the remote for the first time shouldn't need a crash course in basic functionality.
I may be able to get around this with the FLIRC and a button remapping app but there's no guarantee on this and it's a pretty hacky workaround anyway, not to mention that it will only work for the single device that I have the FLIRC connected to.
If I have totally misses a way to achieve these things I would appreciate any insight you guys can provide. This drives me absolutely nuts.
Replied by Nillaz on topic Now we're talking! Random thoughts after a successful setup!
Hey Graydon this could be a bit confusing to explain and I probably won't word things entirely correctly but I'll give it a go.Nice report. I'm not quite that far along but I have an html working on my phone so I've been using that alongside my Apple TV remote so far.
I'm not sure what you mean by "Long Press" I have that feature on my Smartremote. I programmed F3 to turn on my theatre lights at low setting. I added the command to turn them off with a long press. Works like a charm. Is this not what you're referring to?
As far as I can tell the smartremote will only issue a command upon release of a button rather than a press. The command it issues depends on how long you hold the button, either a short press or a long press. As far as I can tell it has no conception of the duration of time that passes from the moment you press a button to the moment when you release it.
So for example, if I want to turn the volume down on my receiver I can either short press vol down to increase the volume by one increment or long press to send a hacky command that sends the vol up command a predetermined number of steps...say 10 of them. My Denon receivers set volume levels in .5 increments. So if someone walks into the room and I want to turn down the volume 25 steps I don't want to press volume down 50 frigging times (remember, it's in .5 increments) or long press the volume button 5 times. What I would like to see is a structure where when I press vol down it continues to issue vol down commands smoothly and repeatedly until I release the button, the same as just about every other remote I have ever used. Most standard IR remotes works this way. So does Harmony, Sofabaton, etc.
This is also a thing on the Nvidia Shield (and to my understanding Roku plus possibly other streaming devices). It has the capability to do things based on a single press, double press, or long press. Single press works fine and I don't care about double presses at all, but long press is a total no go. A long press of the OK button on the Shield dashboard should bring up submenus so you can add/remove/change the sort order of things. It also brings up submenus in apps where you can do things like add a video to a watch list for later viewing or subscribe/unsubscribe to a channel. As far as I can tell there's no way to change this behavior either other than to change the accessibility settings in the Shield, but this does so globally where every press becomes recognized as a long press and that's no good either.
My fear is that this is a hardware limitation and if this is indeed so I would call it a facepalm worthy oversight. In my mind the entire concept of an automation system is that common controls should be implemented in a simple and intuitive way. If I have to teach someone the difference between a short press and long press for such a basic thing as volume control then this paradigm has failed miserably. Anyone who picks up the remote for the first time shouldn't need a crash course in basic functionality.
I may be able to get around this with the FLIRC and a button remapping app but there's no guarantee on this and it's a pretty hacky workaround anyway, not to mention that it will only work for the single device that I have the FLIRC connected to.
If I have totally misses a way to achieve these things I would appreciate any insight you guys can provide. This drives me absolutely nuts.
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 5 months ago #1003
by davep
Replied by davep on topic Now we're talking! Random thoughts after a successful setup!
Thanks for all the feedback it greatly helps in development. Here are some comments from this thread.
Launching Apps on Android
In the server's data folder there is a file called tvapps.json. This is the file that the Android driver uses for identifying apps and finding their launch codes.
There is an entry in there for an app called SmartTubeNext. Is this your SmartTube? CuriosityStream is in there with the name Curiosity Stream.
You can try to run these apps using the driver's launch command
SmartTube = AV|<<ID>>~Launch~am start -n com.teamsmart.videomanager.tv/com.liskovsoft.smartyoutubetv2.tv.ui.main.SplashActivity
CuriosityStream = AV|<<ID>>~Launch~am start -n com.curiosity.curiositystream.androidtv/com.curiosity.activities.MainActivity
This holds true for any Android apps you want to run. If you can find a published launch command use it.
"Also, I really REALLY dislike that there is no long press functionality to be had with the SmartRemote"
Huh? Hold down any hard button on the remote for more than 1 second and it will trigger a long-press. Hold it down for longer than 1.5 seconds and it turns on num-lock. Are those not working for you?
Samsung: "The only command I can't get working correctly is volume"
Which Samsung driver are you having volume issues with?
"The Denon driver works fine for basic controls like on/off, changing source, and volume up/down/mute. Anything beyond that..."
What additional functionality are you looking for? You are correct that these drivers cater to the basic needs but perhaps there are other commands that we should consider to be basic too? They're all there in the protocol docs.
"I don't want to press volume down 50 frigging times...."
We can only execute a command on button release because I have to listen for a long-press and then a really-long-press to turn on num lock. This means I can only act on release.
The volume up and down commands do support an optional "steps" parameter that will control how make ups or downs are done on a single press.
AV|<ID>~Volume~up~5 will do 5 on each press.
I'm not opposed to rethinking button press logic I just have to make sure it is universal and not just tailored to a particular use.
Launching Apps on Android
In the server's data folder there is a file called tvapps.json. This is the file that the Android driver uses for identifying apps and finding their launch codes.
There is an entry in there for an app called SmartTubeNext. Is this your SmartTube? CuriosityStream is in there with the name Curiosity Stream.
You can try to run these apps using the driver's launch command
SmartTube = AV|<<ID>>~Launch~am start -n com.teamsmart.videomanager.tv/com.liskovsoft.smartyoutubetv2.tv.ui.main.SplashActivity
CuriosityStream = AV|<<ID>>~Launch~am start -n com.curiosity.curiositystream.androidtv/com.curiosity.activities.MainActivity
This holds true for any Android apps you want to run. If you can find a published launch command use it.
"Also, I really REALLY dislike that there is no long press functionality to be had with the SmartRemote"
Huh? Hold down any hard button on the remote for more than 1 second and it will trigger a long-press. Hold it down for longer than 1.5 seconds and it turns on num-lock. Are those not working for you?
Samsung: "The only command I can't get working correctly is volume"
Which Samsung driver are you having volume issues with?
"The Denon driver works fine for basic controls like on/off, changing source, and volume up/down/mute. Anything beyond that..."
What additional functionality are you looking for? You are correct that these drivers cater to the basic needs but perhaps there are other commands that we should consider to be basic too? They're all there in the protocol docs.
"I don't want to press volume down 50 frigging times...."
We can only execute a command on button release because I have to listen for a long-press and then a really-long-press to turn on num lock. This means I can only act on release.
The volume up and down commands do support an optional "steps" parameter that will control how make ups or downs are done on a single press.
AV|<ID>~Volume~up~5 will do 5 on each press.
I'm not opposed to rethinking button press logic I just have to make sure it is universal and not just tailored to a particular use.
Please Log in to join the conversation.
- andrew
- Offline
- User
-
Less
More
- Posts: 339
- Thank you received: 28
2 years 5 months ago #1005
by andrew
Replied by andrew on topic Now we're talking! Random thoughts after a successful setup!
Really-long-press for NumLock is just on one button isn't it? I'd also find press-and-hold to trigger repeating commands as long as you hold the button down (the same as every other remote) more generally useful than a long press option.
Andrew
Andrew
The following user(s) said Thank You: Nillaz
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 5 months ago #1007
by davep
Replied by davep on topic Now we're talking! Random thoughts after a successful setup!
True only for one button. I put this on my shortlist.
Please Log in to join the conversation.
Time to create page: 0.210 seconds