Jump to content

Me and my Raspberry Pi


barrygordon

Recommended Posts

Posted

As many of you know my main hobby is Home Automation. I have been slowly setting up Raspberry Pi's to take over what was being done on rack mounted computers in my "server room".

 

My latest Raspberry Pi project is making announcements throughout the house. The house has six announcement zones, each with an in ceiling speaker and a small ELK 10 watt amplifier driving each speaker.  Each ELK connects to its speaker through a relay. The relays are IP controlled and are on a wall mounted PC board. Each relay can be controlled over http 1.1 using simple commands.

 

The TTS functionality is done using the Google cloud service (free for now) and Ivona voices. The Ivona voices are some of the best sounding.  I have seven them loaded on the Pi, 4 females and 3 males.

 

Basically you send a JSON formatted command to the Pi. The Pi will connect the appropriate relays, get the speech synthesis completed speak, what is required and then disconnect all the speakers. Response of the voice synthesis is very good, 1-2 seconds. 

 

A command sequence allows for a volume to be set, the rooms to be used stated, an opening sound (e.g. a chime note)  and finally the text to be spoken.  Here are two examples:

 

{"volume":"normal", "rooms":["office", "guest"], "sound":"2Note.wav", "text":"now is the time for all men to come to the aid of their party and then go home"}.

 

{"volume":"normal", "rooms":["all"], "sound":"2Note.wav", "text":"someone is at the front door"}.   

 

The Pi is a Pi 3 running Raspbian Jessie. This Pi also runs my personal AWS skill and handles, as a proxy, receiving network commands from the ISY and sending them to various external systems that may require complex communications as opposed to a simple TCP/IP command. It handles IR for all devices in my home that need it using a Global Cache GC 100 to send the actual IR. For IR, the command looks like DOIR <GC port>, <IR file ID>,  <IR command name> which the ISY has no trouble sending.  The proxy handles all the nuances of Global Cache communications.

 

If you are interested  in more details PM me and we can start a private eMail dialog.

 

It runs headless (no display no keyboard) mounted on the wall in the server room. All of my Pi devices run tightvncserver to allow full remote control. I do all my programming in Javascript (Node.js). Development and testing is done in Visual Studio 2015 on a Windows 10 system. All I do is copy over the changed js modules and the Pi takes care of all the rest (When it sees a change in a module, the "JSON ini file" or the IR device library, it waits 10 seconds Stops the Proxy,  and then restarts it.

  • 2 weeks later...
Posted

Unfortunately I am single. My late wife passed away in 2001 of cancer.  They really ought to cure that!!! 

Jill, my late wife, was very supportive of my HA and HT hobbies, as long as I was supportive of hers. She never let me do anything ridiculous. I once asked her if I could Speakers in the ceiling of each room and her reply was, "Sure nobody looks up"

 

Back to the Pi. All is working well.  I am setting up to move all of the input sources from the computer running Homeseer that services them to the Pi. I will be using a new Denkovi IP device that handles 32 inputs (16 digital, 8 analog and 8 temperature). My relay board is also by Denkovi. They use the same protocol for both boards on the IP side and handle snmp in addition to IP for asynchronous notifications (SNMP traps).  the inputs will take care of things like garage door openers.

 

The last task will be handling the security system which is kind of old (18 years) and runs using RS232.  I will probably buy a new one that runs over IP; ELK is the prime candidate.

 

My garage door openers and the house doorbell all act as inputs to the house control system. The garage door openers are Homelink mirror or visor units in the cars dealing with a Lutron Radio RA receiver which provides contact closures. The house control system then determines the actions to be taken. For example when I return home and press the appropriate button on the mirror, the house is disarmed, the correct garage door is opened, and a trigger is set to announce any messages (e.g. phone calls) as soon as a an occupancy sensor sees me in the house. 

 

More to come as time progresses.

  • 2 weeks later...
Posted

Well I finally worked out all the speech bugs. The Pi sits quietly on the wall waiting for a message (raw TCP) from any computer in the house including the ISY.  

The message states the following in JSON format:

    The volume to be used

    The rooms to play the sounds in or a 'room scene' which is a set of rooms, or any combination of the two item classes

    A sound to play prior to speaking the text message (a simple wave file)

    A text string to speak using the current voice (there are 7 voices, 4 female and 3 male)

A sample message looks like:

{"volume":"normal", "rooms":["Office", "Master"], "sound":"doorbell.wav", "text":"Someone is at the front door"}

 

The sound is always played first and is optional. The text is converted (Text To Speech (TTS) by Google as a free cloud service.

The mp3 file returned by google is cached so if the same speech fragment occurs again the TTS operation can be skipped. 

 

The Google TTS service is very robust and handles things like time, compass directions, cardinal numbers, ordinal numbers, real numbers, fractions, currency, dates, and others,

The service also handles certain punctuation characters such as:

comma (,)      short pause

period(.)         longer pause

?^                  question with rising intonation

?_                  question with falling intonation

 

The Google response is very satisfactory, and once a speech phrase is cached google is out of the loop.

The app maintains a set of wav files for sounds to make referencing them easy, but there is no reason why they could not be read from anyplace on the network.

 

My ISY can now issue verbal messages with no problem

 

The equipment I used  for this capability is as follows:

    Raspberry PI 3 B with 16GB micros SD card running Raspbian Jessie  (~$40)

    Denkovi 16 relay IP based relay board (~$130) This sets which speakers are to get the sound. Relays are solid state SPST . The sell similar boards with 2, 4, 8 relays

    A Xantech 1x6 AV61 distribution amplifier providing 18 total outputs (~$91) 

    ELK-800 10 W amplifiers to provide individual volume control to each rooms speaker (~$47). Note: There are small class D 10W audio amps available for around $10-$15)

 

I could have gone with a single amplifier but the ELK-800 were not that expensive, and I wanted the flexibility of the individual volume controls

I have a test routine written in VB.net that drives the PI for TTS testing and evaluation.

 

Interested parties can contact me directly at my email address in my profile. I will provide copies of the Test routine and the code for the Proxy. The proxy code is all written in nodeJS.  I can also provide the Pi system on a 16G micro SD that you provide with a SASE to get it back to you. All of the development work has been done in visual studio 2015

Posted

This is awesome.  I may have to get into this this winter.  I will be keeping an eye on this thread.

 

-Xathros

Posted

I just placed on my web site (the-gordons.net) the documentation for my Raspberry Pi system. It should not be hard to find.  The document (MS word .docx) describes the functionality and operation of the system. Feel free to download it (32KB Zip archive).  It does not describe how to set up the Raspberry Pi from scratch, but does clarify which additional modules are needed beyond the standard Raspbian Jessie. I have only run it on a RPi model 3, but it should work equally well on a model 2.

 

Feedback appreciated. 

  • 2 weeks later...
Posted

I just placed on my web site (the-gordons.net) the documentation for my Raspberry Pi system. It should not be hard to find.  The document (MS word .docx) describes the functionality and operation of the system. Feel free to download it (32KB Zip archive).  It does not describe how to set up the Raspberry Pi from scratch, but does clarify which additional modules are needed beyond the standard Raspbian Jessie. I have only run it on a RPi model 3, but it should work equally well on a model 2.

 

Feedback appreciated. 

Hi Barry,

 

    Love all your posts and work.  Big fan.

 

    I am experimenting the RPi as well.  Trying out a few libraries for node.js platform.  Pretty fun.  I managed to get Amazon Dash as a super cheap remote toggle switch for my lights to work.  It has also been running 24x7 without any down time.  So I agree that RPi is the way to go. :)

 

   For some reasons, I can't find your word documentation for the RPi when I go to your downloads page.  Do you have the exact url?

Posted

Go to my web site (the-gordons.net) bottom of the main page follow link to downloads, documents and programs. On that page go to the section titled Home Automation (Homeseer). The last item in that section is AWS_Proxy system Documentation. The only thing it is missing right now the documentation for callerID functionality and digital/temperature inputs.  the digital inputs handle contact closures using a Denkovi Digital IO board that sits on the LAN.  the CallerID system has an RS232 interface (it is old) so it interfaces to the RP i via a global cache IP2Serial iTach. I am slowly migrating to an all IP based HA world eliminating older RS232 products.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...