Page 1 of 1

received data property issue

Posted: Mon Aug 11, 2003 1:05 pm
by e_patsellis
Scott,

is there any way to have received data1, received data2, etc. the generic serial plugin worked fine with only one device, but now I have a dvd changer that I'd like to retrieve data from also...





erie

Posted: Mon Aug 11, 2003 2:14 pm
by ScottBot
Erie,



For your DVD, you can create entirely new definitions: For example:
  • - Create new 'Generic Serial Module' Hardware Interface.
    - Select 'Create New Definition' as the 'Hardware Definition'
    - Name the Definition something to identify your DVD player.
    - Configure the specific serial commands for the DVD player.
    - Then create a new Device Definition for the DVD player. You do this from the main menu (Settings/Configure Generic Serial...). Then choose 'Device/New Device Definition'.
    - Add the appropriate Properties for the Device and save the definition.
    - Restart HouseBot.
    - Add the new Device and associate it with the new Hardware definition.
    - Map the commands from the Device to the Hardware commands.
Hope this helps. If I misunderstood, fill me in with more specifics.



Scott

Posted: Mon Aug 11, 2003 3:08 pm
by e_patsellis
scott, already did that, however, the recieved data property is that of both the dvd and projector at the same time.

Posted: Mon Aug 11, 2003 3:25 pm
by ScottBot
Erie,



Even though they share the same Property, each instance should maintain its own unique value.



But you can still create a new Property by using a user definable Property in the Device Definition and naming it anything you want.



Scott

Posted: Mon Aug 11, 2003 3:29 pm
by e_patsellis
ok, and then how would I make the property contain received data? (unfortunately, this probably borders on writing a driver for it, but the last programming I did involved toggling octal into my pdp8 many years ago)

Posted: Mon Aug 11, 2003 3:50 pm
by ScottBot
Erie,



Unfortunately I've not had a chance to write a PDP SDK :wink:



I finally understand your dilemma. What if I add a setting on the Hardware Interface that specifies the name of the Device to send the received data to?



Scott

Posted: Mon Aug 11, 2003 3:58 pm
by e_patsellis
as long as there's a way to differentiate the data being returned, that'd be great. On a related note, any ideas for playlist lookup, e.g. changer returns disc 10 playing, set disc # property to 10 and have a property that changes relative to the disc #, disc title for example.



erie

Posted: Mon Aug 11, 2003 4:50 pm
by ScottBot
Since I was into the code to answer your question, I went ahead and added the option. It will be in the next update (this week sometime).



I guess I would recommend a script (Script Device) for the playlist lookup. The script would execute whenever the Disk# Property changes (using a Task). It would then lookup the disk details (wherever you store that) and update the appropriate Properties on the Device.



Scott

Posted: Mon Aug 18, 2003 9:42 am
by ScottBot
Erie,



In the latest HouseBot (1.30), the Generic Serial Hardware Interface now has the ability to specify which Device it will send its incoming data to.



Scott

Posted: Mon Aug 18, 2003 3:53 pm
by e_patsellis
scott, great work, (I hope, have yet to go home and play with it...)