Anyone else see value in adding SWITCHES into the HSM trigger selection?

Anyone else see value in adding switches as a trigger in HSM?

Thinking about notification of someone flipping a switch that shouldn't be flipped either:

a) because NO one is on premise and that switch wouldn't be switched unless somebody was (think of it like a feature that someone could cause an HSM alarm unbeknownst to them)

b) because a particular switch is for something that should not be switched by anyone unauthorized and those that are should know if & when it is

or maybe...

c) because a VIRTUAL switch has been created to be flipped by some other App and you want HSM to react to that

I'm sure others could come up with justifications for switches being a trigger in HSM if you happen to use HSM.

There really isn't anything you can do with HSM in response to a switch trigger that you can't do with an ordinary rule. That is, you don't really need HSM.

Having said that, it's very simple to have a little app that turns a switch into a sensor for the purpose of tripping HSM, or tripping an HSM custom rule. The app below changes a contact sensor into a motion sensor. Changing only a tiny portion of it would make it take switch on/off and make it active/inactive of a motion sensor.

That's two ways to do what you want without feature creeping HSM.

1 Like

Thanks for that.

I like that idea, but my 1st thought was I can use rule machine to accomplish that end. I think we should also include flood sensors, as I heard the wet bandits from Home Alone were recently released, Harry and Marv :grinning:

1 Like

My question is why wouldn't it be usable on HSM. Seriously, all device types should be usable in hsm, why arbitrarily dismiss device types. We're all here using Hubitat because we don't want to be locked down to a vendors platform and with that the decisions the vendor makes. Open it up Hubitat, you can't possibly think of all the weird, wacky, and wild ways we want to use our hub.

We make decisions about the hub every single day, that's our job. There are issues to be addressed about usability and user interface, as well as functionality, reliability, etc. To follow your inferred suggestion, every app would turn into a complex multi-optioned mess, with very low usability for most users. Instead, we do take a curated design approach to the built-in apps, attempting to make apps that are usable by most users, with a means of extending them for those with peculiar needs that lie outside that curated design.

I hope that answers your question. Perhaps if you explained the use case for a switch firing HSM, someone could show you a simple way to accomplish your use case, one that wouldn't feature-creep HSM.

4 Likes

That’s why rule machine exists. If you are an advanced user with a very specific need, you can do pretty much whatever you want with it.

Adding too many features and options to other built-in apps could easily overwhelm some users.

HSM is intended to replicate the functions of more traditional security systems. I have never had a “real” home security system. Is it common for them to allow alarm triggers from the flip of a switch?

3 Likes

Ninjaed. Just about to post the same thing.

I've never had that. Although I do have panic buttons. That being said, the combination of Rule Machine and HSM can be used to achieve that.

1 Like

(my letter insertions)

Another great example of:

A) a worthy use case that is not at all a "one off" expectation for HA,,
and
B) the casual user having to roll up their sleeves and go beyond what's provided as a baseline in the environment.

I get that embellishment of the tool kit takes precious time and indeed causes wonder where best to do what the longer one uses/implements a system around this box. The terms just need to be clear to folks buying in.

While the marketing does not in any way deceive, it is easy for new folk to assume stuff and later find themselves going..."oh, I can't do that in there, I must go over there, or I must do a little here and a little over there...and oh, make sure it still does what I want after every environment upgrades (which one really hates to be left behind).

I have a lot of respect for the accomplishments in this box, and the small staff that got it to this point. No need to argue any of the above, I'm about converted... but I'm still willing to say things like this before the kool-aid has taken full effect. :man_shrugging:

How the heck can anything this complex and subtle ever be communicated, other than in the context of someone who spends some time here in the community reading and learning? It is, no doubt, a complex thing, this hub. It's capable of a great deal, can support a wide range of very custom automations. Yet, at the same time, we endeavor to make it accessible to new users, with apps like Basic Rule, a new getting started approach coming in the 2.3.1 release, etc. We're all ears about requests for features, and we add many that are suggested here. That doesn't mean the every request will be or should be fulfilled.

3 Likes

IMHO this is a slightly different feature request.

HSM can be armed with a button, but it’s not possible to trigger an HSM alert with a button.

Panic buttons could be a more natural fit for a built-in app that is purpose-built for safety monitoring.

1 Like

Agreed.

1 Like

Maybe it's just me but I'd prefer to keep all my security system within hsm and not piecemeal it between HSM and rule machine.

The point is that we can't possibly meet every use case in a single app like HSM. And, one principal of home automation is "your use case is not my use case". So an app like HSM quickly becomes a slippery slope of feature creep. You probably have a perfectly reasonable use case, but so do others have one that is different from yours, and before very long, HSM turns into RM. Now, there are features that do get added from time to time, ones that obviously fit into the clear purpose and design (e.g., shutting off a valve on a water leak).

As I said before:

Who knows, maybe your use case is compelling enough to drive a new feature.

1 Like

Also, there is another way to do this right now: There is an app in our public repo that changes a contact sensor into a motion sensor. That app could be easily changed to turn a switch into a contact sensor (or whatever type of sensor), and the resulting sensor could be used in HSM to trigger it. No RM involved, all of you security system within HSM.

2 Likes

Try this: The app will create a virtual contact sensor with the name you give the app. When the selected switch turns on, the contact opens; when the switch turns off, the contact closes.

definition(
    name: "Switch-Contact",
    namespace: "hubitat",
    author: "Bruce Ravenel",
    description: "Turn a Switch into a Contact Sensor",
    category: "Convenience",
    iconUrl: "",
    iconX2Url: "")

preferences {
	page(name: "mainPage")
}

def mainPage() {
	dynamicPage(name: "mainPage", title: " ", install: true, uninstall: true) {
		section {
			input "thisName", "text", title: "Name this Switch-Contact", submitOnChange: true
			if(thisName) app.updateLabel("$thisName")
			input "switches", "capability.switch", title: "Select Switches", submitOnChange: true, required: true, multiple: true
		}
	}
}

def installed() {
	initialize()
}

def updated() {
	unsubscribe()
	initialize()
}

def initialize() {
	def contactDev = getChildDevice("SwitchContact_${app.id}")
	if(!contactDev) contactDev = addChildDevice("hubitat", "Virtual Contact Sensor", "SwitchContact_${app.id}", null, [label: thisName, name: thisName])
	subscribe(switches, "switch", handler)
}

def handler(evt) {
	def contactDev = getChildDevice("SwitchContact_${app.id}")
	if(evt.value == "on") contactDev.open() else contactDev.close()
	log.info "Switch $evt.device $evt.value"
}
2 Likes

I understand why the decision was made to keep HSM streamlined. I haven't bothered with it until recently due to perceived level of complication. It wasn't nearly as difficult as I thought it would be. I think part of the problem or fear I faced was the complete lack of hardware for what I wanted to do. I spent months trying to find a zigbee siren... No luck. Finally landed on a simple siren that goes off once it's powered and wired it to a sonoff s31 lite. Total cost 20 dollars.

Slightly off topic... but not since it deals with the standard capabilities of HSM (which I too started out wanting to give an increasing role in the basic functions of my home security).

Will be curious how that siren gets turned off/reset, just through HSM, to avoid driving your neighbors crazy when it gets turned on by some (most likely false / non-cricitcal) trigger circumstance.... while you are in the middle of something offsite, or on a plane, and can't get to your phone to see the notification and deal with it.

Having some configurable automatic reset of alarms (and alerts like sirens) either after a duration of time and/or the triggering device resetting itself to the a non-triggering state...is a common option in Security Monitors.

Simple rule: siren turns on, turn it off after x period of time.

Thank you for the info, I honestly didn't think of that. You saved me a broken down door in the future as the police do a welfare check.

1 Like

Download the Hubitat app