Announcement

Collapse
No announcement yet.

script OpenComPortEx issue ...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    script OpenComPortEx issue ...

    I am trying to convert some HS2 scripts to HS3 and seem to stuck with using OpenComPortEx.

    This works
    e = hs.OpenComPort(25, "9600,n,8,1", 1, "Test.vb", "DataReturn")

    but I need to specify a termination character.
    None of these work.

    e = hs.OpenComPortEx(25, "9600,n,8,1", 1, "Test.vb", "DataReturn",")")

    e = hs.OpenComPortEx(25, "9600,n,8,1", 1, "Test.vb", "DataReturn",chr(41))

    e = hs.OpenComPortEx(25, "9600,n,8,1", 1, "Test.vb", "DataReturn")

    HS3 Pro Edition 3.0.0.147 (Windows)

    Any help is appreciated.

    StevenE
    Why oh why didn't I just leave things alone, they had been working.

    #2
    Anyone?
    Why oh why didn't I just leave things alone, they had been working.

    Comment


      #3
      To use a termination character the function appears to now be hs.opencomportterm http://homeseer.com/support/homeseer...omportterm.htm

      Comment


        #4
        I should have mentioned I have tried

        e = hs.OpenComPortTerm(25, "9600,n,8,1", 1, "Test.vb", "DataReturn",")")

        OpenComPortTerm and OpenComPortEx give me an error.


        Error -- System.MissingMemberException: Public member 'OpenComPorTerm' on type 'hsapplication' not found. at Microsoft.VisualBasic.CompilerServices.Symbols.Container.Get Members(String& MemberName, Boolean ReportErrors) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.Object LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGe t(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at scriptcode25.VBWrapper.open(String parms)
        Why oh why didn't I just leave things alone, they had been working.

        Comment


          #5
          Unfortunately I have nothing I can actually test any COM ports with at the minute but double check your syntax because it says in the error:

          Public member 'OpenComPorTerm' on type 'hsapplication' not found

          whereas it should be OpenComPortTerm

          Comment


            #6
            Couldn't get opencomportex to work... even thought documentation states that it should...

            I did get hs.OpenComPortTerm to work once I deleted my script completely and started over. Then I realized my typo....

            Incorrect hs.OpenComPorTerm
            correct hs.OpenComPortTerm

            ComPort at least opened, now I have to do some more testing.

            Thanks for the help
            StevenE
            Why oh why didn't I just leave things alone, they had been working.

            Comment


              #7
              I am tempted to say that this has been left in the documentation by accident, using the miracles of intellisense you can see that the only two methods are OpenComPort and OpenComPortTerm.
              Last edited by mrhappy; January 20, 2015, 10:19 AM.

              Comment


                #8
                That would be nice if I could write a plugin. I can barely stumble through creating a script. Incorrect / outdated documentation just makes it worse.

                StevenE
                Why oh why didn't I just leave things alone, they had been working.

                Comment


                  #9
                  Originally posted by stevene View Post
                  That would be nice if I could write a plugin. I can barely stumble through creating a script. Incorrect / outdated documentation just makes it worse.

                  StevenE
                  Agreed on the documentation, I have only been looking at it the past couple of days and found quite a number of errors (particularly around what it says are optional parameters that are not). I have never used it but I believe tenScripting incorporates Intellisense so you can see where your problems are before chasing your tail around http://www.tenholder.net/tenWare2/te...3/Default.aspx

                  Comment


                    #10
                    Please put in a Bugzilla ticket on any help desk issue you find.
                    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                    Comment


                      #11
                      Originally posted by Rupp View Post
                      Please put in a Bugzilla ticket on any help desk issue you find.
                      Rupp, I am desperately trying to find some Christmas cheer, perhaps being at work all day has sucked any joy I had left out of me - I know you are trying to help.

                      It may look like I have more time on my hands than is healthy but I don't have the time nor do I think it is my (as a customer, or any other customers) job to spend time putting tickets into Bugzilla for documentation issues. For specific technical issues that I can see more of a reason to submit tickets but even then I find it odd a customer has to do this this way, I work in a large 10000+ employee organisation and there is not a chance on earth as an end user that I would be allowed anywhere near a bug reporting system.

                      A forum setup for bug reporting with a script that updates Bugzilla? That way at least all the bugs are in one place, regular moderation could move things out of the forum if they are not bugs and then they could be sent to plugin authors sub forums rather than bugs about third party plugins (I have seen a couple) sitting untouched in Bugzilla.

                      Comment


                        #12
                        Same here. End users typically do a horrible job on entering tickets. My analysts usually check behind the users to at least reproduce the problem and document it for the developers.
                        Rupp, almost all your responses are 'open a ticket'. Any chance to at least try and replicate the problem rather than bog down hst?

                        Sent from my SCH-R970X using Tapatalk
                        HS4Pro on a Raspberry Pi4
                        54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                        Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                        HSTouch Clients: 1 Android

                        Comment


                          #13
                          Well not to add more rain on your parade but if they are not entered into the Bugzilla system the likelihood of them being seen by the developer in charge of the documentation is nearly zero. We are all short on time and thus the issues of the help files not being complete and up to date. In addition the help files are always the last thing updated in a development cycle so they are often left orphaned and forgotten about. I try to send these types of requests but they tend to be overlooked by more higher priority "fires". So you can either take the time to update the message board or a Bugzilla ticket the later being the more important.
                          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                          Comment


                            #14
                            Originally posted by Rupp View Post
                            Well not to add more rain on your parade but if they are not entered into the Bugzilla system the likelihood of them being seen by the developer in charge of the documentation is nearly zero. We are all short on time and thus the issues of the help files not being complete and up to date. In addition the help files are always the last thing updated in a development cycle so they are often left orphaned and forgotten about. I try to send these types of requests but they tend to be overlooked by more higher priority "fires". So you can either take the time to update the message board or a Bugzilla ticket the later being the more important.
                            While I agree with this suggestion, I thought the documentation and support for com ports in HS3 changed significantly. Why is the the HS3 "way" to access com ports not be discussed? Rich mentioned in another post (I don't know where) that HS2 had the comport functions added because there was no other way. In HS3, there is another way and it is preferred over the HS2 way.

                            I wish I could find that so I could link to it.
                            huggy_d1

                            Automating made easy

                            Comment


                              #15
                              Originally posted by huggy_d1 View Post
                              While I agree with this suggestion, I thought the documentation and support for com ports in HS3 changed significantly. Why is the the HS3 "way" to access com ports not be discussed? Rich mentioned in another post (I don't know where) that HS2 had the comport functions added because there was no other way. In HS3, there is another way and it is preferred over the HS2 way.

                              I wish I could find that so I could link to it.
                              I believe Rich has been suggesting to use the .net Serial Port classes as in this example but HS3 has built in functions as well.
                              http://msdn.microsoft.com/en-us/libr...vs.110%29.aspx
                              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                              Comment

                              Working...
                              X