[SOLVED] Homematic Smoke Detector HMIP-SWSD will not work

Hi openhab experts,
I have some problems getting my homematic smoke detectors running. After some research I found something in a homematic forum but it will not work with openhab.
So I want to use the alert function of the HmIP-SWSD also as a kind of siren. It should be possible to active the alert by using this channel:
homematic:HmIP-SWSD:ccu:xxxxx:1#SMOKE_DETECTOR_COMMAND
which is of the type String.
In openhab I mapped that as a item of type switch. Unfortunately the valid values are not documented in the homematic documentaiton, but someone has posted them in a forum entry:
0 = Idle Off
1 = Fire Alarm
2 = Intrusion Alarm
3 = Fire Alarm of an other Detector

So if I now try to set the value in a rule with sendCommand the following error occurs:

2018-09-23 17:39:47.192 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert ‘2’ to a command type which item ‘iHMSmokeGFCorridorCommand’ accepts: [OnOffType, RefreshType].

I have tried to use ON/OFF or different ways of passing the numeric code into that Item, but without sucess…

Does anyone use this Smoke Detector or can explain what the error message means? Is a Switch maybe not the appropriate Type for String?

Many thanks in advance!

Have you installed the Map Transformation addon in PaperUI? I have no experience with this smoke detector but if it returns a value of 2 and you need to convert this to ON/OFF or something different then create a map file and add what you need.

Here is an example of a motion sensor that returns either a 0 or 1 that the map transform changes to ON/OFF.

My items file:

Switch Pi_Hole_Sensor "PiHole Sensor" <switch> 
    { mqtt="<[pibroker:home/light/presence:state:MAP(ONOFF.map)]" }

and inside the map file, named ONOFF.map:

1=ON
0=OFF

Hope this helps, if not please post your items file.

Thanks for the tipp with the mapping, the error in the log is gone. But unfortunately still nothing happens when I pass the value to the item. A value between 1 and 3 should activate the siren, this is posted in several forums.
Here is my config:

Switch iHMSmokeAtticCommand         "Dachboden Rauchmelder"     <fire>  (gHMSmokeCommand)    {channel="homematic:HmIP-SWSD:ccu:xxxx:1#SMOKE_DETECTOR_COMMAND" [profile="transform:MAP", function="ONOFF.map", sourceFormat="String"]} 

ONOFF.map:

2=ON
0=OFF

In a rule I set this now to ON/OFF:

iHMSmokeAtticCommand.send(ON)

I tried any possible combination in the mapping for ON (1-3) and as you can see in the log it will be passed to the item. But nothing happens…

2018-09-25 19:51:26.833 [ome.event.ItemCommandEvent] - Item 'iHMSmokeAtticCommand' received command ON
2018-09-25 19:51:26.848 [vent.ItemStateChangedEvent] - iHMSmokeAtticCommand changed from OFF to ON

Any other idea?

I looked for some documentation but no luck. If you keep the item as a switch, comment out the end part of the item and use the number as the sendCommand what happens?

Switch iHMSmokeAtticCommand         "Dachboden Rauchmelder"     <fire>  (gHMSmokeCommand)    {channel="homematic:HmIP-SWSD:ccu:xxxx:1#SMOKE_DETECTOR_COMMAND" }  // [profile="transform:MAP", function="ONOFF.map", sourceFormat="String"]} 

The rule item will look like this

iHMSmokeAtticCommand.sendCommand(1) 

I was going to say the same thing. I’ve got the Homematic (non-IP) siren and it’s not an integer but a string you send.

I think you’ve got the data slightly mixed up too. You’ve quoted the functions for the read-only SMOKE_DETECTOR_ALARM_STATUS.

The SMOKE_DETECTOR_COMMAND commands are:

RESERVED_ALARM_OFF
INTRUSION_ALARM_OFF
INTRUSION_ALARM
SMOKE_TEST
COMMUNICATION_TEST
COMMUNICATION_TEST_REPEATED

These are the strings you send.

The technical manual listing all the Homematic IP data points is online, here

1 Like

Thanks @Saracen for stepping in. With this info and tip, the OP should be looking for some earplugs soon.:grinning:

Thanks @Saracen & @H102 - now it works!
I changed the item to String and with the correct value I hear now finally the alarm :slight_smile:

The funny fact is that I checked the same documentation regarding the values, but it I have not waited long enough until the reader was ready to search in that 8k pages document :man_facepalming: