Announcement

Collapse
No announcement yet.

JSON Sample Application

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

  • JSON Sample Application

    The following application is a .NET Windows Forms app that will get and control HomeSeer using JSON. It can be used as the basis for your own control application.

    The zip file contains a vb.net project that can be used by developers to access the JSON interface in HomeSeer.

    http://homeseer.com/updates3/JSONPost.zip
    website | buy now | support | youtube

  • #2
    How about a little more info! What is this zip file? Is it text, exe, where to install, what is a "windows forms app"? I am using JSON in single line statements to control various HS3 devices. Why do I need an app?

    Steve Q


    Sent from my iPad using Tapatalk HD
    HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
    2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

    Comment


    • #3
      Originally posted by Steve Q View Post
      How about a little more info! What is this zip file? Is it text, exe, where to install, what is a "windows forms app"? I am using JSON in single line statements to control various HS3 devices. Why do I need an app?

      Steve Q


      Sent from my iPad using Tapatalk HD
      Whilst I can't answer for Rich, I believe this is an updated application that was posted when the JSON interface first came out. From looking at it all it does is provide an example method of how to talk to HS from a Visual Basic forms based application using the JSON interface, and it looks for people who want to design their own user interfaces or control methods in different applications. You don't need it but it is there if you want it...
      My Plugins:

      Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
      Yeelight 3P | Nanoleaf 3P

      Comment


      • #4
        Thanks for the quick response. I am overwhelmed right now with my transition from HS2 to HS3. The forum is getting so big, it's like a full time job trying to "browse" through it! I have a lot of things going and I just don't have time to try to figure out the details. I wish everyone could include the basic what, where, when, and why info.

        Thanks MrHappy, you're programming knowledge is the best!

        Steve Q

        Sent from my iPad using Tapatalk HD
        HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
        2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

        Comment


        • #5
          Here's how I installed it with Visual Studio 2012:
          • Create a new Windows Form Project in VS, named JSONPost.
          • Close the project.
          • Unzip the file into your Projects folder under:
          • C:\Users\xxxxxx\Documents\Visual Studio 2012\Projects\JSONPost
          • Open the project.
          • Press F5 to run.


          From there, you can test the app, examine the code, make changes, etc.
          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


          • #6
            Originally posted by Steve Q View Post
            Thanks for the quick response. I am overwhelmed right now with my transition from HS2 to HS3. The forum is getting so big, it's like a full time job trying to "browse" through it! I have a lot of things going and I just don't have time to try to figure out the details. I wish everyone could include the basic what, where, when, and why info.

            Thanks MrHappy, you're programming knowledge is the best!

            Steve Q

            Sent from my iPad using Tapatalk HD
            I'll take the compliment of course but if I was any good at it I would be doing it for a living!!!

            I know the feeling in the forum getting big - IMHO some of the forums should be combined so the place looks smaller, there are some forums that have not been posted in for seven years and easily overlap other forums. That's another topic for another day though...
            My Plugins:

            Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
            Yeelight 3P | Nanoleaf 3P

            Comment


            • #7
              I updated the description, but what others have posted is correct. This is for .net developers.

              Originally posted by Steve Q View Post
              How about a little more info! What is this zip file? Is it text, exe, where to install, what is a "windows forms app"? I am using JSON in single line statements to control various HS3 devices. Why do I need an app?

              Steve Q


              Sent from my iPad using Tapatalk HD
              website | buy now | support | youtube

              Comment


              • #8
                Thanks for the added information.

                Steve Q


                Sent from my iPad using Tapatalk HD
                HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                Comment


                • #9
                  Well this is about 11 months old. But it is the only example I can find that uses JSON from a compiled windows Form vb.net app.

                  I can't get it to work with VS 2015. Anyone know whether it still works with the updated HS3?

                  Comment


                  • #10
                    Originally posted by frankc View Post
                    Well this is about 11 months old. But it is the only example I can find that uses JSON from a compiled windows Form vb.net app.

                    I can't get it to work with VS 2015. Anyone know whether it still works with the updated HS3?
                    I have just loaded it into VS Community 2015 and it works fine - what bits don't work for you?
                    My Plugins:

                    Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
                    Yeelight 3P | Nanoleaf 3P

                    Comment


                    • #11
                      Odd! Of course, why wouldn't it work?

                      I loaded it into VS Community 2015. I ran the debug and I also compiled it and ran it as an exe. I am doing this on my HS3 PC. I entered the LAN IP of Homeseer (didn't include the port).

                      I tried the 'Speak' test. Also attempted to control a device with its reference #. Tried to initiate an event.

                      I did a trace of it as it ran. It didn't crash or create an error. But I don't understand the statements well enough to know where it failed. I did look at assigned values to the variables and the ones I looked at seemed proper. I expected to see some 'hs.' statements, but didn't see one.

                      Thank you for the reply MH. Glad to hear it should work for me.

                      Comment


                      • #12
                        Originally posted by frankc View Post
                        Odd! Of course, why wouldn't it work?

                        I loaded it into VS Community 2015. I ran the debug and I also compiled it and ran it as an exe. I am doing this on my HS3 PC. I entered the LAN IP of Homeseer (didn't include the port).

                        I tried the 'Speak' test. Also attempted to control a device with its reference #. Tried to initiate an event.

                        I did a trace of it as it ran. It didn't crash or create an error. But I don't understand the statements well enough to know where it failed. I did look at assigned values to the variables and the ones I looked at seemed proper. I expected to see some 'hs.' statements, but didn't see one.

                        Thank you for the reply MH. Glad to hear it should work for me.
                        I would be double checking whether or not you have the JSON interface in HS enabled (it is an option in the setup pages) - go to http://192.168.1.4/JSON?request=getevents (replacing IP as appropriate) and see if you get any output.
                        My Plugins:

                        Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
                        Yeelight 3P | Nanoleaf 3P

                        Comment


                        • #13
                          I do have JSON enabled. And I do get data returned when I include the port number, which isn't 80. I first tried it without the port and got nothing.

                          I need to try the JSONPost script with the port number.

                          I was trying to find a way to pass data to HS3 from an exe. And that sample script seemed to fill the bill. I was hoping to find something a little more concise than that.

                          I will try with a port number included.

                          Thank you for the help!

                          EDIT: It works! The port number needs to be added to the LAN IP. Thank you!
                          Last edited by frankc; August 7th, 2016, 07:08 AM. Reason: Update on test

                          Comment


                          • #14
                            Originally posted by frankc View Post
                            I do have JSON enabled. And I do get data returned when I include the port number, which isn't 80. I first tried it without the port and got nothing.

                            I need to try the JSONPost script with the port number.

                            I was trying to find a way to pass data to HS3 from an exe. And that sample script seemed to fill the bill. I was hoping to find something a little more concise than that.

                            I will try with a port number included.

                            Thank you for the help!

                            EDIT: It works! The port number needs to be added to the LAN IP. Thank you!
                            I mean you can call HS directly by using the DLL's but that may be overkill for your circumstance I don't know - I posted some example code here - http://forums.homeseer.com/showthread.php?t=165591
                            My Plugins:

                            Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
                            Yeelight 3P | Nanoleaf 3P

                            Comment


                            • #15
                              I believe that might just do it. My sprinkler control script runs the sprinklers when required, and I decided to add a manual way to do the same thing. So I wrote a VB.net windows form application. But couldn't figure out how to incorporate the windows form class into HS3 as a script. So I compiled it and figured I would run it as an exe, but still couldn't send data to HS3 for the control.

                              Your example will probably work to do that.

                              Thanks

                              Comment

                              Working...
                              X