Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Previous page Next page Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Page 2 of 2
Topic:
onReleaseInterval?
This thread has 23 replies. Displaying posts 16 through 24.
Post 16 made on Friday November 12, 2010 at 05:36
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
On November 12, 2010 at 04:01, deric.lts said...
As I have mentioned, i want it to behave just like an actual aircond remote where it will only increase/decrease by 1 deg for every single press (press&release) and will not further increase/decrease even if you are continue to hold the button.

Lets say the user want to increase the temp from 23deg to 25deg. This means that the user is required to press the TEMP+ button twice (press & release). The problem occurs where there will be an unnecessary delay generated during the 23deg to 24deg (due to IR sending) that forces user to wait b4 the user can press for the second time to increase from 24deg to 25deg. Therefore, this could be avoided if there's a "onReleaseInterval" function where IR will only be sent if the button is release for 5 sec or longer as the user will just press&release in a very fast manner (release & follow by the next press in a very fast manner) to increase to the desired temp (completely release).

The standard Daikin AC remote actually sends a IR code every time the up/down temperature button is pressed. This is also how the module that Philips are developing for Daikin ACs via IR also works.

One of the problems with doing this on the Pronto (unlike the actual remote) is that it begs the question about what fan/mode/swing/etc is also included in the IR code. In my Daikin AC config, I use two approaches:

a. Set all the parameters via buttons and have an 'ok' button which looks at all these buttons and then sends the right IR code combination.

b. Have a page with buttons for each temperature then, when a button is pressed: 1) send auto fan/swing/etc for this temperature and 2) jump to a page where the fan/swing/etc can be changed if desired.

What you seem to be wanting to do is, unlike all three approaches above, both complicated from a technical (i.e. prontoscript) perspective and potentially confusing from a user perspective.
Post 17 made on Friday November 12, 2010 at 05:41
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Guy,

Thanks for your input. I think you just saved me a bit of time. From what I now understand, I don't think I could ever put together a workable and useable solution where things would not get out of sync.

Do you have anything (script) you might be able to offer derik.lts?
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 18 made on Friday November 12, 2010 at 06:20
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
On November 12, 2010 at 05:41, Lyndel McGee said...

Thanks for your input.

Thanks for the thanks :)

Do you have anything (script) you might be able to offer derik.lts?

With both of my options and, indeed, with any option, the key issue is to decide precisely what combinations of temp/fan/swing/etc one wants to allow for. One can only allow for a small percentage of the possible IR codes as there are literally billions of possible codes given that each code has to incorporate values for each of the variables (my main Daikin AC remote can send out 22 billion different codes) and prontoscript cannot construct IR codes on the fly. Any scripts and buttons depend on the choices made here.

With my option b., there is no script - just jumps.

With my option a., the scripts are very simple. So, for example each parameter button has a script which sets the label on the button, looping around the allowed options. The 'ok' button then concatenates these labels and executes the IR in the corresponding hidden button, choosing the nearest of the allowed combinations if the exact combination is not allowed. I don't actually have a polished script for this as I ended up doing option b. (higher WAF factor).

A final point is that, as I understand it, the temperature setting on a Daikin AC only affects when the AC turns off (i.e. when the room is at the desired temperature) and not what is happening when the AC is on. This means that the temperature setting is actually not very important, particularly at the time that the AC is turned on. Taking advantage of this, my actual config is three-layed:

1. Just three buttons on the first page, for on-cool, on-heat and off respectively. These all use default values (set by me) for temp/fan/swing/etc and are located on the same (CBus) page that I control my lights/fans/curtains/etc with. So, to the user, AC control just looks like it is part of the same control system as the lights/fans/curtains/etc. Pressing either 'on' button turns the AC on and then, if and only if it is pressed for more than X seconds, jumps to ...

2. A page with all the temperatures (separated by cool/heat) that I have included (i.e. even temperatures only). Pressing any button changes the AC to that temperature and then jumps to ...

3. A page which is used to set all the other variables (allowed values only) where, although the pages look identical to the user, there is actually one per temperature setting (because the IR codes to be sent differ by temperature).

In this scenario, we actually, in practice, almost never go past the first (3-button) page as its defaults are what we want when we turn the AC on.
Post 19 made on Friday November 12, 2010 at 06:51
buzz
Super Member
Joined:
Posts:
May 2003
4,379
deric.lts,

Since setting the temperature is not an emergency, my approach would be to establish a global temperature setting variable. If the user changes the temperature, increment or decrement a local copy of this global (displayed on the Pronto) -- don't issue any commands now, but schedule a function for future execution. Regardless of the number of increments or decrements, schedule the function only once. On execution, the future function will calculate an absolute temperature command and send the IR. At this point there is little risk of a user interface block for the single IR command.

This approach works around any syncronization issues because, regardless of any past or current settings, the user wants the temperature displayed on the remote and the absolute temperature commands will force this.
Post 20 made on Friday November 12, 2010 at 07:10
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Buzz,

I think he wants someone to write the code for him. I could be wrong but that's the impression I get.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 21 made on Sunday November 14, 2010 at 23:05
deric.lts
Long Time Member
Joined:
Posts:
September 2010
24
I have attached my .xcf file shown in the link below for people who are still confused about my problem. Very sorry about that.

[Link: mediafire.com]

Basically i just want an one-way IR daikin control (without RS232). Anyway, i guess i will stick to my original program for the moment and thanks all for your generous suggestions!
Post 22 made on Sunday November 14, 2010 at 23:32
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Note that any IR code starting with FFFF (as many of yours do) will often (I think) not work.
OP | Post 23 made on Monday November 15, 2010 at 01:18
deric.lts
Long Time Member
Joined:
Posts:
September 2010
24
ya Guy Palmer, this daikin remote is the worst remote that I have ever learnt. I spent alot of times in learning the IRs and ended up with uncertain whether the codes that i have learnt are correct or not as I have no way to measure the temp.

And the weird one is those seem normal cannot work but instead those FFFF are working fine. Anyway, thank you for reminding me.
Post 24 made on Monday November 15, 2010 at 02:15
buzz
Super Member
Joined:
Posts:
May 2003
4,379
deric.lts,

As a relatively quick and painless fix, look at onExitCallback().

Then change your typical IR command from
page("TEMP1").widget("tempUp16").executeActions();

to
airCondTemp = CF.widget( "tempUp16", "TEMP1". "DAIKIN" );

In the onExitCallback() function:
airCondTemp.executeActions();

will emit the appropriate temperature IR only once as the user moves to another page. Make sure that you do not emit a stray IR command if the user does not actually change any fan settings.

Strictly speaking you don't need to use the CF.widget(,, "DAIKIN") form, but it is a good habit to get into as your programs grow.

---

As a matter of programming style, note that you could establish three variables:

a = "TEMP1";
b = "tempUp";
c = "16";

then code your temperature adjustment line as:

airCondTemp = CF.widget( b + c, a, "DAIKIN" );

If you calculate the value of "a", "b", and "c" based on the current fan speed and temperature, you can eliminate the giant switch statements. The only real trick here is to make sure that "c" ends up as a proper character string after any calculations.

Use the style that works for you. A gawky looking program that actually works is much better than a very clever program that almost works.
Page 2 of 2


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse