www.homeseer.com    
 

Go Back   HomeSeer Message Board > Audio / Video and Infra-red (IR) Plug-ins > Audio / Video and Infra-red (IR) Discussion

Reply
 
Thread Tools Display Modes
  #121  
Old April 12th, 2017, 08:57 PM
dtsouers's Avatar
dtsouers dtsouers is online now
Seer Plus
 
Join Date: May 2010
Location: North Canton, OH
Posts: 96
It seems there a bug in Homeseer with my Prolific USB to Serial Adapter. What brand are other people using?

Hmm, tried an FTDI adapter too recently. Thinking this is a bug with either HS3 or Windows 10.
Funny thing Windows via the MODE command thinks the port is closed and G-Ware works...

Last edited by dtsouers; April 15th, 2017 at 09:28 PM. Reason: Tried another USB adapter...
Reply With Quote
  #122  
Old April 13th, 2017, 01:23 AM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 13,385
I have had good luck with Digi and VSCom USB to Serial adapters.



Have a read here:

5 Steps for Selecting the Right USB to Serial adapter
__________________
- Pete

Automator
Reply With Quote
  #123  
Old April 14th, 2017, 03:02 PM
noopara's Avatar
noopara noopara is offline
Seer Master
 
Join Date: May 2002
Location: Gig Harbor, Washington
Posts: 730
Quote:
Originally Posted by AshaiRey View Post

I am experimenting with a cheap WiFi IP webcam and ContaCam plus my own very simple script to detect movement in certain zones in a large room and it work great. The detection angle is far wider then a PIR sensor and the range is better too. The processor load due this on my cheap Atom CPU at 1,49 GHz in my HS2 machine is 8%
I saw this old post in this thread and am interested in doing something like this.

I want to use some of my outdoor cameras to detect motion but I am concerned about the response time. How fast is the reaction time using ContaCam and HS3 to react to the motion detection? I currently use PIR motion detectors around my house to detect deer and trigger a couple of sprinkler zones to scare them away. The problem is I get a lot of false positives from the motion detectors which is one reason I am looking at using a camera. I also have an old wired driveway detector which is giving me a lot of false positives which I hope to replace with an ip camera.

I need a motion detection response of a second or so. Is that possible with the ContaCam/HS3 approach?
Reply With Quote
  #124  
Old April 15th, 2017, 03:05 PM
ckellyusa's Avatar
ckellyusa ckellyusa is offline
Seer Deluxe
 
Join Date: Aug 2014
Location: DFW
Posts: 142
Finally had some time start playing with this again. Is there a way to control the volume of an output? Do I need to make an event to call the script or is there another way? (Ideally I'd like to have a slider in HS Touch to control each output)

Thanks!
Reply With Quote
  #125  
Old April 20th, 2017, 03:06 AM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
Quote:
Originally Posted by noopara View Post
I saw this old post in this thread and am interested in doing something like this.

I want to use some of my outdoor cameras to detect motion but I am concerned about the response time. How fast is the reaction time using ContaCam and HS3 to react to the motion detection? I currently use PIR motion detectors around my house to detect deer and trigger a couple of sprinkler zones to scare them away. The problem is I get a lot of false positives from the motion detectors which is one reason I am looking at using a camera. I also have an old wired driveway detector which is giving me a lot of false positives which I hope to replace with an ip camera.

I need a motion detection response of a second or so. Is that possible with the ContaCam/HS3 approach?
I am sorry but i don't have HS3 so i can't give you any real numbers on response time. With HS2 i got a response under or at about a second. I mainly depends on the server. Was it running idle at the time the trigger happened then for instance the HD has to spin up again (in my case that is). That would take some time.
__________________
- Bram

Send from my Commodore VIC-20

Ashai_Rey__________________________________________________________ __________________
HSPro 2.5.0
PIugins: PowerTrigger | NetCam | HSTouch | WeatherXML | ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | RFXCOM, | Is Speaking | BLBackup
Reply With Quote
  #126  
Old April 20th, 2017, 03:15 AM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
Quote:
Originally Posted by ckellyusa View Post
Finally had some time start playing with this again. Is there a way to control the volume of an output? Do I need to make an event to call the script or is there another way? (Ideally I'd like to have a slider in HS Touch to control each output)

Thanks!
For volume control you can control the output, the input, the sound processor or the mixer cross point. This can be done with the script and a event.


If you control the input, output or the mixer cross point you can control that single audio channel. For overal control you can change the level at the mixer processor or by controlling WinAmp/Window media player/iTunes or what ever sound source you use.


When using a tablet with HS touch then connect the output of the slider device as input to an event that send the correct value to the XAP. I am not familair with how HS3 does this so i can help you with that.
Reply With Quote
  #127  
Old April 20th, 2017, 07:58 AM
ckellyusa's Avatar
ckellyusa ckellyusa is offline
Seer Deluxe
 
Join Date: Aug 2014
Location: DFW
Posts: 142
What would the script look like to control a single audio channel (an output channel)?
Reply With Quote
  #128  
Old April 21st, 2017, 07:20 PM
dtsouers's Avatar
dtsouers dtsouers is online now
Seer Plus
 
Join Date: May 2010
Location: North Canton, OH
Posts: 96
Seems to be a bug with HS3, older versions appear to work without errors.

Last edited by dtsouers; May 25th, 2017 at 08:00 PM.
Reply With Quote
  #129  
Old April 22nd, 2017, 01:20 PM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
Quote:
Originally Posted by ckellyusa View Post
What would the script look like to control a single audio channel (an output channel)?
At the top of the script i've documented the available commands that are included

' SetGain ("SetGain","0|8|O|16|A")
' - Parameter(s) <unit_code> <channel> <group> <value> <A or R>

so use domething like this in your event
AZ_ZMC3.vb("SetGain","0|8|O|16|A")

- Output 8, volume level 16 and the value is an absolute value
Reply With Quote
  #130  
Old May 7th, 2017, 08:59 PM
dtsouers's Avatar
dtsouers dtsouers is online now
Seer Plus
 
Join Date: May 2010
Location: North Canton, OH
Posts: 96
The speech command seems to be turning on then turning off immediately with no sound be output.
I tested this by setting music to play on that input and a click sounds is heard. Do I need to run a speech proxy to halt processing while the sound plays?

Last edited by dtsouers; May 7th, 2017 at 09:11 PM.
Reply With Quote
  #131  
Old May 9th, 2017, 02:15 PM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
Quote:
Originally Posted by dtsouers View Post
The speech command seems to be turning on then turning off immediately with no sound be output.
I tested this by setting music to play on that input and a click sounds is heard. Do I need to run a speech proxy to halt processing while the sound plays?
Please think about what you are trying to do.
You want to do some speech. Now speech is send via the HS SpeakerClient. This HS SpeakerClient has a tab where you can configure how speech is done and with voice to use. The HS SpeakerClient is connected to one sound card. Your music to another.
Now to send speech to the SpeakerClient via a script you can use hs.Speak("say some text", True)
The switch True tells the speaker client to wait until the speakerclient is finished speaking. This will halt the command hs.Speak() too. So speech must be finished before the script continues.

I get the impression that you didn't send any text to say.

A command like this placed in an event should give you some response in all connected rooms
AZ_ZMC4.vb("Main","ALL;SPEAK;Attention! Can you hear me now")

Where
Room0 in your ini file is labeled as All
The sound level is not altered and left at 0db

Tip, turn on the 'show text in a popup' option (or called something like that) in the speakerclient so it will show you what the speakerclient is outputting
Reply With Quote
  #132  
Old May 10th, 2017, 10:21 PM
dtsouers's Avatar
dtsouers dtsouers is online now
Seer Plus
 
Join Date: May 2010
Location: North Canton, OH
Posts: 96
Figured it out, needed to set a green crosspoint for each room on the speakin.
However, it doesnt appear to mute the music.

Edit: the crosspoint shouldnt be included. Thinking this is an issue with the commands being run to quickly. Maybe the proxy is needed.

Last edited by dtsouers; May 25th, 2017 at 08:03 PM.
Reply With Quote
  #133  
Old May 11th, 2017, 02:45 AM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
It's not clear to me what you are doing and how your setup looks like because the standard setup should work as it is tested many times already.

As said the XAP800 is a complex piece of hardware with so many settings to make. If you want to do it yourself then you need to have a good understanding of how these kind of mixer work.


So if you need to set a green crosspoint by hand then your setup isn't correct thus the script won't work as expected. The ini file must reflect your setup physically. This also has to be correct with the used in and outputs on the mixer

Btw, setting things by hand is a good way to test if the sounds is passing through the various parts of the mixer and to set the right sound levels.
Reply With Quote
  #134  
Old May 29th, 2017, 02:20 PM
ckellyusa's Avatar
ckellyusa ckellyusa is offline
Seer Deluxe
 
Join Date: Aug 2014
Location: DFW
Posts: 142
HSTouch Slider

Ok, I've tested the SetGain with events, and it works fine. I'm trying to apply the principle to HSTouch now but I'm getting error messages. The first image is the setup and the second image is the error. What should I change/try next?

Thanks!



Reply With Quote
  #135  
Old June 16th, 2017, 04:05 AM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
Sorry for the late reply. I was busy with other things in life thate needed attention

About your HSTouch problem.
When you call the SetGain methode the script expects a parameter in the form of a string like this "0|8|O|16|A"

According to me you pass all the parameters seperatly now.
You have to concaticate them together into one string.

You have a few options to do this.
Making your own side script to do so. Call this from HST and send it to ZMC.
You can also try to do it in HST (not familiar with the HS3 version so i can't help)

Add an extra methode in ZMC v4 that will do the work for you.
It's best to make it a generic on that does the conversion an let it call the needed methode for you. I don't know about your coding skills.

A quick solution would be adding this code to the ZMC script. Just add it next to the SetGain methode that is there for easy lookup later on.

(Be aware that this is untested code)
In HST just change the methode name from SetGain to SetGainHST
Code:
 
'==============================
' SetGain via HSTouch
'==============================
'
' Sets the gain on the specified channel for the specified unit
' Data is now coming from HSTouch
'
' unitCode - the unit code of the target unit
' channel - the target channel (1-8, A-D, 1-2, or * for all)
' channelType - the type of channel (e.g. I for input, O for output,
'                                    S for subbus, p for processors)
' level - the amount of gain to apply in dB (-20 to 20).
' Type  - A for absolute or R for relative to current,
'
Sub SetGainHST(ByVal parameter1 As String, ByVal parameter2 As String, ByVal parameter3 As String, ByVal parameter4 As String, ByVal parameter5 As String)
    strdata = parameter1 + "|" + parameter2 + "|" + parameter3 + "|" + parameter4 + "|" + parameter5
    CMD = UNIT_CMD & GetUnitCode(strData) & " GAIN " & GetParameter(strData) & EOM
    If DEBUG = True Then hs.WriteLog(strScriptName, "SetGain request used : " & CMD)
    send(CMD)
End Sub
Reply With Quote
  #136  
Old July 24th, 2017, 11:01 AM
cavester cavester is offline
Viewer
 
Join Date: Jul 2017
Location: UK
Posts: 1
Just experimenting with your script and trying to understand how it works and integrates...

I have a Amazon echo that I am splitting the right and left channels on for stereo and wiring to inputs 11 and 12 respectively (Audio IN L & Audio IN R). I have then wired Outputs 1 and 2 (Kitchen L & Kitchen R) to my Amp where the speakers are wired to.

My question is regarding the ZMC v4 setup, is this alterations going to be acceptable for stereo setup or will these changes screw something else up somewhere?

Thanks.
Reply With Quote
  #137  
Old July 28th, 2017, 09:20 AM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
Sorry i think it won't work like that

You could try this
Use output 1-10
In the INI file rename output 1 to Kitchen-R and output 2 to Kitchen-L

Input 11 is where you put on the right channel (or left)
Input 12 the left channel (or visa versa)

Now you can control each channel
What is on input 12 is controlled with
AZ_ZMC4.vb("Main","KITCHEN-L;ON;<time in seconds>")

If you use this also for KITCHEN-R then you still get the right side channel
To let the music be turned of you need to make an event called Kitchen-L which will fire AZ_ZMC4.vb("Main","KITCHEN-L;OFF")

Input 11 is used for announcements or as a second audio source so you can have different music in an other room. This channel switches back as speech has stopped so you need to find a way to keep it open.

One solution is to control the matrix directly with command simular like this. (see manual for the correct settings)
AZ_ZMC4.vb("SetMatrix","0|C|P|2|O|1")

Or you could try to call the buildin subroutine SetSingleChannelToSpeech(ByVal Location As String) for input 11

and back to audio
at input 12 with SetSingleChannelToAudio(ByVal Location As String)
Reply With Quote
  #138  
Old August 5th, 2017, 11:57 PM
ckellyusa's Avatar
ckellyusa ckellyusa is offline
Seer Deluxe
 
Join Date: Aug 2014
Location: DFW
Posts: 142
Quote:
Originally Posted by AshaiRey View Post
(Be aware that this is untested code)
In HST just change the methode name from SetGain to SetGainHST
Code:
 
'==============================
' SetGain via HSTouch
'==============================
'
' Sets the gain on the specified channel for the specified unit
' Data is now coming from HSTouch
'
' unitCode - the unit code of the target unit
' channel - the target channel (1-8, A-D, 1-2, or * for all)
' channelType - the type of channel (e.g. I for input, O for output,
'                                    S for subbus, p for processors)
' level - the amount of gain to apply in dB (-20 to 20).
' Type  - A for absolute or R for relative to current,
'
Sub SetGainHST(ByVal parameter1 As String, ByVal parameter2 As String, ByVal parameter3 As String, ByVal parameter4 As String, ByVal parameter5 As String)
    strdata = parameter1 + "|" + parameter2 + "|" + parameter3 + "|" + parameter4 + "|" + parameter5
    CMD = UNIT_CMD & GetUnitCode(strData) & " GAIN " & GetParameter(strData) & EOM
    If DEBUG = True Then hs.WriteLog(strScriptName, "SetGain request used : " & CMD)
    send(CMD)
End Sub

Thanks for the code, I finally had a moment to try it out. I had to add this line to make the file compile:

Code:
Dim strdata                   As String                    'Added to for SetGainHST

I'm now getting this error using the same setup as before in HST:



Reply With Quote
  #139  
Old August 7th, 2017, 03:38 AM
AshaiRey AshaiRey is offline
Seer Deluxe
 
Join Date: May 2009
Location: Netherlands
Posts: 425
The error description gives you a hint that something is wrong with the parameters. The function wants to have 5 parameters and it's getting 5 so that's oke. However it wants also that all paramaters are of the type string

parameter1 As String
parameter2 As String
parameter3 As String
parameter4 As String
parameter5 As String

If I look at your parameter screenshot I can't see what type they are but i can imagion that 4 and 5 are integers. I don't know if you can set the type in HST otherwise you have to change the code like this

Change the specific parameter in the function call
For example
ByVal parameter4 As Integer, ByVal parameter5 As Integer

And change the following line to reflect your change (as in the example above)
strdata = parameter1 + "|" + parameter2 + "|" + parameter3 + "|" + "|" + CStr( parameter4 ) + "|" + CStr( parameter5 )
Reply With Quote
  #140  
Old August 7th, 2017, 10:12 PM
ckellyusa's Avatar
ckellyusa ckellyusa is offline
Seer Deluxe
 
Join Date: Aug 2014
Location: DFW
Posts: 142
I tried that and made sure all the other parameters were strings or numbers as well, but I'm still getting the same error.

Is there a way to debug and figure out what HST is passing as the parameters?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
whole house audio milll36 Audio / Video and Infra-red (IR) Discussion 6 November 11th, 2009 07:29 PM
Whole House Audio nojstevens Audio / Video and Infra-red (IR) Discussion 10 January 7th, 2009 09:58 AM
whole house audio njabara Audio / Video and Infra-red (IR) Discussion 24 January 21st, 2006 05:29 AM
New way for whole house audio? pete1122 Audio / Video and Infra-red (IR) Discussion 6 May 23rd, 2003 07:36 AM
Whole House Audio johnf Audio / Video and Infra-red (IR) Discussion 1 September 10th, 2002 06:02 AM


All times are GMT -4. The time now is 11:38 PM.


Copyright HomeSeer Technologies, LLC