Blade's Plug-Ins Discussion :: View topic - Trying some text in HSTouch but not getting the formatting..
You are browsing the forum as a guest. Guest access has been disabled! Log in or register to access the full features of the message board.
Blade's Plug-Ins Discussion Forum Index
RegisterSearchFAQMemberlistUsergroupsChatLog in
Trying some text in HSTouch but not getting the formatting..
 
 
   Blade's Plug-Ins Discussion Forum Index » BLTouchString Plug-In View previous topic
View next topic
Trying some text in HSTouch but not getting the formatting..
Author Message
Techno_Goof
Active Poster
Active Poster


Joined: 05 Jun 2006
Member # 12
Posts: 281
Location: Dracut, MA USA


Post: #1   Post Trying some text in HSTouch but not getting the formatting.. Reply with quote
Trying to use this plug-in to fix some formatting issues but not having much luck. The device string in question is created by BLRadar, Check Motion Sensors.

Here is the text as it appears in HomeSeer:



and here is how it looks in HSTouch using this plug-in:

[$SCRIPT=&hs.Plugin("BLTouchString").GetFormattedDeviceString("Y49")]




Any ideas?

_________________
Bryan
Visit: www.techha.com , with HA Icons, Webring, Resources and Home of HAControl!
Sun Mar 28, 2010 5:03 pm View user's profile Send private message Visit poster's website
Blade
Site Administrator


Joined: 24 Apr 2006
Member # 2
Posts: 1705
Location: Lucan, Ontario


Post: #2   Post Reply with quote
Paste in the source of the of the device string.
Make sure to use the code tags

_________________
Cheers
Bob
Blade's Plug-In Web Site
Mon Mar 29, 2010 11:53 pm View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Techno_Goof
Active Poster
Active Poster


Joined: 05 Jun 2006
Member # 12
Posts: 281
Location: Dracut, MA USA


Post: #3   Post Reply with quote
I've attached the script that creates the code too.

Didn't you write this script? I can't remember if it came with BLRadar or not, lol. I know I didn't write it!

Code:

Const DEVICE_CODE as string = "y49"

Sub Main(ByVal param As Object)

dim msg as string = ""

msg = "<b>Check Motion Sensors:</b><br><table><tr><td align='center'><small><b>Sensor</b></small></td><td align='center'><small><b>Code</b></small></td><td align='center'><small><b>Bat Changed</b></small></td><td align='center'><small><b>Min. No Echo</b></small></td></tr>"

For Each Sensor As Object In hs.Plugin("BLRadar").MotionSensors
   if Sensor.NoEchoTime > 4320 then   ' 72 hours
      msg = msg & "<tr><td width='250'><small>" & Sensor.Name & "</small></td><td width='50' align='center'><small>" & Sensor.DeviceCode & "</small></td><td width='100' align='center'><small>" & Sensor.BatteryLastChange & "</small></td><td width='100' align='center'><small>" & Sensor.NoEchoTime & "</small></td></tr>"
   end if
Next
msg = msg & "</table>"

if msg = "<b>Check Motion Sensors:</b><br><table><tr><td align='center'><small><b>Sensor</b></small></td><td align='center'><small><b>Code</b></small></td><td align='center'><small><b>Bat Changed</b></small></td><td align='center'><small><b>Min. No Echo</b></small></td></tr></table>" then msg = msg & "<small>* There are no dead Motion Sensors</small>"

hs.SetDeviceString(DEVICE_CODE, msg.Trim, true)

msg = Nothing

End Sub


_________________
Bryan
Visit: www.techha.com , with HA Icons, Webring, Resources and Home of HAControl!
Tue Mar 30, 2010 12:28 am View user's profile Send private message Visit poster's website
Display posts from previous:    
   Blade's Plug-Ins Discussion Forum Index » BLTouchString Plug-In All times are GMT
 
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.