Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Env01 not work
#1
Have the following command and it is not working.

System::Equals
P1=%(StdRTV:Env01)
P2=1

Devices::FieldWrite
P1=Variables.Nokia-Media
P2=test

End

This is being called via a trigger on my cameras when there is motion. Have some commands before this and they are working so I know the trigger is working. And I have this same command working in my IV via a command button. So why is it not working in the trigger?
Reply
#2
What do you mean by not working? You mean you get an error, or that it comes up empty? If it's the latter, remember that the events are not running in your user account. So you have set the environment variables in the System section of the environment variable screen, and you'll probably have to cycle the machine after doing it so that any already running programs will see the new variables.
Dean Roddey
Explorans limites defectum
Reply
#3
Sorry, mean that nothing gets written to the variable. But if I put this exact same command in a button and press it then the value does get written. So I don't understand why it will work in the IV as a Command Button but not via a trigger. What is the difference? The trigger is working so that is not the problem.
Reply
#4
Been playing around and seeing what I can figure out. Looks like the triggered commands stop on this. Looked in the logs and got the following, see attached file. Does not tell me anything though. But why would it have problems with that command? Here is what I have in my triggered event action:
Devices::FieldWrite
P1=Timer.InvokeCmd
P2=ResetCD 1 Minutes 5

System::Equals
P1=$(GeoVisionSysLog.MonitorDevice)
P2=Side Entry

Devices::FieldWrite
P1=Variables.Motion
P2=Motion detected at: Side Door at %(StdRTV:HHMMSS)

Devices::FieldWrite
P1=Variables.%(StdRTV:HostName)-TopSelected
P2=Cameras

Devices::FieldWrite
P1=Variables.%(StdRTV:HostName)-SecondSelected
P2=Camera 2

Devices::FieldWrite
P1=CQCInterfaceViewer.LoadOverlay
P2=center-overlay,\User\Camera2-Overlay

System::Equals
P1=%(StdRTV:Env01)
P2=1

Devices::FieldWrite
P1=Variables.Nokia-Media
P2=None2

End

Everything else works fine. I have the Env01 variable set in the Environment Variables of the computer but under User Variables and not the System Variables. Does that make a difference? I have it setup that way as I have my Nokia N800 RDP in and I want to be able to tell between it and the server. If I have it setup under User Variables then I can. Is working fine for those variables elsewhere in the IV.


Attached Files
.txt   CIDLogFileSnap.Txt (Size: 906 bytes / Downloads: 2)
Reply
#5
[quote]Everything else works fine. I have the Env01 variable set in the Environment Variables of the computer but under User Variables and not the System Variables. [/quote

Yes, as I indicated above, the event server (like all the servers) is not running in your account. The User section is only for your account. Put them in the System section, then restart the system.
Dean Roddey
Explorans limites defectum
Reply
#6
What do you mean by 'the user section is only for your account'? I have it in the User section and it works fine in the IV for this exact same command. Why would it not work in the triggered action?
If I do put it in the System section then how do I tell if it is the server or my Nokia N800 that is communicating with CQC? With it in the User section I can tell.
Reply
#7
Holy brickwall, batman....

The IV runs under your USER account. The event server runs under a SYSTEM account. So, the environment variables are DIFFERENT when using the IV than when using a triggered event. So, an action that uses an ENVIRONMENT variable under a command button on the IV uses the USER environment variables while the triggered event action EVEN THOUGH IT IS THE SAME, uses the SYSTEM environment variable.

Now, I ain't saying that's your problem, but it is what Dean's tried to explain multiple times.
Reply
#8
Thanks for explaining that to me. I see that Dean was trying but didn't understand til you explained that the IV uses the User variables and the triggered actions use the System variables. That is why the IV is working for me and not the triggered.
So how do I put the variables in the System environment variable and be able to tell whether it is the server logged in or the Nokia N800 logged in? I need to be able to tell the difference. Before I just had different computers so it was not a problem using the Env01 variable to tell the difference or even the hostname.
Reply
#9
The IV doesn't use the User section. It just uses what it can see. Everyone can see the System level ones. Only programs running in your logged in account can see the User ones for your user account.
Dean Roddey
Explorans limites defectum
Reply
#10
Dean Roddey Wrote:The IV doesn't use the User section. It just uses what it can see. Everyone can see the System level ones. Only programs running in your logged in account can see the User ones for your user account.

That's like saying cars don't burn gas, engines do. Bottom line, the IV uses the USER environment variables for that account (and can also see the System ones).

In any case, doesn't really answer Trioxide's problem and I don't know of a way around it. If he wants a triggered event to operate differently based on what user happens to be currently connected to the Server (whether locally or via RDP) I don't see a way to accomplish this since the event server uses the system environment variables only.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Leviton VRUSB owners: Does it work? IVB 30 10,758 07-13-2015, 09:25 AM
Last Post: jkmonroe
  Sony DVP-CX777ES doesn't work Andre 10 5,110 02-05-2012, 01:30 PM
Last Post: Andre
  Just installed 4.0 now SNMP doesn't work? SamVimes2 9 4,355 09-07-2011, 09:40 AM
Last Post: Dean Roddey
  Will CQC work for me? programmergeek 7 3,119 06-17-2010, 03:33 PM
Last Post: LesAuber
  Will this work as server? optix 3 2,333 12-03-2009, 06:43 AM
Last Post: sic0048
  j river media center 13 work with cqc? pjwinstalls 0 1,310 06-22-2009, 04:55 PM
Last Post: pjwinstalls
  What UPB switches work best with CQC/ELK flik 4 2,136 03-17-2009, 09:59 AM
Last Post: robolo
  How to configure seperate sage server to work with cqc server rajeevc 2 1,942 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,246 11-02-2008, 03:52 AM
Last Post: Mark Stega
  How to work with Image Packs RHT 3 1,894 08-27-2008, 03:45 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)