Making announcements is always fun. They come in all kind of forms, telling time, giving feedback or just telling you the state of your system. ZMC can also do announcements. It is able to make an announcement in any single room without disturbing music output in the other rooms or make an announcement to all rooms in one go. If you followed the information this far you have most of your system prepared for this.

What you need is an extra soundcard. Don't be put off by this. You just need the cheapest USB sound stick you can find and that will be around Euro 12,-. You don't need anything more advanced. If you haven't yet installed the HS speaker client then do it now. Make sure that the output will go to the second soundcard and that there is actually sound coming out of it.

Here's the matrix again.

matrix.png (64.51 KiB) Viewed 19143 times

Connect the sound card to input 11 (Speech in) on the XAP800. Open up GWare and open the Input 9-12 screen and check the box next to the Post Gain meter to see if any sound is coming in into the XAP800.

Follow the same pattern as before. In the matrix connect Input 11 to Processor B and D by marking the crossings green. Next on the left find Processor D and mark all the cross point green to your outputs that are in use. You should have green boxes as shown in the matrx image above.

processors.jpg (96.45 KiB) Viewed 19143 times

Open the Process A-H window and unmute all except Processor D. What you got now is one button to mute all audio (Processor C), one to mute single announcements (Processor B) and one mute button to mute all room announcements (Processor D). This will simplify the number of calls to make to the serial port.

macro200.png (14.63 KiB) Viewed 19143 times

Now it's also time to make a few macros on the XAP900.Any one who tried the ZMC Reset function have noticed by now that there was something missing. That will be corrected now. We are going to add 5 macros in total.Open the macro editor in GWare. Select macro 200 and fill the required fields as shown in the image.Note: I have 9 rooms in use your number may vary.Select macro 201 and fill in the same arguments but this time use for Arg3 a one instead of zero.Note: Arg2 is the letter O

macro202.png (54.9 KiB) Viewed 19143 times

Select macro 202 and set it up as shown in the next image.For the last one select macro 203 and fill it in just like the previous on but this time use a one for Arg 5 instead of zero

macro204.png (56.56 KiB) Viewed 19143 times

Macro 204 will be our last macro for now.Create it like to image shown.

Now the fun part, creating some events in HomeSeer.Make an event, trigger it manually and for the action select the script AZ_ZMC3.vb. Put this in the Optional parameter field

("Main","KITCHEN;OMROEP;This is a test message $$DS:W16 |2|warning.wav").This will give you something like this.

testmessage.png (21.4 KiB) Viewed 19143 times

I will explain this example."Main" is the function to call in the script.You don't have to change this"KITCHEN" is the room name as you filled it in the INI file.Next there must be a ; to separate the location from the command. The command here in OMROEP (Dutch for announcement).Again a ; but now to separate the command and the parameters."This is a test message $$DS:W16" is the text to be spoken.As you can see you can use the HS replacement variables here. In this case the string of device W16 is spoken.Then you got a separator mark |Next you get the volume. The example will put the volume at 2dB. Leaving it at 0 will not alter the volume level. Instead you can leave it blank also. This will do the same ("Main","KITCHEN;OMROEP;This is a test message $$DS:W16")And for last you can also play a wav file before the announcement to get the listeners attention.

To speak an announcement to all rooms instead of the room name use the keyword ALLES (Dutch for All)e.g. ("Main","ALLES;OMROEP;This is a test message $$DS:W16 |0|warning.wav")

Some more examples:("Main","ALLES;OMROEP;Attention! The door of the fridge is still open!")

An hourly trigger gives you a cuckoo clock in the house.("Main","ALLES;OMROEP;.|0|cuckoo_clock.wav")

At special occasions I change this also- At Christmas time to santa.wav.- Valentine ’s Day to kisses.wav.- Or when I am in a naughty mood then to cow.wav

Setting up a reminder to not to forget some special date such as your wedding day, the birthday of your spouse or an appointment to name a few.

What else can you do?You can also turn this speech channel into a second audio channel by streaming music to it. That way you can have each room the choice of one or the other audio source.

In the INI file there is a place where you can define a device house code that is like a master switch for the whole system.The field is called MIGRAINE_STATE_DEVICE. What it actually do is the script will look at the ON/OFF state of this device to determine if an audio channel will be opened or not. A very nice feature when you have someone at home with migraine, hence the naming

That covers the audio system.I still have to talk about voice recognition and how to deal with that. I 'hear' a next article coming up about VR.

Part 4 is at the moment not yet implemented, but the announcements work well via the speakers I have activated at that moment. I can't wait for more explanation about the voice recognition, that would be a amazing upgrade of the system.Many thanks sofar for this amazing documentation.

raymonvdm wrote:Last week i have followed this guide again and now i have my own NS announcement system on HS2. The downfall is that is also updated to HS3, will this script be working on HS3 ?

The scripting engine of HS3 is slightly different then that of HS2 so it won't work right out of the box. You have to make a few minor updates to the vbscript commands to make it work. I helped someone with this before and asked him to send me the update script since i don't have HS3 to make/test it on. Sadly after a few emails i didn't hear a think anymore from him. However if you need help feel free to ask.

hs.stringitem no longer exists in HS3. hs.devicestring now needs a device reference to be passed to it (which is a numerical value rather than 'I98') rather than the older HS2 style device code. IF you click on the device in the advanced tab you should have a line saying reference and then a four digit number which the reference is. You would need to substitute this reference in hs.devicestring.

hs.stringitem no longer exists in HS3. hs.devicestring now needs a device reference to be passed to it (which is a numerical value rather than 'I98') rather than the older HS2 style device code. IF you click on the device in the advanced tab you should have a line saying reference and then a four digit number which the reference is. You would need to substitute this reference in hs.devicestring.

Raymond, have you looked into HS2 to HS3 connector from jon00 ?Maybe it is a possibility to run h2 next to hs3, only consumes a few percent cpu as if it is this much already. Then you can pretty easily connect them to each other and maybe this still gives the functions you want.you can let it trigger events and change statuses from real sensors and virtual.

Because there is so much interest in my script i would like to make a request here.

Is there anyone that has HS3 installed, got some VBScript knowledge and is willing to do some testing and give me feedback? In addition if you got a XAP800 that would be nice but it isn't a requierment. If so i am willing to spend time into this to convert the script to HS3 but i need commitment to this otherwise it can't be done. What i will ask from you is to put the script in your system and start it. If it crash (it will at first) then report back to me clearly what you have done, copy paste the error and if possible take a screenshot. If you can resolve it yourself then tell me also about it so i can implement it. This process repeats untill it's working.

Scripting knowledge would speedup the refactoring process when it is a minor error that you might solve on your own so testing can go further. That would reduce some email back and forth. I will keep your offer in mind, thx