www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer Software > HS3Touch™ > HS3Touch General Discusion

HS3Touch General Discusion Discussions related to HS3Touch under HS3

Reply
 
Thread Tools Display Modes
  #1  
Old June 14th, 2018, 08:33 PM
Nacman Nacman is offline
Viewer
 
Join Date: Jun 2018
Location: GA
Posts: 2
Cool Collecting and sending multiple values to script

Hi all,

First post on this forum...

I know this has been asked several different ways, but I honestly can't tell implement anything from various post I have seen.

I have a DSC alarm system, Spud's Envisalink plugin and HS3Pro dedicated server. Had it all for 1 week

I am communicating via the plugin, I have built screens that monitor devices using events, I have created virtual devices. Now I want to build a "virtaul Alarm Keypad" screen. I have a real keypad, but I want to make them in HSTouch.

Is there a way to collect a 4 or 6 digit entered code from an HSTouch device and then send it to a waiting script on HS3 for evalutaion and action?

I can collect one value from an element, but I can't wrap my thick skull around collecting multiple values and sending them (via parameters or ???) to the script.

Is this possible? If so point me in the right direction maybe with a snippet or a brief writeup howto.

I struggled with putting this in this forum or the Envisalink forum.

Thanks in advance,

Rich
aka Nacman
Reply With Quote
  #2  
Old June 15th, 2018, 04:23 AM
ShimmerNZ's Avatar
ShimmerNZ ShimmerNZ is offline
Seer Deluxe
 
Join Date: Jan 2013
Location: New Zealand
Posts: 172
Yep can be done. Probably better ways of doing it, but one way would be the following:

Create a new project
* Add a screen
* Drag across the 'Passcode' element (one found in Android Skin/Custom)

Normally this would be used for an HSTouch passcode screen where you would have a single passcode that would need to be entered before you could access a particular screen. You wont use it that way but it has all the keypad buttons already pre made so suggest start that way to make life easier. It also has default actions so that when you press the numbers it will append the keypad value to the text box as well as clear button clearing the text box.

From there all you need to do is select the enter button then select 'action when released'. You likely wont need the "Screen: close a screen" function so you can delete that. Click Add, then select "HomeSeer: Run a HomeSeer script with values from elements" as the Action Type. You will then need to specify your script, the procedure (in the below example it would be called Main) and then select the Text Box Element as Script Parameter 1. Click ok and you are done.

From there you will need to write your script to parse the array that's returned and do whatever you want to do with it.

sample script that all it would do is write out the keypad entry to your log file:
Quote:
Sub Main(ByVal keypad() As String)
Dim keypadstring As String = keypad(0)

hs.writelog ("Debug", "Parameter passed from HSTouch :" & keypadstring)

End Sub
p.s. you might want to add another action to clear the text box after hitting enter
p.p.s hstouch has quite a few bugs, most can be worked around. if you have an oddness with the passcode element, check the actions are actually referencing the correct name of the text box. when testing just now locally it was wrong and I had to correct each of the buttons to make it work.
__________________

Last edited by ShimmerNZ; June 15th, 2018 at 06:46 AM.
Reply With Quote
  #3  
Old June 15th, 2018, 06:19 PM
Nacman Nacman is offline
Viewer
 
Join Date: Jun 2018
Location: GA
Posts: 2
Perfectly explained and thank you. It also makes sense that as the entry appends the next entry it has to be parsed once sent the other side, as I have read that many times. THANKS!

-Nac
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
Problem sending float values backkri Arduino Plugin (3P) 3 March 20th, 2018 08:45 AM
API pass through multiple values marekd1 Arduino Plugin (3P) 4 September 11th, 2017 07:52 AM
Sending multiple capi commands langenet HS3 Scripting 3 November 10th, 2016 05:59 AM
Sending Values to the LCD petez69 Arduino Plugin (3P) 0 February 2nd, 2016 07:15 AM
Changing multiple misc values trouty00 Script & Plug-In Development 3 January 27th, 2005 04:17 PM


All times are GMT -4. The time now is 04:40 PM.


Copyright HomeSeer Technologies, LLC