HomeMatic OCCU Hardware Issue

Hi Johnny,

exactly - I´m running a RPi3 as RaspberryMatic, that is functioning as gateway for my Home Assistant installation, that is currently running on a homebrew NAS. I´m planning/hoping to shift this setup towards the hass.io thing, as it would save me the separate RPi while allowing BLE/BT integrations (that I can´t use with my FreeNAS setup).

For me the concept of using docker containerised functions with resinos is a pure wow.

Unfortunately @pvizeli seems to have too few spare time, getting the OCCU container in production ready condition. Don´t get me wrong - I´m really appreciating pvizeli´s work - he´s got only the reputation and thanks, “to get paid” for his effort :slight_smile:

So if your willing to start soon, I´d recommend starting with the RaspberryMatic setup and watching this topic. I have a spare RPi3 und HM-MOD-RPI-PCB only to evaluate the containerized OCCU setup. If there´d be progress, I´d let you know :slight_smile:. One thing, that you´d have to keep in mind, is that you´d need to re-pair your HomeMatic to the OCCU-Style gateway - thats more or less a complete re-implemation of you HomeMatic network.

Jakob

Hey guys. Is there any progress on this one? I get the same errors as @jakob.tewes.

when I run “hassio hw info” I get /dev/ttyAMA0 and /dev/ttyS0 shown. I also added the dtoverlay=pi3-miniuart-bt part to the config.txt.

same as @jakob.tewes I’m running the HM-MOD-RPI-PCB on a seperate Pi with RaspberryMatic and I’m looking forward on integrating that part to my Hass.IO Pi. If I can provide any help fixing this issue, just let me know :wink:

My config:

  "rf_enable": true,
  "rf": [
    {
      "type": "CCU2",
      "device": "/dev/ttyAMA0",
      "reset": true
    }
  ],
  "wired_enable": false,
  "wired": [
    {
      "serial": "xy",
      "key": "abc",
      "ip": "192.168.0.0"
    }
  ]

My logs during startup:

2018/10/07 16:44:06.661 <Info> BidCoS-Service started
2018/10/07 16:44:06.662 <Info> XmlRpc Server is listening on TCP port 2001
2018/10/07 16:44:06.666 <Debug> CCU2CommController::init() - Legacy initialization.
2018/10/07 16:44:06.702  RX SERIAL: fd 00 0c 00 00 00 43 6f 
2018/10/07 16:44:06.702  RX SERIAL: 5f 43 50 55 5f 42 4c 72 
2018/10/07 16:44:06.703  RX SERIAL: 51 
2018/10/07 16:44:06.703  RX FRAME: 00 00 00 43 6f 5f 43 50 55 5f 42 4c 
2018/10/07 16:44:06.703 <Debug> () CCU2CommController::handleIdentifyEvent(): Handling incoming identify event.
2018/10/07 16:44:06.703 <Debug> () CCU2CommController::handleIdentifyEvent(): Coprocessor entered bootloader. Starting application.
2018/10/07 16:44:06.703 <Debug> () CCU2CommController::startCoprocessorApp(): Trying to start coprocessor application
2018/10/07 16:44:07.206  CCU2CommController::startCoprocessorAppThreadFunction(): Send start command
2018/10/07 16:44:07.206  CCU2CommController::SendSystemCommdand()
2018/10/07 16:44:07.206  CCU2CommController::SendSystemCommdand() sending: fd 00 03 00 00 03 18 0a 
2018/10/07 16:44:07.737  RX SERIAL: fd 00 04 00 00 04 01 99 
2018/10/07 16:44:07.737  RX SERIAL: 3d 
2018/10/07 16:44:07.737  RX FRAME: 00 00 04 01 
2018/10/07 16:44:07.775  RX SERIAL: fd 00 10 fe 01 00 44 75 
2018/10/07 16:44:07.776  RX SERIAL: 61 6c 43 6f 50 72 6f 5f 
2018/10/07 16:44:07.777  RX SERIAL: 41 70 70 b7 36 
2018/10/07 16:44:07.778  RX FRAME: fe 01 00 44 75 61 6c 43 6f 50 72 6f 5f 41 70 70 
2018/10/07 16:44:07.778  CCU2CoprocessorCommand::CCU2CoprocessorCommand(): Unknown command type: fe  (hex).
2018/10/07 16:44:07.778 <Debug> () CCU2CommController::handleIncomingSerialFrame(): Command not parseable.
2018/10/07 16:44:11.669 <Debug> () CCU2CommController::startCoprocessorApp(): Trying to start coprocessor application
2018/10/07 16:44:12.170  CCU2CommController::startCoprocessorAppThreadFunction(): Send start command
2018/10/07 16:44:12.170  CCU2CommController::SendSystemCommdand()
2018/10/07 16:44:12.170  CCU2CommController::SendSystemCommdand() sending: fd 00 03 00 01 03 9e 09 
2018/10/07 16:44:12.173  RX SERIAL: fd 00 02 ff 01 82 05 
2018/10/07 16:44:12.173  RX FRAME: ff 01 
2018/10/07 16:44:12.173  CCU2CoprocessorCommand::CCU2CoprocessorCommand(): Message too small: 2 bytes.
2018/10/07 16:44:12.173 <Debug> () CCU2CommController::handleIncomingSerialFrame(): Command not parseable.
2018/10/07 16:44:13.171 <Debug> () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/10/07 16:44:15.171  CCU2CommController::startCoprocessorAppThreadFunction(): Retrying to send start command
2018/10/07 16:44:15.171  CCU2CommController::startCoprocessorAppThreadFunction(): Send start command
2018/10/07 16:44:15.171  CCU2CommController::SendSystemCommdand()
2018/10/07 16:44:15.171  CCU2CommController::SendSystemCommdand() sending: fd 00 03 00 02 03 94 09 
2018/10/07 16:44:15.174  RX SERIAL: fd 00 02 ff 02 82 0f 
2018/10/07 16:44:15.174  RX FRAME: ff 02 
2018/10/07 16:44:15.174  CCU2CoprocessorCommand::CCU2CoprocessorCommand(): Message too small: 2 bytes.
2018/10/07 16:44:15.174 <Debug> () CCU2CommController::handleIncomingSerialFrame(): Command not parseable.
2018/10/07 16:44:16.172 <Debug> () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/10/07 16:44:16.670 <Fatal error> CCU2CommController::init(): Init failed. Cannot start coprocessor application.
2018/10/07 16:44:16.671  CCU2CommController::SendSystemCommdand()
2018/10/07 16:44:16.671  CCU2CommController::SendSystemCommdand() sending: fd 00 04 00 03 0a 00 bd 07 
2018/10/07 16:44:16.675  RX SERIAL: fd 00 02 ff 03 02 0a 
2018/10/07 16:44:16.675  RX FRAME: ff 03 
2018/10/07 16:44:16.675  CCU2CoprocessorCommand::CCU2CoprocessorCommand(): Message too small: 2 bytes.
2018/10/07 16:44:16.675 <Debug> () CCU2CommController::handleIncomingSerialFrame(): Command not parseable.
2018/10/07 16:44:17.673 <Debug> () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/10/07 16:44:17.673 <Error> () CCU2CommController::setCSMACAEnabled(): Error disabling CSMA/CA.
2018/10/07 16:44:17.677 <Error> No BidCoS-Interface available
2018/10/07 16:44:17.677 <Warning> Error initializing interfaces

I had it working in resinOS and after switching to hassOS it isn’t working any more:

2018/10/17 00:26:57.834 <Info> BidCoS-Service started
2018/10/17 00:26:57.836 <Info> XmlRpc Server is listening on TCP port 2001
2018/10/17 00:26:57.838 <Debug> CCU2CommController::init() - Legacy initialization.
2018/10/17 00:27:02.840 <Debug> () CCU2CommController::startCoprocessorApp(): Trying to start coprocessor application
2018/10/17 00:27:03.340  CCU2CommController::startCoprocessorAppThreadFunction(): Send start command
2018/10/17 00:27:03.340  CCU2CommController::SendSystemCommdand()
2018/10/17 00:27:03.340  CCU2CommController::SendSystemCommdand() sending: fd 00 03 00 00 03 18 0a 
2018/10/17 00:27:04.341 <Debug> () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/10/17 00:27:06.342  CCU2CommController::startCoprocessorAppThreadFunction(): Retrying to send start command
2018/10/17 00:27:06.343  CCU2CommController::startCoprocessorAppThreadFunction(): Send start command
2018/10/17 00:27:06.344  CCU2CommController::SendSystemCommdand()
2018/10/17 00:27:06.345  CCU2CommController::SendSystemCommdand() sending: fd 00 03 00 01 03 9e 09 
2018/10/17 00:27:07.347 <Debug> () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/10/17 00:27:07.841 <Fatal error> CCU2CommController::init(): Init failed. Cannot start coprocessor application.
2018/10/17 00:27:07.842  CCU2CommController::SendSystemCommdand()
2018/10/17 00:27:07.843  CCU2CommController::SendSystemCommdand() sending: fd 00 04 00 02 0a 00 3d 10 
2018/10/17 00:27:08.846 <Debug> () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/10/17 00:27:08.847 <Error> () CCU2CommController::setCSMACAEnabled(): Error disabling CSMA/CA.
2018/10/17 00:27:08.849 <Error> No BidCoS-Interface available
2018/10/17 00:27:08.849 <Warning> Error initializing interfaces

Luckily I have a backup SD-Card running with the resinOS version (same hardware) and there it is working with the following output:

2018/10/17 00:37:23.927  (OEQ0302381) CCU2CommController::handleIncomingSerialFrame(): Got an bidcos msg. Response waiting --> Handling as response...
2018/10/17 00:37:48.203  RX SERIAL: fd 00 04 01 83 04 04 87 
2018/10/17 00:37:48.204  RX SERIAL: 1f 
2018/10/17 00:37:48.204  RX FRAME: 01 83 04 04 
2018/10/17 00:37:48.204 <Debug> (OEQ0302381) Response status: Send failed.
2018/10/17 00:37:48.204  (OEQ0302381) CCU2CommController::handleIncomingSerialFrame(): Got an bidcos msg. Response waiting --> Handling as response...
2018/10/17 00:37:48.204  (OEQ0302381) CCU2CommController::handleIncomingSerialFrame(): Response not ok
2018/10/17 00:37:48.204 <Debug> Event: LTK0123894:0.UNREACH=true
2018/10/17 00:37:48.205 <Debug> Event: LTK0123894:0.STICKY_UNREACH=true
2018/10/17 00:37:48.205 <Debug> HSSXmlRpcEventDispatcher::Handle send 1 events
2018/10/17 00:37:48.206 <Debug> SendFrame failed 1 times:  @2131175045 0x777777 -> 0x323577 CONFIG_STATUS_REQ [OEQ0302381]:
  CNT=9,RPTEN=1,RPTED=0,BIDI=1,BURST=0,WAKEUP=0,WAKEMEUP=0,BCAST=0,TYPE=0x01
  CONFIG_CHANNEL = 2
2018/10/17 00:37:48.206 <Error> RFPhysicalDataInterfaceCommand::GetData SendFrame failed for LEVEL_GET
2018/10/17 00:37:48.206 <Error> HSSParameter::GetValue() id=ENERGY_COUNTER failed getting physical value.
2018/10/17 00:37:48.218 <Debug> FREQUENCY age=2111 timestamp=2131174139
2018/10/17 00:37:48.218 <Debug> TX:  @2131176251 0x777777 -> 0x323AD5 CONFIG_STATUS_REQ [OEQ0302381]:
  CNT=109,RPTEN=1,RPTED=0,BIDI=1,BURST=0,WAKEUP=0,WAKEMEUP=0,BCAST=0,TYPE=0x01
  CONFIG_CHANNEL = 2
2018/10/17 00:37:48.218  CCU2CommController::sendBidcosMessage(): Using burstMode=0
2018/10/17 00:37:48.244 <Debug> HSSXmlRpcEventDispatcher::Handle send completed
2018/10/17 00:37:48.244 <Debug> HSSXmlRpcEventDispatcher::Handle send 1 events
2018/10/17 00:37:48.256 <Debug> HSSXmlRpcEventDispatcher::Handle send completed
2018/10/17 00:37:48.378  RX SERIAL: fd 00 04 01 84 04 02 07 
2018/10/17 00:37:48.379  RX SERIAL: 64 
2018/10/17 00:37:48.379  RX FRAME: 01 84 04 02 
2018/10/17 00:37:48.379 <Debug> (OEQ0302381) Response status: Telegram sent successfully.
2018/10/17 00:37:48.379  (OEQ0302381) CCU2CommController::handleIncomingSerialFrame(): Got an bidcos msg. Response waiting --> Handling as response...
2018/10/17 00:37:48.379  (OEQ0302381) CCU2CommController::handleIncomingSerialFrame(): Response ok
2018/10/17 00:37:48.384  RX SERIAL: fd 00 1a 01 2b 05 01 00 
2018/10/17 00:37:48.385  RX SERIAL: 43 6d a4 5f 32 3a d5 77 
2018/10/17 00:37:48.385  RX SERIAL: 77 77 80 a0 ba 00 03 f0 
2018/10/17 00:37:48.386  RX SERIAL: 00 51 08 fa ff b0 a4 
2018/10/17 00:37:48.386  RX FRAME: 01 2b 05 01 00 43 6d a4 5f 32 3a d5 77 77 77 80 a0 ba 00 03 f0 00 51 08 fa ff 
2018/10/17 00:37:48.386  (OEQ0302381) CCU2CommController::handleIncomingSerialFrame(): Handling event telegram as event.
2018/10/17 00:37:48.386 <Debug> Response accepted:  @2131176419 RSSI=-67dB 0x323AD5 -> 0x777777 Generic [OEQ0302381]:
  CNT=109,RPTEN=1,RPTED=0,BIDI=1,BURST=0,WAKEUP=0,WAKEMEUP=0,BCAST=1,TYPE=0x5F
  DATA = 80 A0 BA 00 03 F0 00 51 08 FA FF 
2018/10/17 00:37:48.387 <Debug> Event: LTK0123327:2.BOOT=true
2018/10/17 00:37:48.387 <Debug> Event: LTK0123327:2.ENERGY_COUNTER=4114.600000
2018/10/17 00:37:48.387 <Debug> Event: LTK0123327:2.POWER=10.080000
2018/10/17 00:37:48.387 <Debug> HSSXmlRpcEventDispatcher::Handle send 1 events
2018/10/17 00:37:48.387 <Debug> Event: LTK0123327:2.CURRENT=81.000000
2018/10/17 00:37:48.388 <Debug> Event: LTK0123327:2.VOLTAGE=229.800000
2018/10/17 00:37:48.388 <Debug> Event: LTK0123327:2.FREQUENCY=49.990000
2018/10/17 00:37:48.395 <Debug> ENERGY_COUNTER age=9 timestamp=2131176419
2018/10/17 00:37:48.429 <Debug> HSSXmlRpcEventDispatcher::Handle send completed
2018/10/17 00:37:48.429 <Debug> HSSXmlRpcEventDispatcher::Handle send 5 events
2018/10/17 00:37:48.579 <Debug> HSSXmlRpcEventDispatcher::Handle send completed
2018/10/17 00:38:53.883  RX SERIAL: fd 00 15 01 2c 05 00 00 
2018/10/17 00:38:53.884  RX SERIAL: 32 f4 86 10 56 84 56 00 
2018/10/17 00:38:53.885  RX SERIAL: 00 00 0a 88 e1 0d 00 00 
2018/10/17 00:38:53.885  RX SERIAL: 90 2d 
2018/10/17 00:38:53.886  RX FRAME: 01 2c 05 00 00 32 f4 86 10 56 84 56 00 00 00 0a 88 e1 0d 00 00 
2018/10/17 00:38:53.887  (OEQ0302381) CCU2CommController::handleIncomingSerialFrame(): Handling event telegram as event.
2018/10/17 00:38:53.888 <Debug> RX for OEQ0240004: @2131241920 RSSI=-50dB 0x568456 -> 0x000000 Generic [OEQ0302381]:
  CNT=116,RPTEN=1,RPTED=0,BIDI=0,BURST=0,WAKEUP=0,WAKEMEUP=1,BCAST=1,TYPE=0x10
  DATA = 0A 88 E1 0D 00 00

But I have no idea why it isn’t working any more!

Okay i got a fix for this solution. And this may also help @PixelJonas. You can add the dt-overlay at hassOS via the mounted /mnt/boot/config.json (this file is writeable, even in HassOS). After doing this, the homematic plugin startet well.

so you are setting dtoverlay=pi3-miniuart-bt in /mnt/boot/config.json? I will try that tomorrow

A brief description, of what you did would help :smile:

Did it work and what exactly does it put into which file at HASSIO? :slight_smile: I would like to use this with HmIP to save a Raspberry pi.

Tried this and did not work :frowning_face:

Decided, to give up with HM-MOD-RPI-PCB and ordered HmIP-RFUSB.
New chance, to burn money - horray :slight_smile:

the HmIP-RFUSB is only support HomeMatic IP though, isn’t it?

I got the PRI-PCB one up and running. You need to provide the dt overlay dtoverlay=pi3-miniuart-bt in /mnt/boot/config.json and the following config in the homematic addon:

{
  "rf_enable": true,
  "rf": [
    {
      "type": "CCU2",
      "device": "/dev/ttyAMA0",
      "reset": true
    }
  ],
  "wired_enable": false,
  "wired": [
    {
      "serial": "xy",
      "key": "abc",
      "ip": "192.168.0.0"
    }
  ]
}

Then in the configuration.yaml:

homematic:
  interfaces:
    rf:
      host: core-homematic
      port: 2001

And finally it should work.

The device pairing is very easy with the homematic-manager: GitHub - hobbyquaker/homematic-manager: Homematic Device Configuration and Administration

can you post your /mnt/boot/config.json I don’t have such a file (using HASS.IO)

sorry it is the config.txt

~ # cat /mnt/boot/config.txt 
kernel=u-boot.bin
disable_splash=1
dtparam=audio=on

dtoverlay=pi3-miniuart-bt

Unfortunately your right. Seems, that it only works with hmip. Funny thing: Seen OCCU start for the first time :slight_smile:

Have no idea, what might be wrong with my Setup. I´m trying two different Modules HM-MOD-RPI-PCB.
The modules seem to be recognized correctly, the application is started and…boom:

2018/11/13 21:20:16.141 RX FRAME: ff 01
2018/11/13 21:20:16.141 CCU2CoprocessorCommand::CCU2CoprocessorCommand(): Message too small: 2 bytes.
2018/11/13 21:20:16.141 () CCU2CommController::handleIncomingSerialFrame(): Command not parseable.
2018/11/13 21:20:17.139 () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/11/13 21:20:19.139 CCU2CommController::startCoprocessorAppThreadFunction(): Retrying to send start command
2018/11/13 21:20:19.139 CCU2CommController::startCoprocessorAppThreadFunction(): Send start command
2018/11/13 21:20:19.139 CCU2CommController::SendSystemCommdand()
2018/11/13 21:20:19.139 CCU2CommController::SendSystemCommdand() sending: fd 00 03 00 02 03 94 09
2018/11/13 21:20:19.142 RX SERIAL: fd 00 02 ff 02 82 0f
2018/11/13 21:20:19.142 RX FRAME: ff 02
2018/11/13 21:20:19.142 CCU2CoprocessorCommand::CCU2CoprocessorCommand(): Message too small: 2 bytes.
2018/11/13 21:20:19.142 () CCU2CommController::handleIncomingSerialFrame(): Command not parseable.
2018/11/13 21:20:20.140 () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/11/13 21:20:20.639 CCU2CommController::init(): Init failed. Cannot start coprocessor application.
2018/11/13 21:20:20.639 CCU2CommController::SendSystemCommdand()
2018/11/13 21:20:20.639 CCU2CommController::SendSystemCommdand() sending: fd 00 04 00 03 0a 00 bd 07
2018/11/13 21:20:20.642 RX SERIAL: fd 00 02 ff 03 02 0a
2018/11/13 21:20:20.642 RX FRAME: ff 03
2018/11/13 21:20:20.642 CCU2CoprocessorCommand::CCU2CoprocessorCommand(): Message too small: 2 bytes.
2018/11/13 21:20:20.642 () CCU2CommController::handleIncomingSerialFrame(): Command not parseable.
2018/11/13 21:20:21.639 () CCU2CommController::waitForCoProcessorResponse(): Timeout while waiting for response.
2018/11/13 21:20:21.639 () CCU2CommController::setCSMACAEnabled(): Error disabling CSMA/CA.
2018/11/13 21:20:21.640 No BidCoS-Interface available
2018/11/13 21:20:21.640 Error initializing interfaces

What does this error state? Other users seem to have this error too. Hmmmm…what can we do…

I’m having exactly the same error.
Is there any solution?

I found the solution:

If you are migrating from RaspberryMatic to Hassio you have to re-flash the firmware to your Modul:

https://wiki.fhem.de/wiki/HM-MOD-RPI-PCB_HomeMatic_Funkmodul_für_Raspberry_Pi#Firmware_Update_des_UART-Moduls_ohne_FHEM

After doing that it now works for me…

1 Like

Nice1. How did you flash it with hass.io in detail? Did you use the host ssh on port 22222?

I didn’t use Hass.io to flash.

I switched to a second SD card with a simple raspbian lite installation, then flashed the module and switched back to the Hass.io card.

Worked perfectly fine.

You are a complete star!
I don’t know how many hours I spent on this issue. The firmware upgrade did the trick! Now I can finally continue with a single RasPi.

btw: I registered to say this. It is my first post in this forum.

1 Like