Announcement

Collapse
No announcement yet.

JSON vs ASP.NET

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

  • JSON vs ASP.NET

    I am writing my own web interface that needs to be available both from the LAN and WAN. I got some basic control over devices both using server side CAPI and client side JSON. But now I wonder what the right approach is. Personally, I prefer doing things on the server/HS side because it's easier to do things in C# than javascript and I can better separate the GUI stuff from the 'logic code'.

    However, there are more important concerns like security/encryption. With JSON I think I can use the MyHS url so you a) can't send commands without a username/password and b) that is encoded over https (but wouldn't it be visible in the html code?). Also what would work better with getting status changes back to the client so I don't need to use polling? What other concerns are there?

  • #2
    I want to say that the existing interface uses jquery and ajax callbacks so there is no polling involved. For example, if you manually control a device, the device is updated realtime in the GUI without polling.

    Rich provided a sample program on doing this on the old board. Depending on this new board, you might search for posts by 'rjh' with 'ajax' or 'sample' in the keywords.

    Sounds like a fun project!
    HS3Pro Running on a Raspberry Pi3
    64 Z-Wave Nodes, 168 Events, 280 Devices
    UPB modules via OMNI plugin/panel
    Plugins: Z-Wave, BLRF, OMNI, HSTouch, weatherXML, EasyTrigger
    HSTouch Clients: 3 Android, 1 Joggler

    Comment


    • #3
      Did you respond to the wrong thread because the answer doesn't seem to be related to the question as far as I can tell.

      Comment


      • #4
        Originally posted by mulu View Post
        Did you respond to the wrong thread because the answer doesn't seem to be related to the question as far as I can tell.
        It was more directed at the last 2 sentences than the rest
        HS3Pro Running on a Raspberry Pi3
        64 Z-Wave Nodes, 168 Events, 280 Devices
        UPB modules via OMNI plugin/panel
        Plugins: Z-Wave, BLRF, OMNI, HSTouch, weatherXML, EasyTrigger
        HSTouch Clients: 3 Android, 1 Joggler

        Comment


        • #5
          Ah, I see. Well, maybe there was a misunderstanding. It seems you are referring to the local web interface that allows you to configure HS. What I am working on is a solution to replace the HSTouch mobile app.
          I did search for the terms you mentioned but all I found is related to the HS configuration page. rjh also mentioned regular postbacks (like every 2 second). What I am looking for is a way that HS can push updates to the remote client. As you said, the local HS configuration page gets updates almost immediately. So how do they do that? And can this be done with remote clients, i.e. clients that are on the WAN rather than LAN?

          Comment

          Working...
          X