Interworking RaspberryMatic / OpenHab on Notifications

Hello OpenHab Community,

I have recently migrated from Homematic IP (Cloud) to a more local solution with one RaspberryPi 3b running RaspberryMatic and another Raspberry 4 running OpenHab. Nearly my entire flat is covered with HmIP components and now since I own first Philips Hue lights, the integration needed to be done.

I successfully have setup RaspberryMatic with direct links of HmIP components. Then I wanted to start with OpenHab and struggled a lot with HmIP-BBL & HmIP-FBL, so I focused on the RaspberryMatic Programs. With the help of the Homematic-form I integrated Programs for generic notifications via Pushover/Telegram and setup service notifications, security alarm, smoke detectors and a few actions more.

I realized that a separate push receiver and app is not such a great thing, so I thought I could use the one from OpenHab. Is there an API that can be exposed at the local OpenHab instance, so that I can send REST requests from my RaspberryMatic to relay them?

My second question is how stupid can I make the RaspberryMatic with Programs in OpenHab? Are there example scripts:

  • to read all service messages of HmIP components
  • have a Smoke Detector Alarm (HmIP-SWSD)
  • Security System Implementation with Window and Door Contacts (HMIP-SWDO, HMIP-SWDO-I)

Best regards,

Oliver

I suppose you could search for “openHAB REST API”?

As rossko57 indicated, there is quite an extensive REST API available for openHAB. I don’t know how flexible RaspberryMatic is though. The openHAB API needs GETs, POSTs, and PUTs in a specified format. You can see it all in the REST API Docs addon.

I don’t think we have anything near enough information to answer this question. But in general openHAB and RaspberryMatic will have some sort of integration. The sensors and actuators “owned” by RaspberryMatic are represented in openHAB as Items (it’s essentially irrelevant what the devices actually are). From there you can do anything that openHAB can do with those Items. But in order to command stuff integrated with RaspberryMatic you must have some sort of API or messaging that RaspberryMatic understands that openHAB can talk to.

I can read documentation and I checked the openHAB REST API Swagger Documentation in the first place. What I cant find is a Method to trigger “Cloud Notification Actions”. They are only described in https://www.openhab.org/docs/configuration/actions.html#cloud-notification-actions.
I’m in particular searching for an API Call to this method sendBroadcastNotification(message, icon, severity).

With regards to the second question: RaspberryMatic there are a lot of functions for System Maintainance like:

  • Service Messages (Config Pending, Low Battery, etc.)
  • Alarm Messages (Security System, WatchDog)
  • Global Variables that act as trigger for Programs
    See below a screenshot:

I was wondering if I can integrate the entire management of the CCU into OpenHab and centralize all relevant functions (like the once mentioned above). Do you have any experience how to realize that?

The homematic binding seems to be limited when it comes to these kind of functions CCU related.

You wasted a little of everybodies time by not saying so,

There isn’t one. That’s why it is not in the docs.
This is the kind of action you would take within a rule, responfding to some event like an Item state change. Have you read about rules yet?
Typically, you might use REST API to post your message to a String Item, and have a rule respond to the update by calling the Action.

So you would suggest that I create a String Item with the Message, trigger a rule upon receiving and push it via the mentioned action?

Actions are not exposed through the REST API. But you can create a String Item, POST or PUT the message, trigger a Rule and then call the Action from the Rule. That’s basically what you would want to do anyway if, as you initially said, you want openHAB to run the automation (unless I understood incorrectly).

You will have to see what sort of API RasperberryMatic provides and whether or not openHAB can interact with it.