Announcement

Collapse
No announcement yet.

Operating HS from my watch - My first TIZEN app is up and running!

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

    Operating HS from my watch - My first TIZEN app is up and running!

    I looked all over if there was an app to control my HS lights from my fancy Galaxy Watch 3 and didn't find anything.

    What I DID find was the SDK for writing apps for Samsung watches, so as a weekend project I decided to give it a try.

    After some videos and trial and error, and after a lot of wiggling around with their ecosystem (packages, certificates, etc) I'm happy to report that I have a crude working version running on my watch. It provides a scrollable list of devices, and ON-OFF buttons for each which fire calls to the HS API.

    Once getting to know the libraries provided by Samsung, the files for this app should be pretty simple for someone familiar with html and js (I could post them if there is interest). I spent most of the time installing and getting to know the platform and all its tools, which includes an emulator.

    As I am not a software developer registered with Samsung, this app will never appear on their store (I wouldn't know how to do that). AFAIK the only way for someone to run something similar would be to install the whole development kit and from there pass the app to their own watch.

    At the moment the list of devices is hardcoded inside one of the app files, so adding a new device implies redeploying and reuploading. That part needs some improvement for sure, but I'm pleased with the results for now.
    Attached Files

    #2
    Very cool, kudos to you!

    Comment


      #3
      Very nice !

      Comment


        #4
        Would you mind sharing your code ? Either with github or zip email ...

        Comment


          #5
          Originally posted by sturgeon86 View Post
          Would you mind sharing your code ?
          Here are the relevant files.
          The first file takes an array with the list of all devices and generates an html list of URLs that call the 2nd file with the device parameters.
          The 2nd file makes an ajax call to the HS api with the parameters received.

          As you can see the device names, the device ids and the HS ip are hardcoded.
          Attached Files

          Comment


            #6
            Thanks for that. I just bought a Samsung Watch and might get my hands dirty to operate some HS device.

            Comment


              #7
              I did the same thing on a Gear S2 using the designer and Tasker several years ago, but this looks like a much more efficient way to do it. I'm familiar with the designer, but I have no idea where those config files go.

              Could you possibly give a quick description on how to implement the use of those files?

              Comment


                #8
                Originally posted by artstein View Post
                I'm familiar with the designer
                This is not done with the "Galaxy Watch Designer" (later renamed Galaxy Watch Studio). https://developer.samsung.com/galaxy.../overview.html

                This was done with the Tizen Studio SDK https://docs.tizen.org/application/tizen-studio/

                Comment


                  #9
                  Originally posted by etobian View Post
                  This is not done with the "Galaxy Watch Designer" (later renamed Galaxy Watch Studio). https://developer.samsung.com/galaxy.../overview.html

                  This was done with the Tizen Studio SDK https://docs.tizen.org/application/tizen-studio/
                  Well dang, this is going to be a lot more involved than the method I used a few years ago

                  A step-by-step on how to implement those files in the SDK would be super awesome and I'm sure I'm not the only one who would LOVE to know how to accomplish this.

                  Like I mentioned before, I've done this on a Gear S2 using Tasker and using the Galaxy Watch Designer... It was actually kind of nice because I had a layer on top of everything, so that one tap would bring up the menu for HS Events I had setup in Tasker. I wish it weren't so complicated, as I'm also sure that there are lots of people out there who desire home automation control from their wearable devices.

                  Comment


                    #10
                    The SDK is a very complete and complex environment. Just having it running on my computer took some doing. Running the emulator is also a thing, and setting up your watch to receive custom programs is a separate headache.
                    It includes several demo programs. I suggest you practice downloading those to your watch. Once you see the way those demos are structured you'll find the place for the files I wrote.

                    Comment

                    Working...
                    X