Author |
|
narc Groupie
Joined: November 21 2006 Location: United States
Online Status: Offline Posts: 49
|
Posted: March 07 2007 at 11:54 | IP Logged
|
|
|
Hey Dave,
I can't seem to get this to work. I want to display text on the Elk keypad using the following function:
ph_ctlrsq("ELK",231,"Hello world",0,100)
My controller is called "ELK", function 231 should be display text on keypad.
I have no idea what flags to use, so I tried 0 and 1. I set the timeout to 100, but I'm not sure if that is seconds or milliseconds.
- jason
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 07 2007 at 21:56 | IP Logged
|
|
|
Jason,
Inadequate documentation on my part . The text MUST be exactly 32 characters...16 characters per line. You can pad with spaces, etc. but the text to display MUST be 32 characters. You can use the Elk line termination character "^" to end the line early. Use the "^" character as the first character of the second line (character number 17) to not display text on the second line.
The timeout is a number from 0 to 65535 and is the display time in seconds. 0 means no timeout.
The flags field consists of 3 separated pieces of data added together. This data is the keypad area, the clear flag, and the beep flag. You construct this valud using the following method...
Keypad area is a value from 1 to 8. Subtract 1 from the keypad area to get a number from 0 to 7. The clear flag is a number from 0 to 2. 0 means clear message, 1 means clear with "*" key, and 2 means clear when timeout. Take this value (0, 1, or 2) and multiply it by 8. Add the new value to the keypad area value. The beep flag is a number, either 0 or 1. 0 means no beep, 1 means beep. Take this value (0 or 1) and multiply it by 32. Add this value to the previous value.
So, your example above, corrected for keypad 1, clear on timeout, with a beep would be:
ph_ctlrsq("ELK",231,"Hello World^3456^234567890123456",48,100)
Hope this helps,
Dave.
Edited by dhoward - March 07 2007 at 21:57
|
Back to Top |
|
|
narc Groupie
Joined: November 21 2006 Location: United States
Online Status: Offline Posts: 49
|
Posted: March 09 2007 at 09:31 | IP Logged
|
|
|
I am still having trouble getting that to work. Here is what I did:
1.) I started the multieditor.
2.) I set the multieditor to PH Formula mode.
3.) I pasted the function above in.
4.) I clicked "Run"
Nothing. Nadda. Zip.
Any ideas?
- jason
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: March 09 2007 at 15:15 | IP Logged
|
|
|
I think you may have found another bug. Usually in the formula area, the function will turn bold (when it is a recognized PH function). I could never get "ph_ctlrsq()" to turn bold.
Steve
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 09 2007 at 18:11 | IP Logged
|
|
|
Yeah, ph_ctlrsq is one of those things that I missed adding to the database so that it would turn bold. It is a valid PowerHome function however and should work. In the case above though, I'll hook up my Elk keypad and test everything out tonight.
I'll let you know,
Dave.
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: March 10 2007 at 09:30 | IP Logged
|
|
|
No luck on my key pad....
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 13 2007 at 21:05 | IP Logged
|
|
|
Ok,
Ive found a bug (well...you guys found the bug, Ive just fixed it ). The keypad text will not work in .10. Stupid move on my part. Ive gone ahead and actually hooked up my keypad and now have this function working. Ive also gone ahead and enhanced it so that you don't have to exactly send 32 characters. It will be available in .11.
Dave.
|
Back to Top |
|
|