GRClark
(Gene Clark)
December 22, 2017, 11:59pm
1
I’m using a simulated contact sensor to show status of two real contact sensors being controlled via webCoRE, but one thing I’ve noticed about virtual contact sensors is they can be controlled in the SmartThings app simply by pressing them and it’ll change status from open to close to open easily. My question is this: can I prevent status from being changed through button pushes and limit it to only webCoRE changes?
jgravert
(James)
December 24, 2017, 11:37pm
2
Doubt it. That is the point to the “virtual” anything. It allows you to mimic a real device so changing its state is by its nature what is required.
Possibly if you built a custom DH you may be able to disable that ability but you need to talk with a developer.
GRClark
(Gene Clark)
December 24, 2017, 11:55pm
4
And yes @anon36505037 crushed it with the code. Did exactly what I was looking for.
2 Likes
GRClark
(Gene Clark)
January 2, 2018, 5:27pm
5
@anon36505037 would i be able to use same additions to code for a uDTH device? I’m using a light sensor I’d like to eliminate manual control of.
This has got to be the sickest DTH ever…
The uDTH
Ever wished you could turn on a presence sensor with a switch?, or maybe take a lock command and send a motion event?
Basically this bad boy accepts these commands:
on
off
open
close
lock
unlock
and can turn them into these attribute states:
open
closed
present
not present
active
inactive
The following capabilities are presented on the command side:
switch
door control
garage door control
lock
The following devices are presented on the attribute side:
Contact
Motion
Presence
Door
Acceleration
Illuminance
Smoke
Water
Sound
You wire up an instance of this device to two separate apps, and off you go.
Add to your repo, and select the device MikeMaxwell : uDTH
the repo is
owner: MikeMaxwell
name: dth
[image]
[image]
[image…
GRClark
(Gene Clark)
January 2, 2018, 6:00pm
7
I’m using the light sensor and you can turn it on and off.