Announcement

Collapse
No announcement yet.

BT Connector 2.48.2.2 performance issues

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fischi
    replied
    Thanks Emotion,
    but I didn't understand what you mean.
    Could you give me more details ?

    Reg. Fischi

    Leave a comment:


  • Emotion
    replied
    It looks like the ds variable isn't being correctly defined by the For command above or that you've used the ds variable again perhaps outside of the For Next loop. Check what you've cut and pasted matches the code.

    Leave a comment:


  • Fischi
    replied
    Hi Emotion,

    After running your script to change the bluetooth poll delay for home/away

    I get the message:

    Script compile error: Der Name "ds" wurde nicht deklariert.on line 20

    Where is the issue ?

    Regards, Fischi

    Leave a comment:


  • Blinder
    replied
    Thanks for the scripts

    Looks like I'll be messing around with my first scripts.

    I still need to review these and figure out what Emotion's scripts are doing, it's obviouls that it's doing more than the obvious!

    There is no way I could have even started without some help.

    Thanks again!

    Leave a comment:


  • Emotion
    replied
    Hi Blinder,

    I have several iPhones registered of all different versions with the Bluetooth connector, they work OK with "ConnectService". I've found you must always pair your phone up with the PC with HomeSeer not running - works much faster. Then you must do the Bluetooth Connector stuff within HomeSeer fairly soon afterwards before the Bluetooth stack gets too busy - again, this just saves time.

    Here is a cut&paste of the Bluetooth routine taken from the Emotion application for HS which reconfigures the PollDelay and LostConfirm values to whatever you pass into the Sub.

    The important line is section = hs.GetINISection(SectionName, "hspi_bt.ini") which allows you to change the settings in hspi_bt.ini in the HomeSeer directory somewhere (I think in C:\Program Files\HomeSeer HS2\Config). Then you need to do a hs.Plugin("BT Connector").scanner.Devices(SectionName).ReloadConfig() to commit those changes and make them active without having to restart HomeSeer.

    Private Sub ConfigureBluetooth(ByVal PollDelay, ByVal LostConfirm, ByVal hcuc)
    Dim BtDevice As String
    Dim SectionName, items
    Dim section As String = ""
    Dim FoundSection As Boolean
    BtDevice = hcuc.ToLower
    For ds = 0 To MaxFriends
    SectionName = "Device" & ds.ToString
    Try
    section = hs.GetINISection(SectionName, "hspi_bt.ini")
    Catch : End Try
    If section = "" Then
    FoundSection = False
    Exit For
    End If
    items = Split(section, Chr(0))
    For I = 0 To UBound(items)
    If Strings.Left(items(I), 9) = "HsDevice=" Then
    If LCase(Mid(items(I), 10)) = BtDevice Then
    FoundSection = True
    Exit For
    End If
    End If
    Next
    If FoundSection = True Then 'Start configuring
    Try
    hs.SaveINISetting(SectionName, "PollDelay", PollDelay, "hspi_bt.ini")
    hs.SaveINISetting(SectionName, "LostConfirm", LostConfirm, "hspi_bt.ini")
    hs.Plugin("BT Connector").scanner.Devices(SectionName).ReloadConfig()
    Catch ex As Exception
    Try
    If My.Settings.Debug Then hs.WriteLogEx(My.Settings.ComputerSpoken, "Sub ConfigureBluetooth failed on hs.Plugin")
    Catch
    End Try
    End Try
    Exit For
    End If
    Next
    End Sub

    Leave a comment:


  • mterry63
    replied
    Here's another example script of how to change the polling interval.

    http://board.homeseer.com/showpost.p...2&postcount=57

    I agree it would be great if this were built in to the plugin.

    Leave a comment:


  • mterry63
    replied
    Changing the polling times has been posted in the forum before. Here's my BTProcessing.vb script. Call in an event with the paramer "ClientID|Interval". Note, the client ID can change if you add/modify clients.


    PHP Code:
    ''' <summary>
            ''' 
    Modify bluetooth client polling interval
            
    ''' </summary>
            ''' 
    <param name="Params">Client|Interval where Client is the bluetooth client device name as 
            
    ''' string and Interval is the time interval in seconds to poll</param>
            ''' 
    <remarks>This function changes the polling interval for a clientIt can be used
            
    ''' to make the polling interval longer when a client is detected or home and shorter
            ''' 
    once the client is not detected or awayThis allows the system to detect the client
            
    ''' faster on return without draining the battery while home.</remarks>
            Public Sub ChangePolling(ByVal Params As String)

                Dim Client As String
                Dim Interval As String
                Dim arrParm() As String

                arrParm = Split(Params, "|", -1, 1)
                Client = arrParm(0)
                Interval = arrParm(1)

                ' 
    Save the new PollDelay value
                hs
    .SaveINISetting(Client"PollDelay"Interval"hspi_bt.ini")
                
    ' Force the plugin to update the polling interval
                hs.Plugin("BT Connector").scanner.Devices(Client).ReloadConfig()
            End Sub 

    Leave a comment:


  • Blinder
    replied
    It seems like Emotion has

    Originally posted by darren-mc View Post
    That's a damm fine idea to change the polling if you are out of the house. Has anyone worked out how to do it?
    He has done it thru scripting. He also seems to be the only one who has figured out how to make Iphones work (I don't have one, so no biggie for me)

    Leave a comment:


  • darren-mc
    replied
    That's a damm fine idea to change the polling if you are out of the house. Has anyone worked out how to do it?

    Leave a comment:


  • Blinder
    replied
    Better someone smart, than me!

    I'd like to see an "away" poll time and a "home" pole time, but you might want to start fast polling as soon as the first pole is missed. I.E. if you have lost confirm set to >1 then "fast pole" mode is enabled. Just a thought.

    While I have had the plugin for a long time, it never liked any of my phones after I got rid of my original "dumb it's just a phone" phone. It does seem to like my Evo, so I'm totally jazzed that I might finally be able to use the connector again.

    With the fast poll, I might be able to achieve the ultimate goal of automatically un-locking the front door when someone arrives home. Yes, it could be done with rf-ID in a car, but IMHO, BT would be better since we share cars but don't share phones and I'd like to know who is acutally "home".

    Also, I'm still working (slowly) on screens for HSTouch so not having to do scripting for this would be great. One day, I'd like to learn to use scripts, but I'm not there yet.

    Thanks for the consideration.

    Robert

    Leave a comment:


  • Chak
    replied
    Also wondering how to setup poll delay of 180 seconds when phone in range.

    With the default settings(10seconds) was my iphone4 battery empty in 8 hours and my Imac was lossing keyboard connection every few minutes.

    I have set the delay to 180 secondes and the Iphone is not detected anymore.

    Leave a comment:


  • stipus
    replied
    That's a good idea !

    Leave a comment:


  • Blinder
    replied
    That's exactly how an occupancy sensor should work!

    Originally posted by Emotion View Post
    Hi Stipus, thanks for the quidk reply.

    OK, let me explain what I'm doing and perhaps you can guide me in the best way of doing it. What I've got at the moment has functionally worked very well over the last 3 months, it's just the new registration process that gets me - although from your description above I now understand about the heavy loading I'm putting on the Bloetools library.

    I have 10 mobile cell phones configured with a Poll Delay of 5 whilst in "Device Away" status for quick detection. As soon as one of them becomes "Device Detected" I programatically change the Poll Delay to 180 for that device to save phone power and I'm not too bothered about when they leave (sort of doorbell announce by name thing).

    I'm currently using DiscoverService, so all my devices are already paired. Can you think of a way I can have an early detection of a device without loading the BT stack to the extent that I have to restart HomeSeer to pair a new device?
    Emotion,

    I purchased this plug-in years ago and what you are doing is EXACTLY what the default behavior should be. It should poll quickly when away and then very slowly when home.

    Can you post how you do that? I need to start getting into scripting..

    Thanks!

    Stipus,

    There hasn't been much work done on the plug in, how about adding this feature?

    Leave a comment:


  • stipus
    replied
    The lib from btframeworks.com looks interesting.

    The good thing is it supports all BT stacks (MS, Widcomm, Toshiba and Bluesoleil), and there are many updates.

    The problem is the cost.... $350 for only 6 months... I'm not sure I can get the money back from plugin sales....

    The support forum is also full of problem reports, bugs with some stacks, memory leaks, unexpected crashes... etc.
    http://forum.btframework.com/index.php?board=55.0

    And from what I read, there is no function to get the RSSI level yet. The current plugin uses this to triangulate BT device position.

    Leave a comment:


  • Emotion
    replied
    Oh, OK - sorry to hear that. I guess you had to sell quite a few pluggins to break even for the cost of this. I was going to suggest the library from btframework.com which was last updated 2 weeks ago, but the cost of a commercial license is even worse!

    I feel guilty complaining now

    Leave a comment:

Working...
X