Announcement

Collapse
No announcement yet.

Google Calender script from HS2 to HS3

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

  • Google Calender script from HS2 to HS3

    Hi All

    I have finallly migrated to HS3 but lost the use of my favourite script.

    Is there anyone with the know how (certainly not me ) could kindly convert this to use with HS3.

    I am sure there are many users that would like to use this like me.

    I dont know of any other plugins that do the same thing.

    Here is the script & settings file

    Help appreciated

    Thanks
    Attached Files
    Last edited by Stevieboy; February 26th, 2014, 08:13 AM. Reason: spelling corrected
    Steve

  • #2
    Take a look at BLGData for HS3. It has a 30 day trial for you to play around.
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


    • #3
      Blade

      Can your plugin fetch and annouce the google calender appointments for the day. ie

      You have a dentist at 3 .pm ?

      Cheers
      Steve

      Comment


      • #4
        What errors come up, I've taken a quick scan through and nothing jumps out at me as being different...it should just need minimal changes really for HS3 as you are not using and devices or events.

        Edit: Ahh, yeah a big problem is the HSGCal plugin that was written by Rick you are calling probably won't get to HS3. I do have an alternative script that would work with HS3 for Google Calendar (would need a little tweaking depending on your setup) but don't want to step on Blade's toes if you want to use his plugin (which would no doubt be a bit more polished).
        My Plugins:

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

        Comment


        • #5
          Thanks guys

          I have used this script for a couple of years now with no problems, I was not aware that ther was anything like it available. All I require is something that goes and fetches google calender appointments for the day and then annouces them (when I of course run the said event that triggeres the script.)

          So this is basically what I am after.

          Looked at Blades plugin but cannot see anything about being able to annouce appointments (unless this is setup using HS3 to annouce the device string maybe !!!

          Cheers
          Steve

          Comment


          • #6
            I use Blade's PI to announce appointments. Look at the scripting section.
            Don

            Comment


            • #7
              Thanks Don.

              Will take a peek

              Don, Do you mean the BLGdata plugin ?
              Steve

              Comment


              • #8
                Originally posted by mrhappy View Post
                I do have an alternative script that would work with HS3 for Google Calendar (would need a little tweaking depending on your setup)
                I have looked at Blades plugin. mighty impressive but perhaps a bit more than I require at this stage. Can you help with the alternative script ?

                cheers
                Steve

                Comment


                • #9
                  I was just testing it to see if it worked and for simple announcing tomorrow I can get it to work, I am not sure how you are setup but I have a work/non-work/holiday calendar, this script reads one calendar. Some setting up before though;

                  1) Drop Google.GData.AccessControl.dll, Google.GData.Calendar.dll, Google.GData.Client.dll and Google.GData.Extensions.dll into the main HS3 directory

                  2) Open your settings.ini file in the config directory, if you have no entries starting ScriptingReferences= then copy and paste this line;

                  ScriptingReferences=Google.Gdata.Calendar;Google.Gdata.Calen dar.dll,Google.Gdata.Client;Google.Gdata.Client.dll,Google.G data.Extentions;Google.Gdata.Extensions.dll,Google.GData.Acc essControl;Google.GData.AccessControl.dll
                  if you do already have an entry starting ScriptingReferences then add a comma at the end of the existing line and copy everything starting from Google.Gdata.Calendar to the line and save the file.

                  3) Place the script in the scripts directory, open the script and look at line at the top with the URL in it. Go into your Google Calendar settings page and look at the bottom for private/public URL's. Click the private URL button and then a URL appears, copy this URL into the URL line at the top of the script. Important: The end of the URL will say /basic, change this to /full.

                  4) The line

                  service.setUserCredentials("username@gmail.com", "password")
                  needs to be changed to your username and password (if you are worried about security then you could change this to read and encrypt from a file).

                  5) Create an event to run the script and it should announce the entries for that calendar tomorrow. You might need to change this line

                  query.EndTime = DateTime.Now.AddHours(28).ToString

                  to suit you, I run it at 8PM so have it announce for 28hrs after the script runs, if you were running it in the morning then you could reduce this to the remainder of hours left for the day. Alternatively you could change the start time/date to tomorrow instead.

                  Any problems let me know.
                  Last edited by mrhappy; January 20th, 2015, 10:13 AM.
                  My Plugins:

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

                  Comment


                  • #10
                    Thanks Mrhappy

                    much appreciated. I will see how I get on. Thanks also for the deatailed instructions

                    Cheers
                    Steve

                    Comment


                    • #11
                      Ok, followed instructions to the letter (I think)

                      Getting this error come up when I manully run the script to test it

                      Cheers
                      Attached Files
                      Steve

                      Comment


                      • #12
                        Can you paste the line you put in the configuration file?
                        My Plugins:

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

                        Comment


                        • #13
                          Do you mean this one in the HS config file ?

                          ScriptingReferences=Google.Gdata.Calendar;Google.Gdata.Calen dar.dll,Google.Gdata.Client;Google.Gdata.Client.dll,Google.G data.Extentions;Google.Gdata.Extensions.dll,Google.GData.Acc essControl;Google.GData.AccessControl.dll
                          nnThis


                          I just added this to the bottom of the text file, is that correct ?
                          Steve

                          Comment


                          • #14
                            Might be my fault that one, try putting that line somewhere under the [Settings] key, I just noticed a [Display] key is in the file, I thought there was just the one key so it needs to be somewhere in [Settings].
                            My Plugins:

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

                            Comment


                            • #15
                              Mr Happy

                              ok, moved line in settings file to under the [settings] but now get this error. Determined to get this to work. With your expertise of course
                              Attached Files
                              Steve

                              Comment

                              Working...
                              X