Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
This might be obvious, but.... ("fields" question)
#1
I have a driver installed and it has fields associated with it. One of the fields reads 'true' and 'false' depending on the condition of the field.

I want to do two things when the field changes to 'true':

1. Switch to a specific template.
2. Run an application (actually a command line) on the local touch computer.

I know I can run the application and switch the template from a command button through a series of configured actions, but I want this to happen automatically when the field changes. Do I need a macro to do this or can it be done simple from the Interface Designer? I ask because I know I can set up simple dynamic images that change based on the conditions of fields but I want to go a step beyond that, and accomplish the above, without too much difficulty.

Thanks guys.

Adam
Reply
#2
There's no way to switch templates based on a field. In the end, I think that having the IV magically start trying to do something when you are trying to do something else is usually not a good idea. And if you use the new popups, it couldn't change when a popup is up anyway.

What usually works better is to put a an indicator on the template, and use the states system to hide it until the thing happens that you want to react to. It can be an animated image that blinks or something like that.

Other things you can do are use a triggered event to send out some audio signal or blink the lights or something like that to get your attention. Those work whether you are at the touch screen or not and don't interfere with whatever you are trying to do at the moment if you are at the touch screen.

Then you can actively invoke whatever program it is that you want to run, when you see the indicator or see the lights blinking and so forth.

In 2.1, hopefully I'll get the event system wired into the IV, and you could use a popup in response to some event. This way, it doesn't interfere with what you are doing, it just pops up something over it, which you can react to and then close and go back to where you were.
Dean Roddey
Explorans limites defectum
Reply
#3
So, you are saying use the Event Server and that will watch the field and initiate an external application or command line when the field changes? That would work for me (not at home now but if that is what you mean it will work).

What I am trying to do is wake my touch computer from a display energy save mode when a field changes. I found a third party application that allows a command line from any PC on the network to trigger a specific touchcomputer via its IP address to wake up the display. Have not tried it yet. But if the Event Server can watch a field and send the command line, in theory this approach will work.
Reply
#4
Make sure the event server doesn't call something that has a UI output. I tried that and as it runs as a service [ie, not in an acct where there's a UI], it put CQC into a very bad state. Dean had to perform surgery on my file and cut out the offending action.

Although, Dean, what if the output was sent to a file (ie. program.exe >output.txt)
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#5
If it's just a simple command line app, it should be ok. Though if it tries to open any kind of listening socket, that would get blocked by any firewall.

I'm still kind-o confused though. If you aren't there to see it, why bother waking it up because you aren't going to see it anyway. Wouldn't some other type of notification be better? Like some sort of text to speech announcement kicked off by the event server seeing a change in that field. Then you just go to the nearest touch screen and touch it to turn it on and then pick the screen you want. You can have a button on the main template to load it with a single touch.
Dean Roddey
Explorans limites defectum
Reply
#6
Well, let me clear up the confusion. There is actually a method to my madness. Its back to the volunteer firefighter automated alert again.

The FD tone alert page is handled by the Uniden 396. A Board member here wrote a driver for CQC. I stream the audio output of the 396 using the VLC encoder and media player (works great). The stream is quiet (but always streaming) until an alert is sensed by the 396, at which point the audio squelch circuit on the 396 opens, it sounds a tone, and the audio is carried to all the touch computers via the UDP stream - especially to the touch computer on my nightstand.

If this happens at 3 am - or not - sometimes I dream it paged and wake up, only to realize it did not page. Sometimes it happens and sometimes it does not. In other words, in my twilight (I am a light sleeper), I think I heard it page, I open my eyes, and I wonder if it was a dream. It's like a twilight state.

Sure, conventional wisdom would blink the lights and sound a really loud alarm. But I have a wife. She likes to sleep. She wishes me luck on my life and property saving adventure, lets me live my life, but does NOT want to be awakened at 3 am.

I want to light up the touch computer display if there was a page. It has the added benefit of lighting up the room just enough at 3am for me to see my way out. And, if I wake up and the panel is on, I know it really paged and I was not dreaming.

But before I proceed further, I have a problem and I think its with the driver for the Uniden 396. Its wierd. There is a 'tone out mode' on the 396. When in that mode, the radio is silent. If I press 'hold' on the 396 (either on the actual 396 or via the 'hold' action command via the driver), it lets the audio come through regardless if there is a page, i.e., it opens the squelch on the 396. Press 'hold' again and it reverts to standby mode and awaits a page.

If there is a page, the 396 automatically goes into 'hold' mode, plays the alert tone and message, and then after 5 seconds automatically goes out of 'hold' mode and back to standby.

In CQC, on the 396 driver, I found a field for 'hold'. When the value is 'true', the 396 is in 'hold' mode. When the 396 is in standby mode - or awaiting a page and not in 'hold' - the 'hold' field reads 'false'.

Here is the bizarre part. If I press 'hold' either on the 396 or via the driver, and I use the dynamic text widget, I can see the field read "true". Press 'hold' again and the value switches to 'false'. So far so good.

But tonight we got a page and I watched my IV instead of running out of the house (it was a non-emergency call). The 396 went into 'hold' mode automatically when the page was received, but the field stayed 'false'. When the 396 came out of 'hold', the field still read 'false'. In other words, it did not change.

This make me think the 'hold' field is not really reading the true 396 'hold' state. If I manually put the 396 in 'hold' it reads it. If it 'tones out' and automatically goes into 'hold', the field does not register the 'true' state.

It is this 'true' and 'false' state that I need to trigger the alert status to turn on the monitor, i.e., to 'awake' the monitor, with that third party app.

So I wonder if its a driver problem or a 396 protocol problem.

So that is my stream of consiousness for what it's worth.
Reply
#7
What are you using for lighting control? How about a small nightlight that can be turned on?
Dean Roddey
Explorans limites defectum
Reply
#8
right now I need to figure out whether the field aspect of the driver is working right as the trigger before I get to the results of the trigger.
Reply
#9
Dean Roddey Wrote:In the end, I think that having the IV magically start trying to do something when you are trying to do something else is usually not a good idea. And if you use the new popups, it couldn't change when a popup is up anyway.
I think this is a narrow view and limiting the function of the IV/Interface/CQC.

The vast majority of the time, the IV is not processing user input. Thus the "when you are trying to do something else" is a very remote case.

So, to me, the quote above is like saying that this device, costing anywhere from $200 to $3000, sitting on my table or mounted in the wall can't be used for programatically displaying changing information, or programatically take the user where they are likely to want to be.

I can think of all kinds of uses of having the IV change:
  • Front door opens, pre-select the alarm disarm page.
  • Heating system faults, go to the heating diagnostics page.
  • It's night-time, turn off the backlight and/or switch to a night-based color scheme.
Yes, people can make horribly bad design decisions; but they do that now.

The strength of CQC is that it can be heavily customized (which is sometimes also it's weakness: it has a rather steep learning curve). So, I suggest to build on that strength and let those of us who want to have a macro/event/command change the IV be able to do so.
Reply
#10
I don't think it really matters now seldom you are actually at it. When you are actually at it, it's not good for it to start trying to do something while you are interacting with it. I'd hate to be trying to disarm the security system about the time it decided to flip to another page, and by the time I get back, it's too late and the security system has triggered the alarm.

And it's not that it can't programmatically display something. It's doing that all the time. The issue is trying to change screens/overlays automagically. And, as I said, when a popup is up, the underlying screen cannot change. And you could actually be dragging a slider or holding down a button. That would be just too complicated for me to want to get into.

It's more reasonable if it involves a 'no activity for X seconds' type of thing, where it will only do something automatically if no one has interacted with it for some time. That I could see. It avoids the technical and user interaction problems.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  It's all obvious in retrospect Dean Roddey 3 566 12-17-2021, 10:10 AM
Last Post: Shaky
  SSL Certificate Question gReatAutomation 1 950 10-26-2020, 07:48 AM
Last Post: gReatAutomation
  V2 Question - OpenWeatherMap Using their New JSON Data Feed kblagron 7 2,136 05-07-2020, 01:40 PM
Last Post: Dean Roddey
  Dynamic Overlay Question bryanb 4 1,372 04-17-2020, 03:48 AM
Last Post: bryanb
  Triggered Event on Timer Question znelbok 7 3,414 12-09-2019, 02:10 PM
Last Post: znelbok
  Question on CQC Driver Pack Install kblagron 1 1,305 11-26-2019, 06:38 PM
Last Post: Dean Roddey
  SONOS Driver Question gReatAutomation 13 5,693 08-23-2019, 12:37 PM
Last Post: Dean Roddey
  Insteon V2 Driver Question kblagron 1 1,276 08-01-2019, 10:51 AM
Last Post: kblagron
  Question on Parsing a String in a CML Macro kblagron 2 1,639 06-18-2019, 06:21 PM
Last Post: Dean Roddey
  ELK M1 Client Interface question lleo 1 1,335 06-12-2019, 08:15 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)