Announcement

Collapse
No announcement yet.

Sky (Sun and Moon) Project

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

    #31
    Originally posted by zwolfpack View Post
    Thanks. Appears there are significant differences when running under HS4 on Windows, which I didn't expect. I'll see if I can get something set up to test.
    Your kludged together scripts worked fine for me. I am not passing any parameters, so it is using the default locations as it should. The moon graphics are not working, this also may be dur to differences in the way Windows HS4 handles paths. I'll look into that later.

    Windows 10 Pro HS4 4.2.12.8

    Click image for larger version  Name:	capture.png Views:	0 Size:	125.7 KB ID:	1548825
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #32
      Originally posted by pcgirl65 View Post
      I tried your last script and every minute it is creating new devices for Altitude, Azimuth, Sun, Moon, etc. It also didn't put them into any Floor or Room.
      I am running the Moon-1 and Sun-1 scripts David posted in Events passing no parameters and they are working as expected.

      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

      Comment


        #33
        Originally posted by pcgirl65 View Post
        I tried your last script and every minute it is creating new devices for Altitude, Azimuth, Sun, Moon, etc. It also didn't put them into any Floor or Room.
        I found that the issue you reported now occurs on HS4-Linux as well. It used to work (still does on HS3), but has since become broken.

        The issue occurs during creation of the devices: the Floor/Room assignment and parent-to-child linking doesn't happen. Then on the next run, the previously created devices aren't found because of the missing Floor/Room ... so creates a new set ... over and over.

        I was able to find an alternate method that works on HS4 (Linux), which is attached. (Also added to Sky-projects.zip/scripts-1 folder, in the original post).

        Also rebuild the Moon images so all of them fit in a single post (#2). Reviewing the earlier instructions, it seemed likely that the images might not end up in the correct place on a Windows install. Simpler with all of them in one file.

        Comment


          #34
          Originally posted by randy View Post
          Your kludged together scripts worked fine for me. I am not passing any parameters, so it is using the default locations as it should. The moon graphics are not working, this also may be dur to differences in the way Windows HS4 handles paths. I'll look into that later.
          Missed your post ...

          In the moon image zip files folder names are 'Moon1' & 'Moon2', but they actually need to be combined into a single folder 'Moon' (under ./html/images/). I rebuilt the images so they would fit into a single post.

          Interesting that you didn't encounter the same issue that pcgirl65 reported and I confirmed. I have the latest non-beta release on a Linux system.

          Edit: looks like you don't have the Sun images loaded either. Those should be located in ./html/images/Sun/. Once you get the images in place, you should delete the Zodiac devices so those can get the value-graphics pairs set up properly.
          Attached Files

          Comment


            #35
            Originally posted by zwolfpack View Post

            Missed your post ...

            In the moon image zip files folder names are 'Moon1' & 'Moon2', but they actually need to be combined into a single folder 'Moon' (under ./html/images/). I rebuilt the images so they would fit into a single post.

            Interesting that you didn't encounter the same issue that pcgirl65 reported and I confirmed. I have the latest non-beta release on a Linux system.

            Edit: looks like you don't have the Sun images loaded either. Those should be located in ./html/images/Sun/. Once you get the images in place, you should delete the Zodiac devices so those can get the value-graphics pairs set up properly.
            All fixed.

            Click image for larger version

Name:	0852A0FC-ED7E-4AF7-8E28-092786C2552A.jpg
Views:	176
Size:	47.2 KB
ID:	1548855
            HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

            Comment


              #36
              This seems to be working now! Thank you! So I want to use this to lower the blinds when the sun gets to a certain point in the sky and it is shining into the windows. I guess I will need to watch it and see what the Azimuth number is when this happens. Is this correct?

              Click image for larger version

Name:	screencapture-192-168-1-15-8000-devices-html-2022-05-30-08_09_20.png
Views:	172
Size:	117.6 KB
ID:	1548918

              Comment


                #37
                Originally posted by pcgirl65 View Post
                This seems to be working now! Thank you! So I want to use this to lower the blinds when the sun gets to a certain point in the sky and it is shining into the windows. I guess I will need to watch it and see what the Azimuth number is when this happens. Is this correct?
                Great!

                The Altitude and Azimuth numbers are what you are interested in: https://www.britannica.com/science/altitude-angular

                I would think primarily altitude ... when less than some value, open the blinds.

                Azimuth increases over the course of the day. 180 degrees around midday.

                Cool site that might be helpful to visualize the variation over the course of the day/year: https://www.suncalc.org

                Comment


                  #38
                  Thanks, that is an interesting site. You can see where the sun will be anytime of the year. Just what I was looking for. Now my blinds will close properly throughout the year instead of me having to keep adjusting the time.

                  Comment


                    #39
                    Thanks David. This is working great . Here I have a recurrent 5 minutes event that triggers both hs4 version scripts (on linux)

                    Comment


                      #40
                      I just added this to my HS3 setup on windows 10.

                      Are the zodiac dates right? Maybe I don't understand exactly what they mean, but I thought sun was in Scorpio from Oct 23- Nov 21.



                      Click image for larger version

Name:	sky.jpg
Views:	138
Size:	64.3 KB
ID:	1577428

                      Comment


                        #41
                        Originally posted by prsmith777 View Post
                        Are the zodiac dates right? Maybe I don't understand exactly what they mean, but I thought sun was in Scorpio from Oct 23- Nov 21.
                        That's for the (astrological) "tropical" zodiac. The dates shown here are astronomical, calculated using IAU constellation boundaries.

                        https://en.wikipedia.org/wiki/Zodiac#Constellations

                        Astronomical date ranges change (slowly) over time.

                        Comment


                          #42
                          Cool thanks.

                          Comment


                            #43
                            Originally posted by zwolfpack View Post
                            Great!

                            The Altitude and Azimuth numbers are what you are interested in: https://www.britannica.com/science/altitude-angular

                            I would think primarily altitude ... when less than some value, open the blinds.

                            Azimuth increases over the course of the day. 180 degrees around midday.

                            Cool site that might be helpful to visualize the variation over the course of the day/year: https://www.suncalc.org
                            zwolfpack very neat scripts, thank you. I have installed and all looks good. I set up a sample event to trigger on the Moon's altitude angle value shown but it did not trigger my event. I looked up the moon's altitude HS4 device information and the value is not what the device shows.

                            It seems the number is rounded which is totally understandable considering the math performed. The device's angle displayed is the devicestatus.

                            This is probably right in front of me and I am having a senior moment but how can I trigger on a devicestatus?

                            Thanks for your help!

                            Comment


                              #44
                              disregard my question. I should have just put some more thought into it before I reached out...this works fine for me.

                              This comes in very handy, thanks again.

                              Attached Files

                              Comment

                              Working...
                              X