Struggling with Alexa String item config

Hi guys,

I’m trying to control my security system with Alexa but am struggling with my items and how the new metadata works for with what I’m trying to do?

String	Alarm_Set	      "Alarm Set"          <alarm>	        {mqtt=">[mosquitto:comfort2/alarm/set:command:*:default]"}

part of my sitemap

Selection item=Alarm_Set label="Set Alarm" mappings=[DISARM=Disarm,ARM_NIGHT=Night,ARM_HOME=Day,ARM_AWAY=Away]

I can’t seem to find the correct config for doing this via Alexa?

Many thanks

There are several examples in the doc’s.

Group  SecuritySystem      "Security System"                  {alexa="Endpoint.SecurityPanel"}
String AlarmMode           "Alarm Mode"      (SecuritySystem) {alexa="SecurityPanelController.armState" [supportedArmStates="DISARMED,ARMED_STAY,ARMED_AWAY"]}
Switch BurglaryAlarm       "Burglary"        (SecuritySystem) {alexa="SecurityPanelController.burglaryAlarm"}
Switch FireAlarm           "Fire"            (SecuritySystem) {alexa="SecurityPanelController.fireAlarm"}
Switch CarbonMonoxideAlarm "Carbon Monoxide" (SecuritySystem) {alexa="SecurityPanelController.carbonMonoxideAlarm"}
Switch WaterAlarm          "Water"           (SecuritySystem) {alexa="SecurityPanelController.waterAlarm"}

You may want to update and use mqtt version 2 but either should work with Alexa.

Yes I’m using both versions of the mqtt binding and cant quite figure out how to update my security mqtt items. I’ve updated my other mqtt items as they are all sonoff and there are plenty of tutorials.

You gave me a few ideas before about how to update them but i haven’t done it yet but thats probably where i should start.


If you haven’t resolve your issue, here is how you should setup your item. Since you aren’t using the default SecurityPanelController.armState mapping, you just need to define your custom mapping matching the Alexa states. No need to provide the supported states parameter since it will be based on the latter mappings as stated in the documentation.

String	Alarm_Set	      "Alarm Set"          <alarm>	        {alexa="SecurityPanelController.armState" [DISARM="DISARM", ARM_NIGHT="ARM_NIGHT", ARM_STAY="ARM_HOME", ARM_AWAY="ARM_AWAY"], mqtt=">[mosquitto:comfort2/alarm/set:command:*:default]"}

Hey Jeshab,

Thanks for the info, although I have made progress with the new MQTT I still have a few issues that maybe you can help me with?

Here is my new items config, but the Alexa alarm states are DISARMED but my alarm uses DISARM, would i have to use friendly names to arm the alarm?

String	Alarm_Set	      "Alarm Set"       <alarm>	    (SecuritySystem)        {channel="mqtt:topic:comfort2:alarm:set", alexa="SecurityPanelController.armState" [supportedArmStates="DISARMED=disarm,ARMED_NIGHT=night,ARMED_STAY=stay,ARMED_AWAY=away"]}

something like this?

String	Alarm_Set	      "Alarm Set"       <alarm>	    (SecuritySystem)        {channel="mqtt:topic:comfort2:alarm:set", alexa="SecurityPanelController.armState" [supportedArmStates="DISARMED=DISARM,ARMED_NIGHT=ARM_NIGHT,ARMED_STAY=ARM_HOME,ARMED_AWAY=ARM_AWAY"]}

I went with the mappings you provided in your sitemap mapping. Anyway, as I mentioned before, once you don’t use the default mapping for a String item DISARMED="disarm", ARMED_STAY="stay", ARMED_AWAY="away", ARMED_NIGHT="night", AUTHORIZATION_REQUIRED="authreq", UNAUTHORIZED="unauth", NOT_READY="notrdy", UNCLEARED_ALARM="alarm", UNCLEARED_TROUBLE="trouble", BYPASS_NEEDED="bypass", there is no need to configure the supportedArmStates parameter as you have to define your custom mappings which will also provide the supported states of your alarm system in the process. It cannot be defined inside that parameter either.

String	Alarm_Set	      "Alarm Set"          <alarm>	        {alexa="SecurityPanelController.armState" [DISARMED="DISARM", ARM_STAY="ARM_HOME", ARM_AWAY="ARM_AWAY", ARM_NIGHT="ARM_NIGHT"], channel="mqtt:topic:comfort2:alarm:set"}

Ok so it kinda works, i can disarm the security system, is it possible to arm the system with Alexa? i’m not sure what the voice command is?

what are the differences with these?

String SecurityAlarmMode "Security Alarm Mode" {alexa="SecurityAlarmMode"}

String SecurityAlarmMode "Security Alarm Mode" {alexa="SecurityPanelController.armState"}

Use these utterance examples. You may want to update your item label as well.

No difference as per say. The former is the metadata label that translates to the latter metadata configuration.

thanks a lot for your help, one more question…when i discover my security device it says that I can now disarm my security system it appears that it is the only command that works? is there a reason for this? and am i wasting my time trying to figure out how to Arm my system?


Did you use the utterance examples I linked? What response did you get?

When I searched for devices it said now you can disarm you security system, it didn’t say anything else and it works. If I ask it to arm security system it says sorry I can’t use that mode check your control panel and smart phone… or something similar

Yes I used the examples.

My system doesn’t have a skill or binding btw, it’s purely mqtt and Python.

Also my security devices are discovered and work but they can’t be used in routines or anything like that. I can ask if the front door is open and get a reply - the door is closed/open etc.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.