In / Out Board

I would like to use Habpanel for an in /out board for our IT department. Idea is we have an IPad on the back of the door for selection, and a second one facing out to show where the IT staff have gone.

4 locations I was thinking big buttons which are switch items for selection, and a large text item for the display.
I would like to be able to display “IT are in Building 1” if that was the location selected, but show each location that is selected “IT are in Building 1 and then IT are in Building 2”

What I cant get my head around are the rules needed to do the logic for this - can anyone help?

Hi

I would use a dimmer item to store a number value.

Then a selection widget with a map to assign rooms / zones / areas to numbers.

With text like this in the selection

1=Main Building,2=Rest Area,3=Student Support,4=Server Room,5=Hiding

I’d guess it wouldn’t need a rule at all, unless you want to translate the selection to label for the outside door.

However, I might be over simplifying your needs.

You could go mad and use WiFi presence or Bluetooth beaconing to automatically display your locations…

Thanks - I not sure how this would solve the multiple building option.

I am playing with the icloud binding for location tracking as well but finding it a bit inacurate

Hi

I think I might be reading your original post wrong, or I am over simplifying your request.

Is this the kind of solution your looking for?

(I’ll PM you a link to the live HabPanel)

Im not sure how to explain my requirements i have alraady done your mockup but was hoping for some sort of thing where if we go from building 1 to building 2 on an outing we tap two boxes instead of one and it changes the text to be “we are in building 1 or building 2” but if only going to building 2 - “we are in building 2”

Arrrr

I see now.

So are you looking for two toggles / switches that you (the tech team) can operate to indicate where you are performing your magic?

But on a display unit, you only want a single text display that states a choice of…

IT are definitely in building ONE

IT might be in building One or building Two

IT are most definitely in building TWO

So are you looking for a rule that will post the required text into a string, depending on the state of the two switches?

Would an IF array or Switch Case rule work for you?

Would you happen to have a floor plan of the site that you could use on the display board?

Hi Andrew

I’ve been away on a show, but had some time to think about what you’re looking for.

I’d say that you could probably use a set of switches to set your locations, then a text string to display whatever message you want.

(You can map these switches to presence devices later)

I found this topic that I think you could take inspiration from for the rule.

When you work out what this chap is doing with the rule, it’s actually rather clever in a truly simple way. (Which suits my brain)

Good luck

A simpler version of the code from that link.

First note the imports are not needed on OH 2 Rules.

rule "Switch transformer ON/OFF"
when
    Item Pump01 changed or
    Item Pump02 changed or
    Item Relay02 changed
then
    var TestString = ""

    TestString = TestString + if(Pump01.state == ON)  "1" else "0"
    TestString = TestString + if(Pump02.state == ON)  "1" else "0"
    TestString = TestString + if(Relay02.state == ON) "1" else "0"

    val newState = Relay02.state
    switch TestString {
        case "110": newState = ON
        case "010": newState = ON
        case "100": newState = ON
        case "001": newState = OFF
    }

end
1 Like

You planning to do this just for teams or individuals too? If later is also a usecase, I would suggest not to monitor individuals using hi-tech. You will loose the confidence of employees once they know you are monitoring them. They (at least the good ones) will leave you.
I had big fights with my previous employer on the issue of In/Out monitoring and also windows desktop monitoring. I quit them.

1 Like

Sometimes I feel just stop working for FAT employers for their FAT salaries and start selling OH based solutions in my city. And of course keep imroving OH baseline code in the process.

1 Like