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

**URL:** <https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130>\
**Category:** Bindings\
**Tags:** homematic\
**Created:** [September 23, 2018, 8:19pm UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130 "2018-09-23T20:19:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![deslux](https://community.openhab.org/user_avatar/community.openhab.org/deslux/32/26084_2.png) [@deslux](https://community.openhab.org/u/deslux)\
**Post date:** [September 23, 2018, 8:19pm UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130/1 "2018-09-23T20:19:51Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![H102](https://community.openhab.org/user_avatar/community.openhab.org/h102/32/25595_2.png) [@H102](https://community.openhab.org/u/H102)\
**Post date:** [September 24, 2018, 2:19pm UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130/2 "2018-09-24T14:19:25Z")

</div>

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:

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

```

and inside the map file, named ONOFF.map:

```javascript
1=ON
0=OFF

```

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

---

<div class="post-metadata">

**Author:** ![deslux](https://community.openhab.org/user_avatar/community.openhab.org/deslux/32/26084_2.png) [@deslux](https://community.openhab.org/u/deslux)\
**Post date:** [September 25, 2018, 6:02pm UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130/3 "2018-09-25T18:02:35Z")

</div>

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:

```csv
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:

```csv
2=ON
0=OFF

```

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

```php
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…

```csv
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?

---

<div class="post-metadata">

**Author:** ![H102](https://community.openhab.org/user_avatar/community.openhab.org/h102/32/25595_2.png) [@H102](https://community.openhab.org/u/H102)\
**Post date:** [September 25, 2018, 6:12pm UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130/4 "2018-09-25T18:12:34Z")

</div>

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?

```csv
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

```auto
iHMSmokeAtticCommand.sendCommand(1) 

```

---

<div class="post-metadata">

**Author:** ![Saracen](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Saracen](https://community.openhab.org/u/Saracen)\
**Post date:** [September 25, 2018, 6:36pm UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130/5 "2018-09-25T18:36:42Z")

</div>

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](https://www.eq-3.com/service/downloads.html?id=183)

---

<div class="post-metadata">

**Author:** ![H102](https://community.openhab.org/user_avatar/community.openhab.org/h102/32/25595_2.png) [@H102](https://community.openhab.org/u/H102)\
**Post date:** [September 25, 2018, 6:39pm UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130/6 "2018-09-25T18:39:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![deslux](https://community.openhab.org/user_avatar/community.openhab.org/deslux/32/26084_2.png) [@deslux](https://community.openhab.org/u/deslux)\
**Post date:** [September 26, 2018, 5:38am UTC](https://community.openhab.org/t/solved-homematic-smoke-detector-hmip-swsd-will-not-work/52130/7 "2018-09-26T05:38:49Z")

</div>

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

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 🤦‍♂️
