angelnu / docker-ccu

Script to create a docker container with the CCU2 firmware
Apache License 2.0
32 stars 13 forks source link

Homematic IP Support #3

Closed marbon87 closed 5 years ago

marbon87 commented 7 years ago

Hi,

do you know if the homematic-ip support is fully working? I don't have any device yet, but i am planning to buy some.

Regards, marbon87

angelnu commented 7 years ago

Using Homematic IP requires running an special kernel module to drive the communication with the antenna. Since a Docker container uses the kernel of the host we would have to add the module there. Since I do not have any Homematic IP device I have no way to test that.

If you use the Homematic LAN adapter then it would likely work but again: I cannot test.

If anyone has a Homematic IP device and it is willing to test, please let me know.

angelnu commented 7 years ago

I found more info (German) here It does not look as complicated as I thought.

So maybe next time I order something from ELV I will get a Homematic IP to give it a try.

marbon87 commented 7 years ago

Ok, good to know. Then i will wait until you tried one :)

angelnu commented 7 years ago

I was taking a look today morning and it is not so simple: it needs a special raw serial port device driver that is different for each Hardware. The post I refered before include instructions for the Raspberry. I use an orangepi 2 plus so I would need a diferent device driver.

So for the Raspberry should be easy but for other HW no so easy. Since I do not see any Homematic IP device with unique functionality I do not feel like doing the work.

If anyone feels like trying I would be happy to take pull requests.

Munsio commented 7 years ago

Hi i'm looking forward to test an hmIP device with your docker image on an RP3 today and i just wanna know if I have to follow the instruction and it would work or do i need to map something into the docker container to bring it to work?

angelnu commented 7 years ago

hmIP will not work at least that you have the special serial device in your board.

The kernel driver is here: https://github.com/eq-3/occu/tree/master/KernelDrivers

The sources provides by eq-3 should work for Raspberries but since I have another board (oragenpi 2 plus) and no hmIP device I will not be able to add this support myself.

omo2002 commented 7 years ago

is there any news on the hmIP topic ? I could support, but like others, I need some guidance.

Munsio commented 7 years ago

Not from my side sry - switched to raspberryMatic on an own PI 1 Model B cause i din't get rfd to run inside docker

angelnu commented 7 years ago

I started porting the special CCU2 device driver for the Raspberry serial port to work my OrangePI. It will still take several weekends. I uploaded the sources to an extra repo since I think I am the first one adapting it to other HW on the open so maybe other people want to join and add support for their own HW.

For Raspi users they can use the working device driver from the RaspberryMatic. Steps (in theory):

  1. Write a DTS overlay to avoid that the default driver is used for the UART. You can see how I did this for the Orange PI on my repo.
  2. build and load the bcm2835_raw_uart and eq3_char_loop on your Raspi
  3. change the config for rfd to use the new devices
  4. start the docker container in priviledge mode so it has access to the new /dev modules
  5. HM IP devices should work
omo2002 commented 7 years ago

hm, did not try yet, but this makes me frown: "start the docker container in priviledge mode so it has access to the new /dev modules"

I did this previously, it made my raspi stop working, I had to poweroff/on.

angelnu commented 7 years ago

You can also share only the serial devices. It has been a while since I do not run with privilege since I use docker swarm so maybe something in the CCU tries to do something it should not which is prevented by docker.

angelnu commented 7 years ago

In the ELV magazine they show that in the new issue they will add an Homematic IP adapter as USB stick. This will remove the dependency on the special kernel module. ELV explicitly mention this adapter as a way to support docker :-)

As soon as it becomes available I will get one and add support for it in my docker image.

omo2002 commented 6 years ago

product is available now: https://www.elv.de/elv-homematic-ip-rf-usb-stick-hmip-rfusb-fuer-alternative-steuerungsplattformen-arr-bausatz.html?refid=SEM_30003&gclid=CjwKCAiAxJPVBRB4EiwAsCA4aU0gHqSAEM6XmtlxtF7R0xAjCPVgF_EbJZ8tV-qBaNit73Z1MsZAgRoCyfEQAvD_BwE

But functionality seams to be not as expected.

Moreover I saw an interesting conversation at https://github.com/eq-3/occu/issues/33. They succeeded in creating the kernel module. Tough stuff ...

angelnu commented 6 years ago

@omo2002 - yes, I was disappointed to find out that the USB stick only support Homematic IP but not the old Homematic :-(

Since I have no Homematic IP devices (beyond one I bought to try it) I have not a huge interest on it.

I have also switched to more powerful ARM devices (http://www.hardkernel.com/main/products/prdt_info.php?g_code=G150229074080) so I have no GPIO anymore. For the time being I use a Homematic LAN gateway. I intended to switch to the USB stick. Since this does not work I am thinking about attaching the HM-MOD-RPI-PCB to an USB-Serial converter so it is platform independent. It is this or reversing engeniering the Homemtic USB stick...

A project for the next vacations...

Thanks for the link!

angelnu commented 5 years ago

I just added Homematic IP support based on Alex´s pivccu . He did all the heavy-lifting to adapt the UART device drivers to multiple ARM platforms.

This a mayor upgrade since I also added support for the CCU3. I have deployed in my home Kubernetes based on OdroidXU4s but I also tested in my "old" Orange Pi Plus 2 with the HM-MOD-RPI-PCB. In both cases I am able to access Homematic and Homematic IP devices.

Please open issues if something does not work for you.