Design Question
adys
Posts: 395
Hi All
Our first room is finished
Its name is "System 1" and it is full of devices.
Now I have to decide how to do the next room - but all rooms must be able to control all devices at home.
This means that I have to run the code of each room on every system?
We have lots of GUI logic , not only devices code...
So if I add now system 2 it must run all the code that I written to system 1?
Thinking that I have 14 systems in this home, make me thing again...
How will you recommend to handle this ?
And in netlinx - I copied the system to a new system and use the shared file in both systems. I am going to have a huge project that contain 14 systems - the other option is to have one project to each system.
This is my first AMX project so any help will be appreciate.
Thanks,
Adys.
Our first room is finished
Its name is "System 1" and it is full of devices.
Now I have to decide how to do the next room - but all rooms must be able to control all devices at home.
This means that I have to run the code of each room on every system?
We have lots of GUI logic , not only devices code...
So if I add now system 2 it must run all the code that I written to system 1?
Thinking that I have 14 systems in this home, make me thing again...
How will you recommend to handle this ?
And in netlinx - I copied the system to a new system and use the shared file in both systems. I am going to have a huge project that contain 14 systems - the other option is to have one project to each system.
This is my first AMX project so any help will be appreciate.
Thanks,
Adys.
0
Comments
In a big house system, I will generally have a master in charge of the house systems, and seperate masters for local systems (like TV rooms, or a bedroom stereo). A panel in the local system will have a port (or ports, as needed) that are assigned to the local system, and ports assigned (and defined on) the "main" system. Then I'll use SEND_COMMANDs on a virtual device to hanel those times when a button press needs to do something on both the main and local systems (like turning on a local stereo to a zone of the multiroom system).
I can undestand about lighting system vs study room, and its ok.
But when you have 3 rooms that need to be shared and control all from every TP?
I remember asking about it before (Master to Master) and from what I undesrstand if I have devices on system 1 - I can forward all the events to system 2.
But what will I do with system 2 events?
If I will pass it to system 1 again it will create a loop?
Now, system 1 can have a definition like this:
dvTP2 = 10001: 1: 2
And you can treat that panel just like it was a device on system 1, even though it is connected to system 2. No need to "forward" any commands anywhere unless you have a situation that specifically warrants it; but honestly, there are not many designs where it is absolutely essential. You can have button events for this panel now on both systems, doing different things on each one. So, let's say button one on that panel on system 2 turns on the local system and selects a shared tuner. The same button on system 1 can tell the audio switch to switch that tuner to that zone.
And the problem is that I need to know how to go to each device screen from every TP and still do the same - but for different devices....
Like if I have a CD in 5 systems, and I am using the same screen for all, how can I know what the user on TP X want to do only on CD Y in a simple way?
I know how to get from what TP I got the event, but sometimes it will want to control CD x from TP X and sometimes CD Y from TP X and its from the same screen...
and how to make only the relevant system to take the event and not all ? ( I mean in the code of the BUTTON_EVENT)
I am a bit lost here....
Anyone?
Catch all the button_events on the same frame, and you are done
can one system can hold all the code and all events?
its a good solution, but is it possible for a huge house?
Thanks
I will wait, this is the biggest issue I have in this job.
thanks again
Adys
I believe that you are asking "Can one NetLinx master control 100 devices?"
Yes, I believe so.
In the worst case, how many of those devices might be active? Maybe 10? That's not a significant load if your code is well written. (That might imply getting rid of all those one second updates. I usually find that frequent updating isn't necessary except very rarely for currently active devices eg displaying play duration timers on CD players.)
However it depends on how you handle the startup of each module after a reboot. 100 different modules asking 100 devices what is their current status (or whatever) will certainly overload the system. My solution is to delay their startups and spread them out over a minute or two or ten.
A system compile and download might take a while to run.
But the better question is "Do I need to control all of them in one controller?"
I don't think so.
Communication between your modules will take place via virtual devices using pushes, send_commands or maybe send_strings. It makes no difference to coding or performance whether the modules are on one controller or on ten; it doesn't even matter whether the control module for a given device is on the controller that device is attached to.
The only downside I can think of is that you will need more than one system build.
Track which particular device a TP is controlling. This can be set when a source is selected. Then when a device control is hit, send the command to the device the TP is currently controlling.
So if you have a variable called TP_X_Current_Device:
You can use arrays and get_last to allow the code to work for multiple devices and touchpanels.
Mark - I still don't get how to pass all messages to all controllers...
Alex - if I need to controll it from more than one TP in the same time?
See Tech Note 532 on amx.com.
I've done this with NetLinx master and Axcent 3 slaves but not with master-to-master so if anyone can jump in here with corrections please do.
First establish master-to-master communication by adding the IP address of one to the URL list of another and ensure that each controller has a different system number.
Now every port on every controller is visible to every controller; just declare the devices with the appropriate system number:
However I would not recommend directly controlling a given box from two different masters - instead you should send commands to a single driver module which controls it for you.
BTW would you believe that AMX have a patent on master-to-master communication?
Nice Patent
I think that main point that I didn't understand it that if I am putting Y system in URL list of X system, X will get Y messages and Y will get X messages?
if that is correct than my problems is solved.
I thought its only the URL list direction...
i still think you should put one system on system number 1 and the other system on system number 2
Like I said, and I might be wrong as I have never done this:
"Now every port on every controller is visible to every controller"
It would take about 5 minutes to find out.
I will test it soon as I finish the current room and will update my test.
I am planing to do a central virtual device(or more than one) that will hold states for all house , and on every update of its states will notify to its dynamic "listeners" about the state change.
My biggest problem was how to share the message if I want to use this architcture, if this is the way M2M works its simplify the work.
thanks all for all the info,
I will update this post as soon as I will have some answers.
Adys