How to hold a button in a macro?

This is the JP1 beginners forum. There's no such thing as a stupid question in here, so post away, but this forum is just for JP1 users and people considering JP1, non-JP1 users please use the appropriate forum above!

Moderator: Moderators

vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

tombongo wrote:This worked beautifully! The only change I would consider making is changing byte 2 to specify the number of repeats. This way, 0 still means no repeat, 1 = one repeat, 2 = two repeats, and so on.

Thanks again! I would not be able to use JP1 without all of your help.
Do you need variable repeats?

This would add about 6 bytes to the protocol, but can be easily done if its needed.
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

I haven't seen the need yet, but if it is no problem and 6 bytes is no big deal, then it would be a nice feature.
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

I had one of those bad nights. I couldn't get anything to work. I think there may be some incompatibilities between some of the software.


When I open your new KeyMaster file with KeyMaster v9.21 and URC-8820N selected, I get this:

Upgrade Code2 0 = 00 00 (Cable/0000) ps3 Bluetooth with Hold (KM v9.21 beta3)
00 66 00 90 00 64 81 2D A5 00 B5 00 B2 00 A3 00
BF 00 C0 00 B8 00 D1 00 C1 00 C2 00 41 01 D3 00
21 00 11 00 A7 00
End

Upgrade Protocol 0 = 00 66 (HCS08) Custom Protocol for Cable/0000 ps3 Bluetooth with Hold (KM v9.21 beta3)
20 15 22 46 12 CD 4C 08 08 00 C8 00 FF 00 C8 01
EA A8 8E 07 C3 08 C5 4E 62 63 A6 FF B8 61 B7 62
01 63 05 6E 0A B2 20 11 CD FF 5F 45 11 00 CD FF
74 CD FF 92 24 09 3B A3 F2 6E 45 A3 CC FF 5F 81
End


When I open your new KeyMaster file with RemoteMaster v2.00 and URC-8820N selected, I get this:

Upgrade Code2 = 00 00 (Cable/0000) ps3 Bluetooth with Hold (RM v2.00)
00 66 00 82 98 82 21 2D D3 00 00 00 00 00 00 00
BF 00 C0 00 B8 00 00 00 00 00 00 00 A5 00 A7 00
D1 00 A3 00 11 00 41 01 C2 00
KeyMoves
18 F0 04 00 00 C1 00«8»
End

Upgrade protocol 0 = 00 66 (HCS08) Manual Settings (RM v2.00)
20 15 22 46 12 CD 4C 08 08 00 C8 00 FF 00 C8 01
EA A8 8E 07 C3 08 C5 4E 62 63 A6 FF B8 61 B7 62
01 63 05 6E 0A B2 20 11 CD FF 5F 45 11 00 CD FF
74 CD FF 92 24 09 3B A3 F2 6E 45 A3 CC FF 5F 81
End


In RemoteMaster the device upgrade looks jacked to me. I just realized all this, so I am not sure what is going on. Also, RMIR doesn't consistently display the protocols. I know they are there, because when I go to add them again, it tells me there are duplicates.

I was going to use the new RemoteMaster/RMIR v2.00 tools, but I may have to go back to the KeyMaster v9.21/IR v803 tools.
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

I just loaded your file with RemoteMaster v1.86, and it looks the same a KeyMaster v9.21. There must be some bug in RemoteMaster v2.00.

I will try again tonight.
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

Actually while on this 10820N remote there is abundant memory, other remotes fight for every byte. For example a 10820N has 476+506+3071 bytes of memory, while a Comcast 1067 only has 493+506 bytes of total memory. So if it isn't "needed", I'd rather leave the protocol as is. But if you think the 10 repeats is too much, we can cut that down.

Keeping the size of the protocols down is always a best practice. I already feel bad about adding another byte for every key. I looked real hard for an unused bit in the signals, to see if we could use a bit in the original commands. Since I couldn't find one we have already added a byte for every key in our upgrade.

I only wish I was as talented as the other guys when keeping the bloat out. In real life I write business apps where readable code is more important than size or speed, so efficiency has pretty much been beaten out of me. A good example is the TOADTog. Its almost impossible for me to follow how that protocol works. So I tried to write my own but the code was HUGE. Writing for compact code is a lost art!
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

Point taken. I work in an area where efficiency is the highest priority, but size is no longer relevant. If 10 repeats ever becomes a problem, I will let you know. Thanks!
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

I started from scratch last night and the byte 2 long key presses worked. I think I know what the problem was, but I need to investigate more.

I have come across a couple problems with macros. The problem stems from the fact that Sony decided to not use a discrete off command for the PS3. Since there are no discrete off commands, we need a macro to navigate menus to get to the power off system option. This would be nice if the sequence was the same independent on what you are doing (sitting at the main menu, watching a DVD/Blu-ray, watching Netflix, or playing a game). I have identified two seperate menu sequences and a button sequence that will work for both. The problem I am having is with the timing. I think variable key repeats on byte 2 long key presses (even if temporary for testing) would allow me to come up with best number of repeats for the power off macro.

You mention that you could add a variable repeat for an addition 6 bytes. That would be great even if only for testing. We may even consider two versions of the protocol that do and do not include byte 2 long presses.

[/quote]

I was able to do it without increasing the size of the protocol at all, I THINK!
Normally I'd test this before I posted it, but in this case I don't have a bench remote available. It was such a minor tweak that I don't THINK I broke anything.

Give this a try, view through a digital camera or phone camera to verify that the long press is holding long press, before adding to your macros.

https://www.hifi-remote.com/forums/dload ... le_id=9258
As for general manual navigation, you added a programmable delay before repeat in the protocol.

Upgrade protocol 0 = 00 66 (HCS08) KatherinLike (PB v4.01)
20 15 22 46 11 E5 2C 04 08 00 C8 00 FF 00 C8 01
EA A8 8E 07 C3 08 C5 CD FF 5F 45 11 00 CD FF 74
CD FF 92 24 09 3B A3 F2 6E 45 A3 CC FF 5F 81
End

Adjusting the 11 00 value in the latest protocol didn't seem to change the delay. I will have to do more testing of the old vs new protocols over the next day or two.
It should have.
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

Tom, I abused my monitor powers, and accidentally edited your post instead of quoting it. You'll see your answer above. :oops: :lol:
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

No problem, got it. Sorry for the delay, but the holidays have slowed my progress.

This seemed to work very well. I found out that many of my problems were due to incompatibilities with RemoteMaster v2.00. It was unable to read and modify your KeymapMaster file without corrupting it. No errors were given, but it was obvious that the hex values were not correct. I am now using KeymapMaster v9.21 and IR v8.03.

I was able to speed up the repeats for navigation, and extend the LONG PS to assure that the power off macro worked in all tested situations.

Thank you very much!
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

mdavej wrote:Tombongo, would you please post all the steps in your PS3 macros and indicate which use the held/repeated commands? I think they would be of interest to many people.
I can hopefully have vickyg2003 post my the final KM file and possibly my IR file for the benefit of others.

The power off macro is the only one needed, but should not be called directly. There should be a ToadTog wrapped around the call of this macro. This is due to the fact that ANY keypress will turn on the PS3, and invoking the power off macro when the PS3 is off will just turn it on.

Power Off Macro
key 1) LONG PS
key 2) Down
key 3) Down
key 4) Down
key 5) Up
key 6) Enter
key 7) Enter
key 8) Enter
key 9) Enter

Notes
key 1) This gets us to the "Turn off the system" menu. This is long enough to support getting to the "Turn off the system" menu from all tested situations. The PS3 is essentially a PC and different software requires longer times to release control to the system. This can be adjusted if people find this is not long enough.
keys 2-5) This gets us to the "Turn off the system" option in the menu. This is the first kludge of the macro. There seems to be two separate "Turn off the system" menus. One with two options and one with four options. The top option is always selected by default, the "Turn off the system" option is always second from the bottom, and the menu does not wrap when moving past the end of the menu. This allows me to always get to the bottom with three Downs and then to the "Turn off the system" option with one Up.
key 6) This selects the "Turn off the system" option.
keys 7-9) This confirms the "Turn off the system" option selection. The is the second kludge of the macro. After selecting the "Turn off the system" option, a confirmation menu appears. The problem is that the seventh keypress is too fast for the confirmation menu. Instead of introducing a delay, I just added a couple more Enter keypresses. This works well.


I will follow up with an explanation of the ToadTog, and how to edit both the key repeat delay and the long keypress count/duration.
cauer29
Posts: 236
Joined: Wed Feb 03, 2010 9:15 am

Post by cauer29 »

tombongo wrote:
mdavej wrote:Tombongo, would you please post all the steps in your PS3 macros and indicate which use the held/repeated commands? I think they would be of interest to many people.
I can hopefully have vickyg2003 post my the final KM file and possibly my IR file for the benefit of others.

The power off macro is the only one needed, but should not be called directly. There should be a ToadTog wrapped around the call of this macro. This is due to the fact that ANY keypress will turn on the PS3, and invoking the power off macro when the PS3 is off will just turn it on.

Power Off Macro
key 1) LONG PS
key 2) Down
key 3) Down
key 4) Down
key 5) Up
key 6) Enter
key 7) Enter
key 8) Enter
key 9) Enter

Notes
key 1) This gets us to the "Turn off the system" menu. This is long enough to support getting to the "Turn off the system" menu from all tested situations. The PS3 is essentially a PC and different software requires longer times to release control to the system. This can be adjusted if people find this is not long enough.
keys 2-5) This gets us to the "Turn off the system" option in the menu. This is the first kludge of the macro. There seems to be two separate "Turn off the system" menus. One with two options and one with four options. The top option is always selected by default, the "Turn off the system" option is always second from the bottom, and the menu does not wrap when moving past the end of the menu. This allows me to always get to the bottom with three Downs and then to the "Turn off the system" option with one Up.
key 6) This selects the "Turn off the system" option.
keys 7-9) This confirms the "Turn off the system" option selection. The is the second kludge of the macro. After selecting the "Turn off the system" option, a confirmation menu appears. The problem is that the seventh keypress is too fast for the confirmation menu. Instead of introducing a delay, I just added a couple more Enter keypresses. This works well.


I will follow up with an explanation of the ToadTog, and how to edit both the key repeat delay and the long keypress count/duration.
When I press and hold the PS button on my PS3, it usually just goes to a simple yes/no question do I want to turn power off and the 2 choices are side by side. As I recall, the yes side is highlited by default. On the other hand, if you're inside an application like Netflix, long press on PS pops a question yes/no do you want to exit the application and "no" is highlited by default. Once exited from the application, then another LKP on PS button brings up the yes/no do you want to turn power off.

I don't actually have any way to press the PS button via IR anyway since the maker of the Schmartz PS3IR translator I have, never could get Sony to allow his PID/VID to send the PS key. So, I ended up doing the following sequence:

Stop
left
left
left
left
left
left
left
left
left
left
left
up
up
up
up
ok
ok

That was the only way I could come up with, without the PS key and it still won't work unless you're not in an application.

Contrast that mess with the single discrete off IR cmd that it takes to turn off the XBOX360 from anywhere.

A.A.
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

cauer29 wrote:When I press and hold the PS button on my PS3, it usually just goes to a simple yes/no question do I want to turn power off and the 2 choices are side by side. As I recall, the yes side is highlited by default. On the other hand, if you're inside an application like Netflix, long press on PS pops a question yes/no do you want to exit the application and "no" is highlited by default. Once exited from the application, then another LKP on PS button brings up the yes/no do you want to turn power off.

I don't actually have any way to press the PS button via IR anyway since the maker of the Schmartz PS3IR translator I have, never could get Sony to allow his PID/VID to send the PS key. So, I ended up doing the following sequence:

Stop
left
left
left
left
left
left
left
left
left
left
left
up
up
up
up
ok
ok

That was the only way I could come up with, without the PS key and it still won't work unless you're not in an application.

Contrast that mess with the single discrete off IR cmd that it takes to turn off the XBOX360 from anywhere.

A.A.
Could you please double check and verify your claims.

I have two separate PS3 systems (one fat and one slim) with the latest system software v3.55. I am unable to reproduce what you claim. As a matter of fact, I have never been able to do what you say in an version of the system software. I have tried with the game controller, BD remote, and a real Harmony remote with the adapter.

I would love what you say to be true so that I can shorten the macro.
tombongo
Posts: 43
Joined: Mon Oct 26, 2009 1:34 pm
Location: South Jersey

Post by tombongo »

I thought about this for a few minutes while walking the dog. Ultimately, the most important thing here is that we get the device & protocol correct. I think that vickyg2003 has successfully done so. The device and protocol definitions will never change because Sony will not obsolete millions of game controllers and BD remotes.

The macro that I have described, and hopefully will post, can be used as an example. Some people may find that this does not work for their setup, or Sony may change the menu sequence in a future system software update. Either way, it will be very helpful.

cauer29, I would still appreciate info about your setup. Thanks!

Happy New Year!
cauer29
Posts: 236
Joined: Wed Feb 03, 2010 9:15 am

Post by cauer29 »

tombongo wrote:
cauer29 wrote:When I press and hold the PS button on my PS3, it usually just goes to a simple yes/no question do I want to turn power off and the 2 choices are side by side. As I recall, the yes side is highlited by default. On the other hand, if you're inside an application like Netflix, long press on PS pops a question yes/no do you want to exit the application and "no" is highlited by default. Once exited from the application, then another LKP on PS button brings up the yes/no do you want to turn power off.

I don't actually have any way to press the PS button via IR anyway since the maker of the Schmartz PS3IR translator I have, never could get Sony to allow his PID/VID to send the PS key. So, I ended up doing the following sequence:

Stop
left
left
left
left
left
left
left
left
left
left
left
up
up
up
up
ok
ok

That was the only way I could come up with, without the PS key and it still won't work unless you're not in an application.

Contrast that mess with the single discrete off IR cmd that it takes to turn off the XBOX360 from anywhere.

A.A.
Could you please double check and verify your claims.

I have two separate PS3 systems (one fat and one slim) with the latest system software v3.55. I am unable to reproduce what you claim. As a matter of fact, I have never been able to do what you say in an version of the system software. I have tried with the game controller, BD remote, and a real Harmony remote with the adapter.

I would love what you say to be true so that I can shorten the macro.
I don't know what to tell you. This PS3 is an 80gig with BC with 4 USB ports on the front. When not in an application (game), a long keypress on the PS button of the bluetooth remote, pops up a screen asking if you want to turn off the system yes or no with yes highlited. In the sequence I posted, if you are playing a video from the XMB, it will get you out of that and over to the system menu, selects the "turn off system" item and executes it. "Stop" in that sequence is actually the "circle" button, as mapped by the IR remote.

From inside a game, I see the 4 item menu that you're talking about on a long keypress of the PS button. The Netflix application behaves differently than either a game or XMB. There, a long keypress of the PS button pops a menu with just 2 choices, asking do you want to quit the application, yes/no. It's all moot for me anyway, as the Schmartz IR to USB dongle cannot send the PS button.

BTW, Sony has broken the macro functionality of IR remotes in the past with system updates. So, don't be too sure that they won't do it again.

A.A.
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

tombongo wrote:No problem, got it. Sorry for the delay, but the holidays have slowed my progress.

This seemed to work very well. I found out that many of my problems were due to incompatibilities with RemoteMaster v2.00. It was unable to read and modify your KeymapMaster file without corrupting it. No errors were given, but it was obvious that the hex values were not correct. I am now using KeymapMaster v9.21 and IR v8.03.

I was able to speed up the repeats for navigation, and extend the LONG PS to assure that the power off macro worked in all tested situations.

Thank you very much!
I suppose we're going to need a version for the S3c8 processors too. When you get your file the way you want it, upload it and I'll delete my version.
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Post Reply