www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer General Discussion Area

HomeSeer General Discussion Area General discussion about HomeSeer that does not fall into any other category or are not specific to 1.x or 2.x versions of HomeSeer.

Reply
 
Thread Tools Display Modes
  #1  
Old May 10th, 2017, 11:30 PM
mulu mulu is offline
Seer Deluxe
 
Join Date: Apr 2016
Location: CA
Posts: 355
Toggle Status of Schlage Lock

I see the status of my Schlage lock (469), i.e. locked or unlocked. I am trying to toggle the status from HSTouch. However, I only see the command lock and unlock but not toggle. How can I toggle the lock/unlock status of the lock?
Reply With Quote
  #2  
Old August 6th, 2017, 09:54 PM
mulu mulu is offline
Seer Deluxe
 
Join Date: Apr 2016
Location: CA
Posts: 355
Ok, I was looking into this again. It seems the only way to do this is with a script. It can be done directly in HStouch with a single script statement. In ActionsWhenPressed or ActionsWhenReleased create an action "HomeSeer: Run a HomeSeer script with values from elements(s)". For Script enter the string below. ScriptProcedure will be automatically set to "Main". Just ignore that. Replace [Insert Reference ID] with the reference ID of the lock which you can find under the advanced tab of the device.

hs.CAPIControlHandler(hs.CAPIGetSingleControl([Insert Reference ID], true, (hs.DeviceValue([Insert Reference ID again]) == 255) ? "Unlock" : "Lock", false, false));

For more control you can write an actual script that goes into the script folder. For the parameter pass it the reference ID of the device.

using System;

public void Main(string id)
{
string LogID = "Lock Control"; //This will be displayed in the log file under column "Type/Error".
int nLockStatus;
int nLockRef;

if ((nLockRef = Convert.ToInt32(id)) == 0)
{
hs.WriteLog(LogID, "Invalide input parameter " + id + "Please provide a single input parameter that is the device's reference ID which can be found under the Advanced tab of the device");
return;
}

nLockStatus = hs.DeviceValue(nLockRef);
if (nLockStatus == 255)
{
//Device was locked. Unlock it.
hs.CAPIControlHandler(hs.CAPIGetSingleControl(nLockRef, true, "Unlock", false, false));
}
else if(nLockStatus == 0)
{
//Device was unlocked. Lock it.
hs.CAPIControlHandler(hs.CAPIGetSingleControl(nLockRef, true, "Lock", false, false));
//hs.CAPIControlHandler(hs.CAPIGetSingleControl(hs.GetDeviceRe fByName("Downstairs Entrance Door Lock"), True, "Lock", False, False))
}
else
{
//Unknown status. Just try to lock it.
//Note for Schlage Camelot
// 1 = Unlocked with timeout
// 16 = Unlocked from inside handle
// 17 = Unlocked from inside handle with timeout
// 32 = Unlocked from outside handle
// 33 = Unlocked from outside handle with timeout
// 254 = Unknown status
hs.CAPIControlHandler(hs.CAPIGetSingleControl(nLockRef, true, "Lock", false, false));
}
}
Reply With Quote
  #3  
Old August 7th, 2017, 12:10 AM
happnatious1's Avatar
happnatious1 happnatious1 is offline
Seer Master
 
Join Date: Mar 2004
Location: Southern Maryland
Posts: 1,303
Did you try adding 9000 to status. Thats what tells hstouch to add a toggle.
Attached Images
 
Reply With Quote
  #4  
Old September 22nd, 2017, 04:22 PM
Tomadoggy Tomadoggy is offline
Seer Plus
 
Join Date: Nov 2016
Location: CO
Posts: 106
9000 not working

Just FYI...tried the "9000" for toggle on my Schlage and it does not work regardless of multiple changes in that setting...any other ideas?
Reply With Quote
  #5  
Old September 22nd, 2017, 04:37 PM
Tomadoggy Tomadoggy is offline
Seer Plus
 
Join Date: Nov 2016
Location: CO
Posts: 106
Also...script does not work for me

Really would like this feature for my Schlage locks...tried the script in HSTouch Designer and cannot get this to successfully toggle the locks either. Any assistance would be greatly appreciated.
Attached Images
 
Reply With Quote
  #6  
Old September 22nd, 2017, 08:13 PM
CFGuy's Avatar
CFGuy CFGuy is online now
Have A Blessed Day
 
Join Date: Jan 2001
Location: Basehor KS
Posts: 5,381
Create 3 events. See the images below.
Then ins HSTouch designer add an image that shows the status of your lock.
Add an Action When Released that runs the Event "Toggle" that calls the other 2 events.
You can then click the lock image and the lock will toggle between Lock and Unlock.
Attached Images
   
__________________
--
Jeff Farmer
HS 3.0.0.312, HSPhone
My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
Other Plugins In Use: APCUPSD, EasyTrigger, FBitSeer, HSTouch Server, Kinect, PHLocation, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Panasonic BDT-110, Panasonic BDT-210 x2
Reply With Quote
  #7  
Old September 25th, 2017, 01:28 PM
Tomadoggy Tomadoggy is offline
Seer Plus
 
Join Date: Nov 2016
Location: CO
Posts: 106
Thumbs up THANK YOU!!!

Genius! This worked perfectly, cant thank you enough as this is just what I needed. Hope to be able to return the favor somewhere somehow. The abilities of HS3 are vast...but difficult to uncover so users like you are truly the ones that extol the value of this system!

I am doing well on graphics and navigation, so if I can assist you in any way in this area, please let me know.

Regards,
John
Reply With Quote
  #8  
Old September 25th, 2017, 08:00 PM
AttilaHooper's Avatar
AttilaHooper AttilaHooper is offline
Seer
 
Join Date: Nov 2014
Location: NY
Posts: 33
I struggled with this as well and posted a reply to an older thread https://forums.homeseer.com/showthre...13#post1325113

While the aforementioned Events are an elegant solution, the conditional "Other Events are True" wasn't obvious to me, so I went with a vb script. Which was a great learning experience.

...
1) create 3 manually triggered events (Script, Front Door Lock, Front Door Unlock)
2) Lock and Unlock are simply setting node to lock or unlock
3) Script has the following code
This goes in the program files/homeseer/script folder
Code:
''Lockscript.vb 
Sub Main(parms as Object)     
Dim devStatus = hs.DeviceValueByName("Vestibule Door Lock")     
     Select Case devStatus     
     Case 255         
          hs.TriggerEvent("Front Door Unlock")         
          hs.Speak("Unlocking the Front Door")     
     Case 0         
          hs.TriggerEvent("Front Door Lock")         
          hs.Speak("Locking the Front Door")     
     end Select 
end Sub
The HomeSeer documentation states DeviceValueByName requires Location & Name. This can be confusing because by location they mean Room. So in my case the Device: Door Lock is in the Room: Vestibule.

Finally,
4) Create a button in HSTouch Designer. I like to give it status tracking of the door lock. And Action when pressed is the Front Door Lock Script.
Reply With Quote
  #9  
Old September 28th, 2017, 10:58 AM
Tomadoggy Tomadoggy is offline
Seer Plus
 
Join Date: Nov 2016
Location: CO
Posts: 106
Scripting next

Thanks for the idea...I am (currently) intimidated by scripting, but hope to dive in soon as these can really open up new functionality!
Reply With Quote
  #10  
Old November 10th, 2017, 02:31 PM
morrisdl morrisdl is offline
Seer
 
Join Date: Sep 2011
Location: Smith Mt Lake, VA
Posts: 44
Thank you Jeff for the events!

Reply With Quote
  #11  
Old November 10th, 2017, 04:23 PM
cheeryfool's Avatar
cheeryfool cheeryfool is offline
Super Seer
 
Join Date: Apr 2008
Location: Jersey Shore
Posts: 1,746
FYI

Spud's EasyTrigger plugin has a toggle action built in, plus a veritable treasure trove of other features that greatly simplify complex event building and schedules.
__________________
cheeryfool
Reply With Quote
  #12  
Old December 9th, 2017, 11:55 AM
happnatious1's Avatar
happnatious1 happnatious1 is offline
Seer Master
 
Join Date: Mar 2004
Location: Southern Maryland
Posts: 1,303
Quote:
Originally Posted by Tomadoggy View Post
Just FYI...tried the "9000" for toggle on my Schlage and it does not work regardless of multiple changes in that setting...any other ideas?
This used to work but an update somewhere along the line has broken it. Here is an old link where Rich explains it: https://forums.homeseer.com/showthre...=165052&page=2

Dec-09 10:51:18 AM Z-Wave Error Z-Wave Exception processing Z-Wave command type COMMAND_CLASS_DOOR_LOCK_V2. Error=Arithmetic operation resulted in an overflow.
Dec-09 10:51:18 AM Device Control Device: 1st Floor Main Door Lock to Toggle (9000) by/from: CAPI Control Handler
Reply With Quote
  #13  
Old December 14th, 2017, 12:48 PM
happnatious1's Avatar
happnatious1 happnatious1 is offline
Seer Master
 
Join Date: Mar 2004
Location: Southern Maryland
Posts: 1,303
Quote:
Originally Posted by happnatious1 View Post
Did you try adding 9000 to status. Thats what tells hstouch to add a toggle.
I have verified that this method works from a homeseer touch client. However clicking toggle on the web interface generates the arithmetic error.
Reply With Quote
  #14  
Old December 15th, 2017, 10:15 AM
The Profit's Avatar
The Profit The Profit is offline
Seer Deluxe
 
Join Date: Jul 2015
Location: San Diego, CA
Posts: 444
Quote:
Originally Posted by morrisdl View Post
Thank you Jeff for the events!





Which program did you use to create your floor plan? Looks great!


Sent from my iPad using Tapatalk
__________________
HS3 3.0.0.420 & HSTouch 3.0.55 with 700 Devices, 358 Events
Plugin's:
BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee,
EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
weatherXML, Jon00 Alexa Helper, Network Monitor, Z-Wave 3.0.1.200
Reply With Quote
  #15  
Old January 5th, 2018, 01:43 PM
The Profit's Avatar
The Profit The Profit is offline
Seer Deluxe
 
Join Date: Jul 2015
Location: San Diego, CA
Posts: 444
Quote:
Originally Posted by The Profit View Post
Which program did you use to create your floor plan? Looks great!


Sent from my iPad using Tapatalk
Does anyone know, is this floor plan made using Sweethome 3D or something else?
Thanks
Reply With Quote
  #16  
Old January 5th, 2018, 01:51 PM
Tomadoggy Tomadoggy is offline
Seer Plus
 
Join Date: Nov 2016
Location: CO
Posts: 106
I use Sweet home

For me, I use Sweethome, you can turn on and off layers to show the elements you wish to use, and add lighting to add shadows etc. From there I have found that creating the graphics for HSTouch is best done by a simple screen capture from Sweethome, then pull into Paint.net (free) to tweak, add transparent background, and resize to meet your needs.
Attached Images
  
Reply With Quote
  #17  
Old January 5th, 2018, 04:25 PM
tome10's Avatar
tome10 tome10 is offline
Seer Master
 
Join Date: Sep 2016
Location: AR
Posts: 832
Would probably better to post that question here:

https://forums.homeseer.com/showthre...=175914&page=5
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Schlage Lock Battery Status zakrzep Lighting & Primary Technology Discussion 0 November 11th, 2013 08:25 AM
How to toggle Kwikset lock status?? msbreton HomeSeer Z-Wave Plug-in 12 September 18th, 2011 04:35 PM
Schlage Lever Lock Status Problem dumpmyster HomeSeer General Discussion Area 12 July 22nd, 2011 12:39 PM
Schlage Lock Root Status dumpmyster HomeSeer General Discussion Area 1 March 10th, 2011 07:23 PM
Schlage Lever Lock Status jpape Lighting & Primary Technology Discussion 1 May 6th, 2010 03:12 PM


All times are GMT -4. The time now is 04:46 AM.


Copyright HomeSeer Technologies, LLC