Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Env01 not work
#21
robertmee Wrote:Thanks for the clarification, however, I must be really dense as I still don't see how it changes things.

If I understand Trioxide correctly, he wants a triggered event to act differently based on an environment variable that he's setup in each USER account. Let's say CQC is running under SYSTEM or even TIMBUKTU. Then the triggered event can only use the environment variables associated with that account (SYSTEM or TIMBUKTU) because that's where the CQC event server engine is running. Doesn't matter if the variables are set in the USER portion of SYSTEM/TIMBUKTU or the system portion. Now, he logs in via RDP under user NOKIA. I see no way to notify the event trigger via environment variables that user NOKIA is logged in, because the event triggers do not have access to individual user account environment variables. Is that correct?
No, it is not correct. If the service is running under account TIMBUKTU and the variables are in the system section, then when logged in as NOKIA you 'see' the same variables in the system section. Just use a different environment variable for each user so ENV01 is used for user 1, ENV02 for user 2, etc.
Mark Stega
Reply
#22
Mark Stega Wrote:No, it is not correct. If the service is running under account TIMBUKTU and the variables are in the system section, then when logged in as NOKIA you 'see' the same variables in the system section. Just use a different environment variable for each user so ENV01 is used for user 1, ENV02 for user 2, etc.

Okay I understand that. I have the CQC Service running under the Admin acct for the computer. Setup the variables under System and use a different one for each user. But I don't understand how to tell when that user is logged in. So say the Nokia user is Env02, how do I tell when he is logged in or not? If the variable is there and I check for it then the process I have will run whether Nokia is logged in or not as it is just checking for the variable. I only want the process to run when Nokia is logged in via RDP, and not Admin on the server.
Reply
#23
Trioxide Wrote:Okay I understand that. I have the CQC Service running under the Admin acct for the computer. Setup the variables under System and use a different one for each user. But I don't understand how to tell when that user is logged in. So say the Nokia user is Env02, how do I tell when he is logged in or not? If the variable is there and I check for it then the process I have will run whether Nokia is logged in or not as it is just checking for the variable. I only want the process to run when Nokia is logged in via RDP, and not Admin on the server.
I am guessing that the best way is to have a different home template for each user that sets the appropriate variable. You'd have to have a 'logoff' screen that clears said variable. Of course, if the RDP session is lost is still appears to be logged on. I can't think of any way to avoid that. If you have a stable RDP connection isn't the intent that the connection is maintained 100% of the time? Perhaps you should explain what you are trying to accomplish rather than all the discussion of environment variables.
Mark Stega
Reply
#24
I have my Nokia N800 which RDPs into the server. I also have my Geovision cameras hooked up to the same server. Then when motion is detected the trigger is called and I have the script open the IV with the overlay of the camera that detected the motion. I use the IV on both the server, which is hooked up to my big screen TV, and the Nokia. So I want the script to know when I have the Nokia tablet logged in, which isn't all the time right now as I am testing and getting it going but yes in the future would be 100% connected, and then open the said overlay when the trigger happens. But the script would also open the overlay on the IV which is running on the server. So I guess that brings up another question. How do I tell which IV is running and thus which overlay to load, as it is different for the Nokia? If I use the LoadOverlay command for the IV it is going to load it on both IVs correct? How can I have it load on just 1? How do I pick which IV to have the overlay load on?
Reply
#25
Mark Stega Wrote:No, it is not correct. If the service is running under account TIMBUKTU and the variables are in the system section, then when logged in as NOKIA you 'see' the same variables in the system section. Just use a different environment variable for each user so ENV01 is used for user 1, ENV02 for user 2, etc.

Man....where's the smiley for head against brick wall ;-) You went the opposite of what I was saying. I'm not talking about what the logged in account sees. I'm talking about what the event trigger sees that's running under the server account.

I know that NOKIA sees the same system variables. The problem is that the event trigger ALWAYs sees the variables associated with account the service is running under no matter whose logged in. There's no way to use an environment variable associated with a USER account (RDP or direct login) to notify the event trigger as to whose logged in. As an example, we create a USER environment variable called THISUSER in each of the accounts that login. We have three accounts:

CQC service account, THISUSER = CQC
NOKIA user account, THISUSER = NOKIA
General user account, THISUSER = ME

When the event trigger runs, no matter if NOKIA is logged in, as Dean explained it, THISUSER will equal CQC, not NOKIA.
Reply
#26
robertmee Wrote:Man....where's the smiley for head against brick wall ;-) You went the opposite of what I was saying. I'm not talking about what the logged in account sees. I'm talking about what the event trigger sees that's running under the server account.

I know that NOKIA sees the same system variables. The problem is that the event trigger ALWAYs sees the variables associated with account the service is running under no matter whose logged in. There's no way to use an environment variable associated with a USER account (RDP or direct login) to notify the event trigger as to whose logged in.

Sure there is, I guess I'll give step by step.

Presume that we are talking about two accounts, A1 & A2.

In A1's user area, set environment variables CQC_Username & password as always. In the System area set ENV01 & ENV02 with a value of 'Logged out'. Every account has access to these, so we only have to do it once. Now, in the user area set CQC_ENV=ENV01.

In A2's user area set the CQC_Username & password. set CQC_ENV=ENV02

Now when you start that first template, go indirectly through the CQC_ENV variable to set either ENV01 or ENV02 as 'logged in'.

As I said before you need to explicitly set a 'Logged out' state, dropping the RDP session is not enough.

You can now tell in the trigger event if one or both clients are logged in as you just look at ENV01 or ENV02.

[EDIT] Made that last sentence more descriptive. Added the sentrece "Every account has access..."

[EDIT2} Even simpler, have the first template loaded be different for each CQC account and just directly set ENV01 or ENV02 to the correct state.
Mark Stega
Reply
#27
Robertmee, I understood what you were talking about there. And that is why I am having the problem because the triggered event only sees the System variables and not the User ones. But my IV sees the User variables.

Mark, I think I understand what you are saying. I do have a different template load for my Nokia then for my IV on the server. So with this setup when the template loads I run an action to set the Env01 or Env02 variable. This way I can tell who is logged in and thus check this value in the triggered action. Will try this out tonight.

Now the question is how do I load the correct overlay in the correct IV? If I have both IVs running will it just not load the same overlay for both? I need to have a different one for the Nokia so the overlay fits the screen.
Reply
#28
Mark Stega Wrote:Sure there is, I guess I'll give step by step.

Presume that we are talking about two accounts, A1 & A2.

In A1's user area, set environment variables CQC_Username & password as always. In the System area set ENV01 & ENV02 with a value of 'Logged out'. Every account has access to these, so we only have to do it once. Now, in the user area set CQC_ENV=ENV01.

In A2's user area set the CQC_Username & password. set CQC_ENV=ENV02

Now when you start that first template, go indirectly through the CQC_ENV variable to set either ENV01 or ENV02 as 'logged in'.

As I said before you need to explicitly set a 'Logged out' state, dropping the RDP session is not enough.

You can now tell in the trigger event if one or both clients are logged in as you just look at ENV01 or ENV02.

[EDIT] Made that last sentence more descriptive. Added the sentrece "Every account has access..."

[EDIT2} Even simpler, have the first template loaded be different for each CQC account and just directly set ENV01 or ENV02 to the correct state.

Okay, now we're getting somewhere....I see where your going Mark. My beef before was that you could not use environment variables merely be setting them up in the various accounts. What you are proposing is to use them but set their values via a template that's loaded on the IV, presumably the first one.

However, some things that aren't clear:

If you have to do this, why use environment variables at all. I would use the variable driver instead. Seems to overcomplicate.

You mention that you have to set a logged out state. I think that's easier said than done. On what action would you presume to do this?
Reply
#29
Any stuff running in the event server of course would always only see one set of values, since it's always logged into the same account, but it can have values different from the defaults set in the System area if you want to override anything in the account that you have the event server logged into. But it can't change according to who is logged in, that is definitely the case. It's always in the same account. The IV is the only guy who will adapt to User level variables overridding system level ones, based on what account you log into and run it.
Dean Roddey
Explorans limites defectum
Reply
#30
Quote: If you have to do this, why use environment variables at all. I would use the variable driver instead. Seems to overcomplicate.

You mention that you have to set a logged out state. I think that's easier said than done. On what action would you presume to do this? [url=http://www.charmedquark.com/vb_forum/editpost.php?do=editpost&p=87459][/url]

Yes, using a couple of VARS in the VAR driver would probably be simpler. It was only because the thread started with env vars that it went that way.

The logout is an issue because there is nothing in particular to hook into that helps. My suggestion is to add an explicit exit to the RDP session for now that resets the variable (wherever it lives).

Long term the logout issue goes away as the plan is to have the RDP session continuously active.
Mark Stega
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Leviton VRUSB owners: Does it work? IVB 30 10,826 07-13-2015, 09:25 AM
Last Post: jkmonroe
  Sony DVP-CX777ES doesn't work Andre 10 5,162 02-05-2012, 01:30 PM
Last Post: Andre
  Just installed 4.0 now SNMP doesn't work? SamVimes2 9 4,370 09-07-2011, 09:40 AM
Last Post: Dean Roddey
  Will CQC work for me? programmergeek 7 3,157 06-17-2010, 03:33 PM
Last Post: LesAuber
  Will this work as server? optix 3 2,352 12-03-2009, 06:43 AM
Last Post: sic0048
  j river media center 13 work with cqc? pjwinstalls 0 1,317 06-22-2009, 04:55 PM
Last Post: pjwinstalls
  What UPB switches work best with CQC/ELK flik 4 2,142 03-17-2009, 09:59 AM
Last Post: robolo
  How to configure seperate sage server to work with cqc server rajeevc 2 1,953 01-24-2009, 03:43 PM
Last Post: SomeWhatLost
  Anyone make/sell templetes as cool as these that would work with CQC personalt 8 3,271 11-02-2008, 03:52 AM
Last Post: Mark Stega
  How to work with Image Packs RHT 3 1,912 08-27-2008, 03:45 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)