Announcement

Collapse
No announcement yet.

AddDevice??

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

    AddDevice??

    I am struggling with updating an HS2 script to HS3. I am trying to add an X10 device, with proper properties etc. I can not even find the AddDevice function in the HS3 documentation. An example of the vb.net code that will do this would be helpful.

    Thanks
    Gary

    #2
    I don't remember AddDevice in HS2 at all but if you want to create a device NewDeviceRef will work.

    Comment


      #3
      Originally posted by mrhappy View Post
      I don't remember AddDevice in HS2 at all but if you want to create a device NewDeviceRef will work.
      Sorry for my brain fart MrHappy, the AddDevice function was MY HS2 vb.net function. I was/am using the hs.NewDeviceRef function to create the device. Actually I did get a start after locating another thread with your post of code doing something like what I am trying to do.

      After some trial and error, I can create the devices just fine and set the string value as I need (updating Weather Station data).

      Incidentally, if you don't mind me asking, how do you paste code into one of these posts so you don't lose the indents? I tried taking it straight from VS Express 2013 but when I pasted it in and used the Code (#) function it was still left justified in the preview. Just wondering.

      Thanks
      Gary

      Comment


        #4
        Code:
         
                            If splValues(6) <> String.Empty Then
                                rblAdminService.SelectedValue = "ServiceName"
                                txtAdminOraServiceName.Text = splValues(6)
                                'txtOraServiceValue.Style("top") = "-65px"
                            End If
        I wrapped the code tags around this from VS2015 and it maintained the indention.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          Originally posted by Rupp View Post
          Code:
           
                              If splValues(6) <> String.Empty Then
                                  rblAdminService.SelectedValue = "ServiceName"
                                  txtAdminOraServiceName.Text = splValues(6)
                                  'txtOraServiceValue.Style("top") = "-65px"
                              End If
          I wrapped the code tags around this from VS2015 and it maintained the indention.
          Interesting, what browser are you using? It works for me using Chrome and Firefox, but fail using IE (11) every time.

          Gary

          Comment

          Working...
          X