Passing *two* parameters to a serial device?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Passing *two* parameters to a serial device?

Post by dlmorgan999 »

I have created a generic serial device for my Xantech ZPR68-10 AV matrix switch. It works great but in order to make it work for all zones I had to create a *large* number of commands (over 70). If I had the ability to pass two different parameters I would only need about 14 commands. I haven't seen a way to do this but I thought I would ask just in case. As a sample here is what one command would look like:



!%1%I%2%+ (change zone %1% to input %2%)



-- Dave
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Dave,



Unfortunately you can only pass one value (%1%). My thought was that it would make sense to be able to pass multiple parameters, which is why I went with the %1% nomenclature. However, I never determined a good way to pass in values other than the current value (which gets passed automatically).



I've considered allowing something like %Device.Property% in the Serial Command string to be able to insert other Device Properties. However, this would require a change to the Hardware Interface API, so I wasn't too interested in implementing it without any user interest.



Do you have any ideas on how you would like the %2% to get passed?
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

Somehow I *knew* you were going to ask that! :wink: I've been thinking about this for a while (both as a user and as a software engineer) and I haven't come up with any really good solution yet. The %Device.Property% idea sounds interesting as once you got that done it should handle most anything someone would want to do. I'll think about it a bit more and let you know if I have any ideas!



-- Dave
Post Reply