Announcement

Collapse
No announcement yet.

Known working BT dongles / BT stacks

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

    #76
    I am confused

    Originally posted by Emotion View Post
    Here is the vb.net routine I use to change the poll interval on the Bluetooth Connector to save phone battery power. You create an event when the mobile (cell) phone is detected and issue the following command (e.g.):

    ConfigureBluetooth(180, 5, R1)
    Where 180 is the Poll Delay, 5 is the number of retries before it gives up and R1 is the HomeSeer device code.

    When the phone is disconnected, you want to be able to quickly identify it again, so you'd create an event on Mobile phone disconnected and do the following .net command (e.g.):
    ConfigureBluetooth(10, 5, R1)

    vb.net code:

    Private Sub ConfigureBluetooth(ByVal PollDelay, ByVal LostConfirm, ByVal HsDevice)
    Dim SectionName, items, section
    Dim FoundSection As Boolean
    HsDevice = HsDevice.ToLower
    For ds = 0 To 50
    SectionName = "Device" & ds.ToString
    section = hs.GetINISection(SectionName, "hspi_bt.ini")
    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)) = HsDevice Then
    FoundSection = True
    Exit For
    End If
    End If
    Next
    If FoundSection = True Then 'Start configuring
    hs.SaveINISetting(SectionName, "PollDelay", PollDelay, "hspi_bt.ini")
    hs.SaveINISetting(SectionName, "LostConfirm", LostConfirm, "hspi_bt.ini")
    hs.Plugin("BT Connector").scanner.Devices(SectionName).ReloadConfig()
    Exit For
    End If
    Next
    End Sub

    How do I get this to work as I am getting:

    2/26/2012 9:19:20 PM - Error - Running script, script run or compile error in file: BTConnector.txt1025:Expected end of statement in line 3 More info: Expected end of statement


    And yes, I named the file "BTConnector.txt"!

    The event runs a "Run Script":

    "Run script: BTConnector.txt(ConfigureBluetooth(180, 5, X1))"

    Just can't get it to work.

    Comment


      #77
      At the beginning of the script, it is stated "VB.NET code"

      However you added a .txt extension to your script filename. Homeseer does not run .txt files as VB.NET. Use the .vb extension for this purpose.
      --
      stipus

      Comment


        #78
        Bluetooth dongle

        Kind of a newbie with this sort of thing but I'd like to give it a try. Anyone point me to a bluetooth dongle that works? I don't want to spend too much time downloading stuff, etc. Is there a dongle I can buy and it just works? This thread seems to indicate a lot of patches and stacks that I am not familiar with but I guess I'll have to look into it...

        Comment


          #79
          Originally posted by Emotion View Post
          Here is the vb.net routine I use to change the poll interval on the Bluetooth Connector to save phone battery power. You create an event when the mobile (cell) phone is detected and issue the following command (e.g.):

          ConfigureBluetooth(180, 5, R1)
          Where 180 is the Poll Delay, 5 is the number of retries before it gives up and R1 is the HomeSeer device code.

          When the phone is disconnected, you want to be able to quickly identify it again, so you'd create an event on Mobile phone disconnected and do the following .net command (e.g.):
          ConfigureBluetooth(10, 5, R1)

          vb.net code:

          Private Sub ConfigureBluetooth(ByVal PollDelay, ByVal LostConfirm, ByVal HsDevice)
          Dim SectionName, items, section
          Dim FoundSection As Boolean
          HsDevice = HsDevice.ToLower
          For ds = 0 To 50
          SectionName = "Device" & ds.ToString
          section = hs.GetINISection(SectionName, "hspi_bt.ini")
          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)) = HsDevice Then
          FoundSection = True
          Exit For
          End If
          End If
          Next
          If FoundSection = True Then 'Start configuring
          hs.SaveINISetting(SectionName, "PollDelay", PollDelay, "hspi_bt.ini")
          hs.SaveINISetting(SectionName, "LostConfirm", LostConfirm, "hspi_bt.ini")
          hs.Plugin("BT Connector").scanner.Devices(SectionName).ReloadConfig()
          Exit For
          End If
          Next
          End Sub
          Does this work when using the Widcomm stack?

          I have set this up and there are no errors in the log. But the Poll Time is not being changed?

          How to resolve?

          Thx!

          Comment


            #80
            You should try to reload the whole config

            hs.Plugin("BT Connector").ReloadConfig()
            --
            stipus

            Comment


              #81
              Originally posted by stipus View Post
              You should try to reload the whole config

              hs.Plugin("BT Connector").ReloadConfig()
              Do you mean for me to edit the VB code by replacing:

              hs.Plugin("BT Connector").scanner.Devices(SectionName).ReloadConfig()

              with

              hs.Plugin("BT Connector").ReloadConfig()

              If not, then can you tell where to add this?

              Thanks?

              Comment


                #82
                Blue Tooth Dongles that Work.

                I bought most of the available BT dongles, and some from china.
                Best local is the Belkin F8T017.
                Dont beleive everything you hear about the range of any of these devices. Best I could get was 30-40 ft from any class 1 or 2 dongle type BT adapter.The range is highly deminished from Wifi, cordless phones, sheetrock etc....

                What I recommend, is the Blotutek BTD-6610, its about a hundred dollars and expect three weeks delivery. When you get it, toss the antenna and replace it with a 18db gain antenna. (check Amazon)

                http://www.bolutek.com/Products_info.asp?id=267

                Now I know who is aproaching my house......... Before they ever get to the front door.

                Comment


                  #83
                  Hi,

                  who has tested the Bolutek or the Aircable with widcomm stack?

                  Which device would you recommend ?

                  Regards, Fischi

                  Comment

                  Working...
                  X