Premise SmartPalmPad

Motorola Premise

123

Senior Member
Many rooms in my home contain a PalmPad (X10 HR12A). I like PalmPads because they are cheap, fairly durable, communicate via RF, and last many months on a set of batteries. I'm more likely to grab a PalmPad to control a light than navigate a touchscreen.

One thing I never liked about a PalmPad is ... the way it's designed to work! Each button is mapped directly to a physical device; button 1 represents device "A1". You can change the House code but you can't change the Unit Code; button one will always represent Unit code 1. In addition, its UP/DOWN buttons use funky old BRIGHT/DIM commands to control a lamp's brightness. Feh!

I wrote a utility, for Misterhouse, that transformed the humble PalmPad into something more flexible and useful. I've duplicated it for Premise and added a few more features that leverage Premise's strengths. I call it the SmartPalmPad and here's what it does:

Control any Lighting-Technology
You can use a PalmPad, based on X10 technology, to control a dimmer using another technology like UPB or Insteon.

Location Awareness
By assigning each PalmPad a unique House code, Premise knows where you are when a command is received (assuming you don't move the Kitchen Palmpad to the Family Room). This information can be used to send audio messages (via your home's PA or distributed audio system) to the correct room as acknowledgements to received commands ("The pool pump is now on").

Buttons and Devices are loosely-coupled
The button's address does not have to match the device's address. For example, if button 1 is "J1", it can be mapped to a device whose address is "B5". You are now free to assign a room's primary device to the first button. For example, the first button on the Kitchen PalmPad (House Code "K") turns on the overhead light ("C6") and the second button turns on the coffee machine ("C9"). The first button on the Master Bedroom PalmPad (House code "M") turns on the table lamps ("C15"). The first button on the Family Room PalmPad ("F") turns on the floor lamp ("C4") ... you get the idea.

Preset Dim Level
You can optionally set an initial brightness level (Preset Dim level) for each light.

Rapid-ON
If you press button 1 On, the corresponding light will brighten to its Preset Dim level. Press the On button a second time and it will go to maximum brightness. If you press the On button a third time, the light will return to its Preset Dim level. This is very handy and avoids having to fiddle with the UP/DOWN keys when you want maximum brightness.

Smart Focus
Pressing the On button of an illuminated light will move the "focus" to the associated light. At that point, you can use the UP/DOWN keys to adjust the light's brightness or press the ON button again to force it to maximum illumination. The focus never moves to a button associated with an appliance because it cannot be dimmed.

Discrete Brightness Levels
Each time the UP or DOWN button is pressed, the light's brightness will change by one "level". Each light is pre-assigned a maximum number of brightness levels. For example, if you choose five levels the light's brightness can be set to 20%, 40%, 60%, 80% or 100%. A hallway light may need only three levels whereas a bedroom light may require the finer control offered by ten levels.

Tightly integrated with Premise browser
Let's assume we have a light with five brightness levels and it is currently set to level 2 (40%). Nothing prevents you from using Premise Browser to tweak the light's brightness to a value that does not correspond to a level, like 67%. If you now press the UP button, SmartPalmPad determines that 67% is very close to level 3 (60%) and will increment it to the next level, namely 80%.


I'm putting the finishing touches on SmartPalmPad and plan to release it next week.
 
I am sooo looking forward to this.

I was able to map buttons, very basically, in the past to my UPB stuff. Worked OK, but it was minimally functional.

I'll be waiting :)
 
After experimenting with SmartPalmPad I decided it needed three more features to be truly useful:

Smart Focus
Eight buttons for eight lights and one set of BRIGHT/DIM controls ... how do you select a light to dim it? Smart Focus lets you select a light (i.e. move the 'focus') by pressing its ON button ... then you use the dim/bright buttons. It is "smart" because:
  • It won't send another On command if the light is already On.
  • It won't force the light to maximum brightness (see Rapid ON feature) if the light did not previously have the 'focus'.
  • It won't change the 'focus' if the light is an appliance ... you can't dim an appliance so why bother moving the 'focus'?

Enable/Disable
Each one of the controllable SmartPalmPad PLC devices can be enabled/disabled. This is handy if you need to disable a SmartPalmPad device; it avoids having to unbind it.


Property Change Scripts
You can add a property change script to the RF buttons in case you need to add additional functionality. For example, for all of my PalmPads, I assign button 8 ON to turn on all interior lights and button 8 OFF to turn them off. A property change script is used to detect the button presses and activate/deactivate a group of lights (or, if you prefer, a Scene).

I'll post the XDO after I update the documentation.
 
The attached ZIP file contains:

SmartPalmPad.xdo
SmartPalmPad Reference Manual.pdf

SmartPalmPad requires a little bit of configuration to get up and running. Scripting is not needed! However, the manual does provide a simple example of how to control Scenes using scripting. It also describes how you can easily disable devices, controlled by SmartPalmPad, when you are away from home.

File moved to : Premise Downloads
 
Yes, the RF signal is being received by an MR26A equipped with an external antenna. I built this one and it provides sufficient coverage for my needs. When I find the time, I'd like to try BSR's version.

The MR26A is connected to my Premise server (HP e-PC) via a multiport USB-to-Serial interface (Digi Edgeport/4). Very reliable; recommended.
 
I really like this idea 123! Thanks for putting this module up. I just received a small active home kit and an RCA branded CM11 from ebay. They work well in my small apartment's "home" theater and I'm looking at expanding the functionality of Premise with the Palm Pad. I'm going to order the MR26a as suggested, but had a few questions first.

Any pointers on how one would use the KR19A key chain remote (on/off*2 + dim) or the KR22A (on/off*4 + dim) with Premise and your module? I didn't see drivers for the KR19A or 22A in Premise. I think a keychain remote would be really neat to use with Premise too. My hopes would be to have two keychain remotes and a Palm Pad for each room.

I'm also wondering if using multiple remotes on the same house code is a problem with the MR26A? I'm assuming this is ok to do as long as you don't press both at the same time...
 
There's a generic RF_Button device driver included within the X10 MR26A driver. It may be a way of adding support for the KR19A and KR22A devices. However, it requires you to specify the hex codes sent by the device's buttons. I'm not sure where to find this information. Alternately, you can try the existing KC674 device driver and see if it is functionally similar to the KR19A/KR22A.
 

Attachments

  • RF_Button.PNG
    RF_Button.PNG
    16.2 KB · Views: 18
Thanks 123, I was examining the devices and noticed there is some simularity between the Palm Pad and KC674 hex codes; hopefully the same holds true for other X10 wireless remotes. For example for Button1On for an HR12A is the same hex code as for the KC674: 6000. My remotes should be here early next week so I'll post results for others. The universal remotes seem to have stranger looking codes: however, the UR19A and 47A have the same hex codes for the same buttons. This leads me to think the VK62A that comes with the MR26 can be made to easily work with Premise by copying/pasting existing URxxA buttons.

I'm also hoping I can get this hex info from port spy (or through simularities between palm pad and the key chain) and make a new driver under Schema...X10...MR26 by following directions similar to those you posted here:
http://www.cocoontech.com/forums/index.php?showtopic=9816

For others, from yet another post of 123's I learned that the log file for the MR26A could also contain useful info. One can enable these logs and view here: C:\...\Premise\SYS\Log

I haven't tried modifying Premise as described in the link above and I haven't read anything in the help files about this method, but I suspect a similar method will allow me to (under Schema...X10...MR26 of course) copy the KC674 class, paste and rename it, and add two dimmer buttons to it that I copy from the palm pad. Would I need to create a new object ID though if I do this or does Premise do this for me automatically?

The link above also explains how to link a keypad under home to the palm pad allowing me to write whatever code I want for each button. This seems really useful if I can link to key chain buttons too :)
 
I hope this saves someone some time. I'm attaching my keypad that would be imported under home along with my globalscripts that should be added under modules.default.globalscripts (or any globalscripts folder). Import the globalscripts first though :(

FYI: Eventhough this says HR12A, works for the keychain KR19A and KR22A remotes too. If they are the same housecode, the RF signals are the same.

I have written subroutines to:
pass a setvalue command to a collection of objects (generic)
get a zones average brightness (returns ave brightness includes all lamps not just dimmable, x10 only, but easy to modify)
get a zones brightness (returns brightness only includes dimmable lamps x10 only)
get all lights in zone (returns collection of lights, x10 only, but easy to modify)
getReceiverInHome (generic, returns the nth receiver in the home where n is the location in the Home tree)
delay set number of seconds (generic)
send command to currentsource (generic. sends a command to the current selected source on an AV rcvr)
get key pad house code (returns the housecode of the keypad you are using.
this is used so that if you operate keypad with housecode "B", the dimmer button dims only dimmable lamps in "B," same for A, C, D etc...)

I'll post this in the downloads forum once I finish the UR81 remote I'm working on too.

If you find anything wrong in the code or something, feel free to post comments here.
 

Attachments

  • HR12A_Keypad_Example.zip
    5.1 KB · Views: 20
Back
Top