Jump to content

kevkmartin

Members
  • Posts

    185
  • Joined

  • Last visited

Posts posted by kevkmartin

  1. Another issue I've recently come to see and wonder if others have seen. I created ten additional voice announcements and for what ever reason the volume is (approx) 30~40% lower than the existing ones in place?!? Has anyone else seen this while creating new Julie U.S. voices? I had considered there was a problem on the little netbook I was using so went to another work station but the results were the same.

     

    I than went to another work station and the results were also the same!

     

    If anyone has a recommendation for a sound level normalizer program let me know because this is super annoying.

    Use mp3gain to normalize all of the mp3 files.

     

    http://mp3gain.sourceforge.net

  2. Okay, I think I understand but I'd like to dumb it down a smidge:

     

    The "hot" (black wire) that was going to the plug in where the sump is plugged in goes to one pole of the Marmac CT-800 and the other pole of the Marmac CT-800 connects where that hot wire was removed? Does it matter (maybe it'll be obvious when I get the CT-800) which of the two poles the black wire goes to? The CT-800 doesn't need a white wire?

     

    Much appreciated.

    No. No high voltage connections are made to the sensor at all. It is completely passive. The black wire (hot) is just looped through a hole in the sensor (inside the junction box) before connecting to the outlet terminal.

  3. I believe if you had to do this again a cleaner approach would have been to purchase a dual plate cover but the other side would be solid. That would simply allow the CT to be hidden underneath and sit enclosed. This obviously assume the correct work box with the required depth to be used. Regardless, could you offer a inside view of what this whole thing looks like?

    Leaving the LV connection on the outside gave me complete separation of LV / HV. I thought about getting a “single gang double plate” and cutting out, but then the mount screws would have been exposed.

     

    I could have done that with a box divider too, I acknowledge.

     

    In the end, it’s all hidden in a sump pit wiring closet anyway.

  4. I finally gave up on the Synchrolinc to monitor on / off and run time for the sump pump. I could never get it dialed in to read reliably - especially on times.

     

    That combined with reports I read that an internal fuse can fail - disabling the pump - made me finally go with the solution I had been putting off.

     

    I installed an outlet and a Mamac CT-800 current sensor in a 2-gang box. The upper and lower outlets are independent (broke the tab), so that only the bottom outlet is sensed by the CT-800.

     

    Testing this with an IOLinc seems much more instant and reliable than the Synchrolinc.

     

    Ultimately, I think I'm going to run the sense wires back to a zone on the ELK. That should make it virtually bulletproof.

     

    56d8adaa37d20dd6f6bc53e3951d2627.jpg

  5. I have used the lever version. They hold VERY tightly - I could not physically pull wires out of them once clamped.

     

    While I wouldn’t use them EVERYWHERE, they are very useful if you have a short wire in the box, or have 5 wires to join together.

     

    They are also very useful for ELK speaker wires.

     

    They work very well with solid and stranded.

    • Like 1
  6. A couple well placed cameras would be the best bet I think. Then could use Insteon or Elk sensors to turn on lights to get a better image. Running the cat6 for POE would be a little project if that's what you seek.

     

    IMO you can get some pretty good outdoor cameras for say $150 each. I've been happy with Hikvision.

    If you are going to buy cameras, don't fall into the MP hype. The new Dahua Starlight 2MP cameras BLOW AWAY just about everything else out there right now. I'm currently in the process of replacing about a dozen 3 and 4 MP HikVision with these:

     

    http://www1.dahuasecurity.com/products/ipc-hdw5231r-z-3651.html

     

    INCREDIBLE upgrade.

  7. I use two insteon motion sensors at the top corners of the garage door, "cross firing" onto the driveway across two cars. Programmatically, I require BOTH sensors be triggered within 10 seconds to kick off other actions.

     

    This has proven to be an effective way to "control" false alarms.

  8. Yes. Know number of cycles, duration of runtime, and cycle start / stop times.

     

    I will log these to a database, as I already do my heat and cool cycles from HVAC.

     

    I can then graphically display them, and also can trigger alerts for extended run times (anomalous).

     

    A typical cycle for my pit / pump should be about 7 seconds.

  9. I finally gave up on the Synchrolinc to monitor on / off and run time for the sump pump. I could never get it dialed in to read reliably - especially on times.

     

    That combined with reports I read that an internal fuse can fail - disabling the pump - made me finally go with the solution I had been putting off.

     

    I installed an outlet and a Mamac CT-800 current sensor in a 2-gang box. The upper and lower outlets are independent (broke the tab), so that only the bottom outlet is sensed by the CT-800.

     

    Testing this with an IOLinc seems much more instant and reliable than the Synchrolinc.

     

    Ultimately, I think I'm going to run the sense wires back to a zone on the ELK. That should make it virtually bulletproof.

     

    56d8adaa37d20dd6f6bc53e3951d2627.jpg

  10. I never thought about the random announcements........ But you can place a variable in a network resource. I wrote a quick program to generate a random number and put it in a variable. Then placed that variable into the NR. So I tested it and it works!! Now I'm making 12 folders for the months so that I can have different sounds based on the months. Thanks for the great idea. I updated the set up guide if anyone wants to add this to theirs as well.

    The random number in network resource will work, but I found it too likely that I would lose track of files and end up sending invalid "versions". That's why I ended up using the same resource, and having the speak routine handle randomization and substitution. It is able to parse what (and how many) options are actually available, and then select from them.

  11. Sure thing! 

     

    I set up my voice announcements on a laptop, that runs an apache web server, and some other perl code for various automation functions and logging.  There is no reason the apache server couldn't run on a RPi.

     

    This is all custom programming, and I've been working on it (refining) over the last few years.  It's written in perl, but I'm sure an enterprising youngster could convert to python.  I've included the code for the speak routine below.

     

    In essence, the speak routine is in a library file that I include in any code that I want to be able to speak through the audio system.

     

    To speak a phrase, I simply call a web page from the apache server (invoking the relevant perl code in the process).

     

    For example, to speak the word "hello", I would have a piece of perl code that would send the command:

     

    speak ("hello");

     

    My solution is dependent on having all of the mp3 files pre-generated and stored in the directory "audio" on the web server.  Within the audio folder are the numbered month folders (1-12) used to check for seasonal announcements.

     

    The ISY uses network resources to make calls to the apache server and thereby "speak".

     

    The format_string_for_speak routine is a bit of bulletproofing, ensuring that the default (or provided) audio path and .mp3 extensions are properly applied for each word.

     

    Here's the speak and format_string_for_speak routine s that I developed in perl:

    #-------------------------------------------------------------------------------
    
    
    sub speak
    {
    
    # This routine accepts an input string to be spoken.  
    # The input string consists of individual,fully-qualified words / phrases (mp3s),
    # separated by spaces.
    #
    # The routine will check each word / phrase to see if there is a month-specific
    # version available.  If so, the month-specific phrase(s) will be spoken.
    #
    # Additionally, the routine will determine if multiple, equivalent phrases exist in the
    # specified or month directory, and will randomize among available instances of
    # the phrases.  
    #
    # "Equivalent" phrases are specified by the presence of an _## extension prior to
    # the .mp3 extension.
    #
    # The EXACT input phrase must exist in the directory / month specific directory in
    # order for the routine to perform substitution and randomization functions.
    
    
    # Initialize variables
    
    #  Input string to be spoken
    my $announce_string         = $_[0];
    my $audio_path              = $_[1];
    
    
    my $announcement_log = "/var/www/cgi-bin/dat/Crystal_announcement_log.dat";
    
    my $announcement_lock_file  = "/var/www/cgi-bin/dat/Crystal_announcement_lock.dat";
    
    my $result = "";
    
    my @announce_elements = "";
    
    my $element_count = 0;
    
    my $file_count = 0;
    
    my $random = 0;
    
    my $speak_path = "";
    my $speak_string = "";
    
    #  Populate hash of current date / time values
    my $current_time_ref = get_current_time_hash();
    my %current_time = %$current_time_ref;
    
    my $DEBUG = 0;
    
    
    print "In routine speak.\n\n";
    
    if ($audio_path eq "")
        {
        $audio_path = "/var/www/audio/";
        print "Default audio path used: $audio_path\n\n";    
        }
    
    my ($home_status, $pending_announcements, $num_doorbell, $num_cid, $num_reminders) = get_home_away_status();
    
    $announce_string = format_string_for_speak($announce_string, $audio_path);
    
    # Split input string into individual words / phrases for processing
    @announce_elements = split " ",$announce_string;
    
    $element_count = scalar @announce_elements;
    
    #    Debug
          print "\$announce string: $announce_string\n\n"                            if ($DEBUG == 1);
          print "\$element_count: $element_count\n\n"                                if ($DEBUG == 1);
    
    
    # Loop over elements for replacement / randomization
    
    for my $temp_element (0...$element_count-1)
        {
        
        $file_count = 0;
    
        # Break element into a fully qualified path and word / phrase    
        my     $temp_path = $announce_elements[$temp_element];
            $temp_path =~ s/[_-\w]+.mp3//;
        
        my     $temp_word = $announce_elements[$temp_element];
            $temp_word =~ s/$temp_path//;
    
    #      Debug    
        print "\t\$announce_elements[$temp_element]: $announce_elements[$temp_element]\t\t$temp_path\t\t$temp_word\n\n"    if ($DEBUG == 1);
        
        
        if ($temp_word ne "")
            {
        
            # Check to see if input word / phrase is present in the current month directory
        
            my    $test_path = $temp_path . "$current_time{month}/";
            my    $test_file = $test_path.$temp_word;
        
            #    Debug
            print "\t\t\$test_path: *$test_path*\n\n"                                    if ($DEBUG == 1);
            print "\t\t\$test_file: *$test_file*\n\n"                                    if ($DEBUG == 1);
    
            my     $test_word = $temp_word;
                $test_word =~ s/.mp3//;    
        
            #    Debug        
            print "\t\t\$test_word: *$test_word*\n\n"                                    if ($DEBUG == 1);
    
    
            #    Input word / phrase IS in the month directory - update path for this word / phrase
            if (-e $test_file)
                {
                print "\t\tFound $temp_word in $test_path\n\n"                            if ($DEBUG == 1);
            
                $speak_path = $test_path;
                }
    
            #    Input word / phrase is NOT in the month directory.  Use input path.        
            else
                {
                $speak_path = $temp_path;
                }    
            
            
            #    Identify all "equivalent" files in the directory for randomization (i.e. file_xx.mp3)    
    
            opendir (DIR, $speak_path) or die "Cannot open directory: $!";
    
            my @files = grep m/^$test_word(_\d)?\.mp3/ && ! m/^\./ && ! /config_file/, readdir DIR; # skip hidden files and config files    
    
            closedir(DIR);
    
            #    How many equivalent files were found    
            $file_count = @files;
        
        
            #    Debug    
            print "\t\t\$file_count: $file_count\n\n"                                    if ($DEBUG == 1);
            
            for my $temp_file (0...$file_count-1)
                {
                print "\t\t\$files[$temp_file]: $files[$temp_file]\n\n"                    if ($DEBUG == 1);                
                }
    
            #    Select a file at random from the equivalent file list        
            $random = int(rand($file_count));
        
            #     Debug
            print "\t\t\$random: $random\n\n"                                            if ($DEBUG == 1);
            
            #    Final fully qualified file to speak        
            $speak_string .= $speak_path.$files[$random]." ";
            
            }
    
        }
    
    #    Debug
    print "\$speak_string: $speak_string\n\n"                                            if ($DEBUG == 1);
    
    my $repeat_string = $speak_string;
    $repeat_string =~ s/ /*/g;
    
    print "<a href=http://192.168.66.77/cgi-bin/Crystal.pl?request_source=repeat&parm_1=$repeat_string>REPEAT</a>\n\n";
    
    
    # If house is occupied, log and make announcement
    if ($home_status =~ /home/)
        {
    
        print "HOME\n\n"                                                                if ($DEBUG == 1);
    
        output_announcement("ANNOUNCED: $speak_string", $announcement_log);
    
        # Lock file prevents overlapping phrases being spoken
    
    
        print "\tOpening LOCKFILE...\n"                                                    if ($DEBUG == 1);
        open LOCKFILE, ">>$announcement_lock_file" or die $!;
    
        print "\tflocking LOCKFILE...\n"                                                if ($DEBUG == 1);
        flock(LOCKFILE, 2);
    
        # Speak the modified input phrase
        
        print "\tmplayer call...\n"                                                        if ($DEBUG == 1);
        $result = `/usr/bin/mplayer -noconfig all $speak_string`;
    
        # Unlock for next phrase
        print "\tclosing LOCKFILE...\n"                                                    if ($DEBUG == 1);
        close LOCKFILE;
    
        print "\tDone HOME.\n\n"                                                        if ($DEBUG == 1);
    
        }
    
    # If house is not occupied, just log announcement
    if ($home_status =~ /away/)
        {
        
        print "AWAY\n\n"                                                                if ($DEBUG == 1);
        
        output_announcement("-ANNOUNCED: $speak_string", $announcement_log);
        }
    
    print "RETURNING result.\n\n"                                                        if ($DEBUG == 1);
    return ($result)
    
    }
    
    
    #---------------------------------------------------------------------------------
    
    
    
    sub format_string_for_speak
    
    {
    
    ################################################################################
    #
    #
    #      Routine accepts inputs:
    #
    #        in_string    -    A string of mp3 words available on the speak
    #                    server
    #
    #        in_audio_path    -    The path to audio files on the speak server
    #
    #
    #    Routine outputs:
    #
    #        speak_string    -    Modified in_string with audio path and .mp3
    #                    suffix appended to each word.  
    #                    Ready for speaking with speak routine.
    #
    ################################################################################
    
    
    my $in_string         = $_[0];
    my $in_audio_path    = $_[1];
    
    
    print "\nEntering routine format_string_for_speak...\n\n";
    
    # Default audio_path if not specified.
    if ($in_audio_path eq "")
        {
        $in_audio_path = "/var/www/audio/";
        print "\tDefault audio path used: $in_audio_path\n\n";
        }
    
    my $speak_string = $in_string;
    
    chomp $speak_string;
    
    $speak_string =~ s/ $//;
    
    $speak_string =~ s/$in_audio_path//g;
    
    $speak_string =~ s/.mp3//g;
    
    $speak_string = $in_audio_path . $speak_string;
    
    $speak_string =~ s/ /.mp3 $in_audio_path/g;
    
    $speak_string .= ".mp3";
    
    
    return ($speak_string);
    
    }
    
    
    #---------------------------------------------------------------------------------
    
  12. In the spirit of things to do once you get your system talking, the program I wrote to do the announcements has a couple of neat features:

     

    1.  It checks for "seasonal" replacement words / sounds and makes the appropriate replacements.  I do this by placing "duplicate" sounds in numbered (1-12) directory folders.  If the word / phrase exists in the current month's folder, a replacement is automatically made.

     

    2.  It allows for randomization by including multiple variances of the same word / phrase appended by -#.  For example "Hello-1.mp3" says "Hello."  "Hello-2.mp3" says "Hi".  "Hello-3.mp3" says "Greetings".  If numbered versions of a word or phrase exist in the audio folder (or month folder), one will be selected at random from those available.

     

    Here are some example voice announcement functions that I have set up:

     

    Announce exterior lighting turn on / off at sunrise and sunset (with time)

     

    Announce arrival of mail and mailbox accesses

     

    Announce visitor approaching

     

    Announce me / wife arriving if the other is home

     

    Welcome me / wife home when system disarmed

     

    Wish me / wife a happy birthday (with a song included).

     

    Announce count and times of doorbell rings when we were away

     

    Announce count, times, and callers of missed calls when we were away

     

    Announce completion of the dryer cycle

     

    Announce time and / or temperature when requested

     

    Announce all door / window opens and closings (ELK integration)

     

    Announce ELK ARM / DISARM / mode (ELK integration)

     

    Announce any ELK troubles (low battery, etc.)

     

    Announce reminder every 40 days to change the furnace filters (manually reset when I change them)

     

    Announce reminder to take out the trash on Tuesday nights

     

    Announce notification of any exterior motion lights triggering

     

    Announce reminders about Washington Capitals game and start times as leaving

     

    Announce score updates for Washington Capitals games

     

    Announce garage door openings and closings

    • Like 1
  13. Problem solved!

     

    With a bit of searching, I found a really old thread from someone having a similar issue a long time ago.

     

    I, like them, was trying to use the "Manually Update Firmware" option under help to load my back-up file.

     

    Once I selected the correct option to "Restore ISY" under the File tab, all was (is) well!

  14. On Thursday, my ISY-994i failed to come back up after a power failure.

    I called technical support, and was told that the filesystem had become corrupted. They recommended that I get and install a new SD card, which I have done.

    At this time, I am unable to get the unit to accept a restore of firmware. Both the ISY and Admin panel show version 5.0.4 in the "About" tab.

    When I try to restore my 5.0.4 back-up, I get a pop-up that says "Upgrade Failed :Invalid or incompatible upgrade file".
    I also received a pop up when I first logged in to the ISY that said"Could not open file [/CONF/ELKXPRT.XML] and [/CONF/PORTALS.PSF]"

    At this point, I am stuck without a functional ISY.

     

    With phone Tech Support, gone for the week-end, I'm hoping for an expert here with knowledge if this issue.

     

    Thanks!

×
×
  • Create New...