README 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ****** VoIP2FHEM or HOWTO control the FHEM with Asterisk ******
  2. Description
  3. * This is a HOWTO about the use of a VoIP-DECT-Telephone as a remote
  4. controller for the FHEM-Devices.
  5. The provided scripts are under the GPL.
  6. The Goal is
  7. -- Switching the FS20-Devices
  8. -- text2speach, the Telephone reads e.g. the measured-temp
  9. -- Possibility to start scripts with the Remote Telephone
  10. -- AND EVERYTHING MUST RUN ON THE NSLU2 :-)
  11. Technical Overview
  12. * On the NLSU2 (or every other Linux Box) runs an Asterisk. This machine
  13. must not be the machine with the FHEM. I bought the Voip-DECT-Telephone
  14. Siemens Gigaset C470 IP (80.-EUR). It has a nice Webinterface and it is
  15. possible to read in a self made telephone book.
  16. The Asterisk calls depending on the dialed number a bash skript. After
  17. that Asterisk plays two soundfiles < text >< value > in a loop.
  18. The NSLU2 is a weak machine. It always only creates a soundfile 1x and
  19. then stores it on the harddisk. A set of prebuild voices (e.g. digits
  20. from -20 to 90) are included. Some scripts for creating soundfiles and
  21. automatically the telephone book are provided too.
  22. Installation
  23. * Go to http://fhem.dnsalias.net/voip2fhem and download the files.
  24. -- Install with your package manager asterisk, sox, espeak. On the NLSU2:
  25. "apt-get install asterisk sox espeak".
  26. -- Debian: activate asterisk in the /etc/default/asterisk
  27. -- copy the scripts voip2fhem voip2fhem_create_telefonlist
  28. voip2fhem_create_txt2gsm to /usr/local/bin/ and be shure that they are
  29. executable (chmod +x /usr/local/bin/voip2fhem*)
  30. -- You can find on http://fhem.dnsalias.net/voip2fhem prepared voices:
  31. "tar -xvzf voip2fhem_voices.tar.gz -C /" and give the correct rights
  32. "chown -R asterisk.asterisk /var/tmp/voip2fhem"
  33. -- cp extensions.conf and sip.conf to /etc/asterisk/ and edit these files
  34. and the bash script /usr/local/bin/voip2fhem
  35. -- restart/reload asterisk (/etc/init.d/asterisk restart or asterisk -
  36. r and then "extensions reload" and "sip reload")
  37. Hints
  38. * -- if there isn't the required soundfile then the NSLU2 creates it. This
  39. needs minutes (example: the word "asterisk" needs 3 min). voip2fhem
  40. stores this file and the next time it will be used.
  41. -- Use the script voip2fhem_create_txt2gsm on a faster machine to create
  42. the sounds. Usage: voip2fhem_create_txt2gsm "I love FHEM". The soundfile
  43. is then automatically copied to /var/tmp/voip2fhem/
  44. -- it is also possible to connect the ASTERISK with the rest of the world
  45. (e.g. Sipgate, 1und1) :-)
  46. -- for debug asterisk: "asterisk -r", "sip debug"
  47. Have fun and success :-)
  48. Martin Haas
  49. fhem@martin-haas.de