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
Passing *two* parameters to a serial device?
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
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?
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
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
Somehow I *knew* you were going to ask that!
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

-- Dave