Create System Armed Switch

  • Platform information:
    • Hardware: Raspberry Pi 3
    • OS: Raspbian
    • openHAB version: 2.5 Milestone build
  • Issue of the topic:
    I am trying to create a switch that I can toggle to arm and disarm my system. I have no physical switch for this I would like it to be all through openhab and like to arm and disarm through the app. I can’t give the item a channel since it does not really exist.

I tried creating a switch as such in a .items file

Switch System_Armed “System Armed” <switch>

The item shows up in PaperUI under things the problem is it doesn’t show up in PaperUIs control or the OpenHab App so I can toggle it on/off to arm and disarm my system

did you add the switch to your sitemap? that’s necessary to control it in the app

PaperUI is meant to be an admin tool not for users. The control page of PaperUI shows only channels which are linked to an item.
You have created an item which is not linked to a channel, hence PaperUI doesn’t show it on the Control page.
You did not put that item on a sitemap which would be needed in order to Show on an UI (which is using the .sitemap files).

1 Like

I asked a similar questions little while back…the theory about a master switch is what I wrestled with - it makes good sense and is standard from a coding point of view however if you make one, (create a dummy variable and then call it as a switch from your site map file), but then you have to add it as an if to every rule you create - ie ‘if master switch is off then don’t run this rule’

However that can be very time consuming I found. In reality OH has groups that can do something very similar, read up on those first and then have a think of ‘ how these can do what you need. Worked for me.