Release FHEM/CCU Home Cinema Service Addon
#1
Image
(Plugin logo is under copyright by bytefeed.com)

FHEM is a GPL licensed perl server for house automation. It is used to automate some common tasks in the household like switching lamps, shutters, heating, etc. and to log events like temperature, humidity or power consumption. The program runs as a server, you can control it via web or smartphone front- ends, telnet or TCP/IP directly.

Homematic CCU is a central unit for house automation build by the company eQ-3.

Features
This service allows to send commands to FHEM or Homematic CCU on specific player actions in order to create a cinema like atmosphere at home. The user can configure commands to send to FHEM on various player events:
 
  • On XBMC Start
  • On XBMC Shutdown
  • On Video Playback Start
  • On Video Playback Pause
  • On Video Playback Stop
  • On Audio Playback Start
  • On Audio Playback Pause
  • On Audio Playback Stop

Optional daytime support (only FHEM) allows to specify an alternative set of commands to use during daylight hours.

Prerequisites
For FHEM you need a working installation and knowledge about the commands to send in order to get the desired results.

How to use the addon
You can install the addon by selecting it from the video addons in the official XBMC repository.

The addon communicates with FHEM using the telnet command line interface on port 7072 by default. If you have configured the telnet interface on a different port, you should adapt the port number in the addon configuration page, where you can also specify all commands you want to be issued on player actions. If the telnet inteface is not enabled in your FHEM configuration, you should add the following lines to your FHEM configuration file and restart FHEM:
Code:
define telnetPort telnet 7072 global

If you are using this addon with an Homematic CCU you need a system variable with a value list
Code:
Unknown;Start;Shutdown;Audio playback start;Video playback start;Audio playback stop;Video playback stop;Audio playback pause;Video playback pause

Image


Have fun!

Development
GitHub Project Page
GitHub Clone URL

Change Log

0.3.3
- Fixed broken settings (Closes #4)
- Adapted to new language system

0.3.2
- Added italian translation to new delaying option

0.3.1
- Added option for delaying the Video/Audio stopped command

0.3.0
- Added copyright notice of the plugin logo (The plugin logo is under copyright by bytefeed.com)

0.2.0
- Added support for Homematic CCU

0.1.2
- Compliance fixes for the official repository

0.1.1
- Compliance fixes for the official repository

0.1
- Initial version

License
  • This software is released under the GPL 2.0 license.
  • The plugin logo is under copyright by bytefeed.com. Thank you for the kind permission of use!

Download
The addon is distributed in the official XBMC addon repository. If you want to get the latest version earlier, you can also install my dedicated repository, since usually it takes a few days before the update is included into the official repository: The YeaSoft Repository
Reply
#2
I've tried, but it does not seem to work.

I'm using port 8083 and using the command from FHEM's commandref to turn on/Off lights, but it does nothing.
Something like "set switch1 on".

Can you suggest me where to look to solve the problem?

Thanks
Reply
#3
Since you are using the Port 8083, I suppose that you are trying to send the commands to the port on which FHEM offers the web interface. This is wrong. The commands must be sent to the port where FHEM offers the telnet commandline interface, and this is generally 7072.

You can check it in the FHEM configuration file. Search for the following configuration part:

Code:
define telnetPort telnet 7072 global

If you have not defined a telnet port in your FHEM installation, you should add it to the configuration and restart FHEM. I added this information also to the initial post.
Reply
#4
Now it works. Thanks for your support :-)
Reply
#5
Bought a fs20 di5 dimmer and checked this addon out. This sir works great Smile - Thx - i have a cinema light now...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
I just stumbled over this and I plan to do this for my home as well. Nice, that there is already a plugin for that!!!!

Does it still works under Kodi?
Reply
#7
sure
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
Thanks Wink
Reply
#9
Is there a plan to add password support for this plugin?
I am using FHEM's telnet port with password-protection and SSL. With this configuration this plugin does not work. There's no possibility to provide a password, or did I miss something?
Reply
#10
Hi, could you add a option if a 3d movie is playing?
Reply
#11
I'm using XBMC 13.2 on a Zotac PC.

I tried to connect XBMC with my Homematic CCU2, but is doesn't work.

My XBMC Settings:
CCU
Host: 192.168.4.5
variable: XBMC

My CCU Settings
Name: XBMC
value list: Unknown;Start;Shutdown;Audio playback start;Video playback start;Audio playback stop;Video playback stop;Audio playback pause;Video playback pause

The firewall of Winows 7 ist complete turned off.

Maybe someone can help me. THX
Reply
#12
Very useful Script for my homematic system.

My Problem is, sometimes on startup the script crashed.

01:01:17 T:140502523434752 NOTICE: 'POST /test.exe HTTP/1.1\r\nHost: 192.168.1.80:8181\r\nAccept-Encoding: identity\r\nContent-Length: 36\r\n\r\nv1=dom.GetObject("KODI").State("1");'
01:01:17 T:140502523434752 NOTICE: reply:
01:01:17 T:140502523434752 NOTICE: ''
01:01:22 T:140502523434752 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'httplib.BadStatusLine'>
Error Contents: ''
Traceback (most recent call last):
File "/home/kodi/.kodi/addons/service.fhemcinema/addon.py", line 170, in <module>
handler.StartUp()
File "/home/kodi/.kodi/addons/service.fhemcinema/addon.py", line 130, in StartUp
self.SendCommand('onstartup')
File "/home/kodi/.kodi/addons/service.fhemcinema/addon.py", line 71, in SendCommand
self.SendCCU(command)
File "/home/kodi/.kodi/addons/service.fhemcinema/addon.py", line 113, in SendCCU
response = connection.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1051, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 415, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 379, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
-->End of Python script error report<--
Reply
#13
While my settings were not running too, so I have made some tests (rPi whith Kodi and CCU2). Here the results: You cannot use an IP as CCU-host, use the host's name instead.
It would be nice someone could fix this - or at least place an hint in the documentation.

Im not familiar with python. Here the line of addon.py where it fails:
Code:
connection = httplib.HTTPConnection(hostname,8181,timeout=10)

THX

Felix
Reply
#14
Hey everyone, I just started with FHEM an I have a backlight working on FHEM. Is there a step by step tutorial for this App I didn't understand what I have to do in FHEM / Kodi...

Kodi runs on an Rasperry Pi an FHEM runs on another Pi
Reply
#15
Perl!

/And here I thought my Python coding for MQTT to do the same was archaic.
Reply

Logout Mark Read Team Forum Stats Members Help
FHEM/CCU Home Cinema Service Addon0