2012-02-26, 17:44
On a post a while ago (http://forum.xbmc.org/showpost.php?p=924...stcount=43) I made a suggestion for an architecture that would easily support multiple system types and back-end apps. I know it would take some doing to re-architect the script but in the long run, it will make supporting & adding new systems 10x easier.
X10-Commander has very little intelligence, it is a UI for one specific back-end. If you want to enable multiple back-ends, and ease of use, I highly suggest you architect this to do so.
With the way you are proposing to do it...
... This command has no way to know what system is on the back-end, thus you can only use 1 back-end system, and it requires the user to remember exactly what A4 is.... this is far from ideal. Often, more than one back-end is used... I will be doing this since different apps/hardware bring different features I need.
If you create the proper architecture to handle multiple systems, the script would use commands that look something like this...
... this translates to 'Turn Kitchen Lights Off, 100%'.
... In the script each device would need to have a unique name (which is a best practice anyway) and thus system would parse the command line and translate/send to the proper back-end system, based on the definition files the user created.
X10-Commander has very little intelligence, it is a UI for one specific back-end. If you want to enable multiple back-ends, and ease of use, I highly suggest you architect this to do so.
With the way you are proposing to do it...
Quote:http://192.168.0.10:8086/?x10command=DEVICE~sendplc~"A4 OFF"
... This command has no way to know what system is on the back-end, thus you can only use 1 back-end system, and it requires the user to remember exactly what A4 is.... this is far from ideal. Often, more than one back-end is used... I will be doing this since different apps/hardware bring different features I need.
If you create the proper architecture to handle multiple systems, the script would use commands that look something like this...
Quote:http://192.168.0.10:8086/?DEVICE="Kitchen+Lights","Off","100"
... this translates to 'Turn Kitchen Lights Off, 100%'.
... In the script each device would need to have a unique name (which is a best practice anyway) and thus system would parse the command line and translate/send to the proper back-end system, based on the definition files the user created.