Manually set presence

  • Platform information:
    • OS: linux Fedora 31
    • Java Runtime Environment: Not sure how to get this data
    • openHAB version: snap https://snapcraft.io/openhab latest/stable: 2.5.5

Hi -

I’d like to add a simple presence switch that I can set manually.

I’m unable to find anything via search, as there are so many hits for “switch” and all the presence posts I find have details about trying to automate it.

It looks like I need to add a “switch item” but I can’t find anything on specifics for it.

How can I add a simple presence switch that I can set manually?

Thanks …

What did you have in mind to toggle this switch? Phone app? Basic UI? Physical switch?

And how are you configuring OpenHAB? PaperUI or via configuration files?

Assuming you want to flip the switch from a sitemap (viewable either on a phone app or through the Basic UI), and you’re modifying configurations through files, you could do the following:

items file

Switch sPresence "Someone is present"

sitemap file

Switch item=sPresence label="Presence [%s]"

What did you have in mind to toggle this switch? Phone app? Basic UI? Physical switch?

Basic UI and HAB panel.

And how are you configuring OpenHAB? PaperUI or via configuration files?

PaperUI and config files.

Right now I only have two wifi controlled outlets, and would like to turn them on/off based on presence (more or less). I don’t want to try and add automated presence - at least not now.

Assuming you want to flip the switch from a sitemap (viewable either on a phone app or through the Basic UI), and you’re modifying configurations through files, you could do the following:

Thanks, I’ll try that out!