Announcement
Collapse
No announcement yet.
no F to display in HS
Collapse
X
-
Ty,
I thought you would use more than that for updateing a device in MainLobby. If you can't get the plugin to change I would setup an event that triggers on device value change or device status change on the device that is holding the temp and simply parse this device and populate a new device with only the temp number.
Comment
-
This script snippet will strip off all characters that are NOT numeric, ".", "+", or "-". Note that this code is setup to handle multiple temp sensors that are stored in an array that is dimensioned by "i" and will require a small modification to work for a single temperature.
PHP Code:For i = 1 to Sensor_qty
num = ""
For k = 1 To Len(Tnow(i))
On Error Resume Next
c1 = Mid(Tnow(i), k, 1)
' hs.speak "c1 " & c1
If IsNumeric(c1) Or c1 = "." or c1 = "+" or c1 = "-" Then
num = num & c1
Else
Exit For
End If
' c1 = "" 'adds a null in case it is already empty ??
Next
Tnow(i) = num
Next
Comment
-
Rupp and Jeff,
Thanks for your help!!
I know NOTHING about scripting so can you please be a little more specific in what info I need to get you?
There are 3 Temps I need to change:
Heat Set Point
Cool Set Point
Current Temp
Rupp, You asked for the exact info that are in those "fields". Were do I find that info? I want to make sure I get you exactly what you need. (all I ever do are rules through HS)
I really cant thank you enough! This plugin is fantastic and it is this last little snag that is killing me.
Thanks
Ty
Comment
-
Ty,
Set up a manual event that's action is "run script". Then select the "switch to advanced view" option. In the Existing or new script name: enter deviceString.txt. Then select the open script window button. Enter this info.
sub main()
msgbox(hs.deviceString "A1")
end sub
Then select update and then test. A message box should pop up with the Device string of the device you need to edit. Post this device string for each of the devices you listed in the post prior to this one.
Comment
Comment