Announcement

Collapse
No announcement yet.

Initial deploy

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

    Initial deploy

    Hey all

    I use some global variables while on my hs client - so I can determine which screen I am on - it works well.
    One issue I have is if I deploy whilst not on my initial 'home' screen the global variable isn't reset.

    Is there a way to run some startup code on deployment?. Or some way of knowing that this is a first run? i.e. just been deployed - so then I can reset any globals I use.

    Cheers

    #2
    Can you describe how you proceed to determine the screen you are on?

    Comment


      #3
      Originally posted by 123qweasd View Post
      Can you describe how you proceed to determine the screen you are on?
      Sure

      I have a main screen ‘home’ ; selecting any icon e.g ‘kitchen’ , ‘bathroom’ etc. Simply sets the global var to that text.
      Then I have an event that runs every second and simply runs a script

      If current_screen = “kitchen” then ....

      Etc .

      Comment


        #4
        Thank you,
        however,
        ​​​unless you maintain multiple xml's this wont work across multiple clients.
        too bad this is not a native hstouch feature.

        Comment


          #5
          Originally posted by 123qweasd View Post
          Thank you,
          however,
          ​​​unless you maintain multiple xml's this wont work across multiple clients.
          too bad this is not a native hstouch feature.
          You are of course correct. Would be so much nicer if you could have global variables available to all clients ( as is now ) but also 'global' variables specific to a particular client. I really don't want multiple xml's - that's just too much work!. Can just hope that HS add this rather critical feature.

          Comment


            #6
            In case it has been missed, there is a way to determine which client has made a request (and without having multiple projects). I have implemented it, and it works quite well.

            https://forums.homeseer.com/forum/ho...nt#post1390216

            Comment


              #7
              Yes, it's already on my ever growing todo list
              Just wish the integration was done in the core product to minimize the extra scripting.

              Comment

              Working...
              X