Announcement

Collapse
No announcement yet.

BlueTooth Connector Features and Documentation

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

    #46
    Originally posted by plfinch
    The latest version was posted on February 27th and expired March 1st. Heck, even milk lasts 10 days or so!



    Peter
    Hahaha. You gotta cut stipus some slack, was just an oversight but he is working hard on his plugins to get them as people want.. I believe he is down to 2 hours sleep per night

    Comment


      #47
      I surely meant it in jest!

      Was kind of funny though that today, the day I finally decide to try out this bluetooth plugin after all the buzz, it won't run after I install it.

      I will try again later today hopefully when the new version is uploaded!

      Peter

      Comment


        #48
        Peter, I know you ment it in jest

        Comment


          #49
          Originally posted by stipus
          Yes sorry, I forgot the expiration date... As soon as the web interface for device values and device strings is finished, I'll publish a new version...

          It should be out in a few hours.

          stipus
          No worries just as long as I am not going utterly mad!

          Comment


            #50
            Should be ready in a few minutes.... I'm adding some more debug info just in case.
            --
            stipus

            Comment


              #51
              Here is version 0.26 of the Bluetooth Connector (see attached zip)

              Change Log:

              - Pushed expiration date to the 8 of March. After this date (and if no bug have been found) this will be a paid plugin ($20)

              - Added a web Configuration interface to set homeseer device values and device strings after each poll cycle. You can get to this interface by clicking the "Configure" buttonlink in the bluetooth device list.

              - The plugin and Web Configuration interface have been tested on HomeSeer versions 2.0.2041 and 2.0.2070.

              To install or update:

              Shutdown HS2
              Unzip the attached file (without flattening the file tree)
              Copy all files and subdirectories to the HomeSeer 2 directory.
              Restart HS2

              [EDIT] Attachement temporarily removed because of a bad bug in string and values.
              Last edited by stipus; March 1, 2006, 04:51 PM.
              --
              stipus

              Comment


                #52
                Stipus, I now get this error using .26 with 2070

                remote networks not supported yet
                Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

                Exception Details: System.Exception: remote networks not supported yet

                Source Error:

                An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

                Stack Trace:


                [Exception: remote networks not supported yet]
                System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessag e(IMessage reqMsg, IMessage retMsg) +264
                System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) +877
                HSPI_BT.BtScanner.ScanForNewDevices() +0
                hspi_bt_web.DeviceList.scanButton_Click(Object sender, EventArgs e) +26
                System.Web.UI.WebControls.Button.OnClick(EventArgs e) +83
                System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEven tHandler.RaisePostBackEvent(String eventArgument) +57
                System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
                System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
                System.Web.UI.Page.ProcessRequestMain() +1292


                This is with the Widcomm stack

                Comment


                  #53
                  I need a refresher. For the Microsoft stack, what are all possible values for @(Network0) if the BT device is in range? And what will the value be if the BT device is not found? Likewise for WidComm? I am having some trouble getting the boolean conditions to work. For now, just want the device status to show as "Home" or "Away".

                  Thanks!

                  Peter

                  Comment


                    #54
                    For the Widcomm this is what I am using, Seems to work fine.

                    HsConfig0=2,Too Close, @(Network0) > 1
                    HsConfig1=1,Home, @(Network0) > -15
                    HsConfig2=0,Away, true

                    Comment


                      #55
                      Peter,

                      For the Microsoft stack, the only 2 possible values are:

                      Negative value Int32.MinValue = -2147483648 means away
                      Zero value = 0 means in range

                      For the Widcomm stack, it's written in the bluetooth SDK that values should be between -10 (too low signal), 0 (normal signal strength) and + 10 (too strong signal strength. However, I experienced myself values between -15 and + 15. Value -2147483648 means away as with the MS stack.


                      Trojan,

                      I don't really understand how this could happen. This means the ComputerSid= entry in the [Network0] section of hspi_bt.ini is wrong. Did you copy the hspi_bt.ini config file between 2 computers ?

                      Try to shut down HS2, delete the whole [Network0] section in Config/hspi_bt.ini and restart HS2.
                      Last edited by stipus; March 1, 2006, 04:03 PM.
                      --
                      stipus

                      Comment


                        #56
                        Okay. I have the MS stack and a BT phone. If I leave everything alone (no user defined conditions on the device), the HS device status changes to 1 (On) or 0 (Off) as expected when I turn my phone on and off. But if I instead configure the device as follows it always shows "Home" regardless of whether my phone is on or off.

                        HsConfig0=1,Home,@(Network0)=0
                        HsConfig1=0,Away,true

                        I actually configured the condition inside the plug-in Config but the above is what the ini was changed to. Also tried the example on the config page:

                        HsConfig0=1,Home,@(Network0)>=0
                        HsConfig1=0,Away,true

                        and even:

                        HsConfig0=0,Away,@(Network0)=-2147483648
                        HsConfig1=1,Home,true

                        No matter which of these I use, the device always shows as "Home" regardless of what I do to the phone. Yet if I delete all the conditions the device status does change between 0 and 1 based on the phone.

                        Peter

                        Comment


                          #57
                          Here's the debug log. The plug-in definitely sees the phone at strength 0 until I turn it off and then correctly shows the large negative value for strength. But the device status never changes.

                          <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>3/1/2006 5:06:16 PM </TD><TD class=LOGType0 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry0 align=left colSpan=8>Polling Peters Phone (Method=DiscoverService) on Network0 returned signal strength=0</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>3/1/2006 5:06:27 PM </TD><TD class=LOGType1 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry1 align=left colSpan=8>Polling Peters Phone (Method=DiscoverService) on Network0</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>3/1/2006 5:06:27 PM </TD><TD class=LOGType0 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry0 align=left colSpan=8>Service discovery started for device Peters Phone</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>3/1/2006 5:06:32 PM </TD><TD class=LOGType1 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry1 align=left colSpan=8>Service discovery finished for device Peters Phone</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>3/1/2006 5:06:32 PM </TD><TD class=LOGType0 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry0 align=left colSpan=8>Polling Peters Phone (Method=DiscoverService) on Network0 returned signal strength=0</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>3/1/2006 5:06:43 PM </TD><TD class=LOGType1 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry1 align=left colSpan=8>Polling Peters Phone (Method=DiscoverService) on Network0</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>3/1/2006 5:06:43 PM </TD><TD class=LOGType0 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry0 align=left colSpan=8>Service discovery started for device Peters Phone</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>3/1/2006 5:07:03 PM </TD><TD class=LOGType1 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry1 align=left colSpan=8>Error while polling PetersPhone: Service lookup timed out</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>3/1/2006 5:07:03 PM </TD><TD class=LOGType0 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry0 align=left colSpan=8>Polling Peters Phone (Method=DiscoverService) on Network0 returned signal strength=-2147483648</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>3/1/2006 5:07:14 PM </TD><TD class=LOGType1 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry1 align=left colSpan=8>Polling Peters Phone (Method=DiscoverService) on Network0</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>3/1/2006 5:07:14 PM </TD><TD class=LOGType0 align=left colSpan=3>BT Debug </TD><TD class=LOGEntry0 align=left colSpan=8>Service discovery started for device Peters Phone</TD></TR></TBODY></TABLE>

                          Comment


                            #58
                            I just found this myself and removed the 0.26 attachment.

                            There is a problem in the string evaluation procedure (expressions always evaluate to false). I didn't have time to check everything after I added DebugMessages, because I had to go to a basket match... my bad !

                            A new checked version will be released in a few minutes.
                            --
                            stipus

                            Comment


                              #59
                              Okay, thanks for the prompt follow-up! I was fearful it was yet another one of those problems that only affect me!

                              Peter

                              Comment


                                #60
                                Here is version 0.27 of the Bluetooth Connector

                                Change log:

                                - Changed a few text messages in the web config interface.
                                - Fixed a stupid bug in the expression evaluator...

                                Just for you to know how stupid this was: in a hurry just before releasing 0.26 and leaving to the basket match, I decided to add more debug info.

                                I replaced this very simple code:

                                PHP Code:
                                return m_expressionEval.EvaluateBool(); 
                                with this one:
                                PHP Code:
                                bool returnBool false;
                                try 
                                {
                                m_expressionEval.EvaluateBool();
                                }
                                catch
                                {
                                m_btDevice.BtScanner.hspi.LogStringHSPI.IFACE_NAME"Error while evaluating the expression [" m_expressionEval.Expression "] for device " m_btDevice.Name );
                                }
                                return 
                                returnBool
                                If you follow this code, returnBool was never assigned a value other than false !

                                The line inside the try{} block has now been fixed to:
                                PHP Code:
                                returnBool m_expressionEval.EvaluateBool(); 
                                And for your information, we lost the basket match. 1 point


                                [EDIT] package has been removed as it should be available soon from the HomeSeer updater.
                                Last edited by stipus; March 7, 2006, 08:43 PM.
                                --
                                stipus

                                Comment

                                Working...
                                X