Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar #360

Closed
wants to merge 446 commits into from
Closed

Calendar #360

wants to merge 446 commits into from

Conversation

hplato
Copy link
Collaborator

@hplato hplato commented Jan 11, 2014

My first attempt at a pull request. Adding in Calendar v4 stuff;

  • some bug fixes
  • Added https as a transfer method (requires a manual install of Perl Crypt::SSLeay)
  • Added a 'control calendar'. Events with the name of an item will be turned on at event start, and off at event end.
  • Slightly modified web/organizer/calendar.pl so that any calendars marked as control don't show in the web view.

krkeegan and others added 30 commits October 5, 2013 12:34
…ng-Complete

Rather than clear the linking mode command when the device ACKs, wait to clear the message until the PLM reports the linking success.
…sponder Hash

Attempted to make the code more readable by using more descriptive variable names.

Created a responders and controllers hash, this makes the looping of the hash members a bit more straightforward at the cost of adding another global variable.  Alternatively, another level of keys could be added to global scene hash to decrease the number of global variables
Oops, forgot to declare the new hashes as globals
…p_Count

Moved per device setting outside of logic so that they are checked even if a hop_count is not passed.
Insteon_Scene_Build: Attempt to Make Code More Readable
Only Cooling and Heating statuses appear to be supported.  Bits 4 and 6 are also always enabled, I don't currently know what these are.  Sadly, humidifying and dehumidifying do not appear to be supported.
This allows for per device _process_message subs to exist without needing to reproduce all of the eval code.
…h Request_Status

This more closely matches what the user would expect
Conflicts:
	lib/Insteon.pm
	lib/Insteon/BaseInsteon.pm
	lib/Insteon_PLM.pm
…Nomenclature

Heating, Cooling, ... should be humidifying and the like
There does not appear to be any request which can be made to the device to get the status of the Humidifying or Dehumidifying group (perhaps a direct request to each device->group would work)

But in order to make sure that the two groups are in the proper state after a call to request_status we just manually set them inside the code
html_alias_cache is defined as data_dir/cache by default.  Most installations will only require the data_dir to be defined, only those with special installations would need the cache dir to be outside the data_dir.

Closes hollie#229
Basically just a copy of code for RemoteLincs, however, TriggerLincs support even fewer commands so much of the code was cut down.

I put the code in the Security.pm file as these are ostensible security devices, however as noted above, these are very similar to RemoteLincs.  Although, they are not that dissimilar from Motion sensors which are also in this file.

I don't own a TriggerLinc so this coding is all done blind.

Thanks to @JaredF for his testing work.

Closes hollie#245
…a Scene

If no contoller existed, prior code would throw a recoverable error.

This addition prevents the error and provides a readable error message in the print_log
	modified:   code/common/organizer.pl
	modified:   web/organizer/calendar.pl
	modified:   bin/ical2vsdb
	modified:   code/common/organizer.pl
	modified:   web/organizer/calendar.pl
@krkeegan
Copy link
Collaborator

Howard, you branch appears to be properly formatted. However, you submitted this as a pull request to the "stable" branch rather than the development "master" branch.

  1. Load your branch on github:

image

  1. Click the green button to the left of the branch name

image

  1. Once the compare loads, click edit on the far right

image

  1. On the left hand side, select the drop down for branch and change it from stable to master

image

  1. Then wait a few moments while github does its thing.
  2. Then click the following self descriptive link:

image

  1. Enter the necessary details and click:

image

That ought to do it.

@hplato
Copy link
Collaborator Author

hplato commented Jan 11, 2014

Thanks Kevin, I appreciate the note,

So I do this, and git wants to send 10 commits, and 54 changed files — basically everything in my github/hplato/misterhouse.git?

I just want commit 1555d13 to be pulled.

I didn’t click the ‘Send Pull Request’, as I don’t want all those files to be included (like a bunch of customization I did to the CID system to get callerid to pull names from the contact database. It’s neat, but might break other’s stuff)

howard

On Jan 11, 2014, at 12:53 PM, Kevin Robert Keegan notifications@github.com wrote:

Howard, you branch appears to be properly formatted. However, you submitted this as a pull request to the "stable" branch rather than the development "master" branch.

Load your branch on github:

Click the green button to the left of the branch name

Once the compare loads, click edit on the far right

On the left hand side, select the drop down for branch and change it from stable to master

Then wait a few moments while github does its thing.

Then click the following self descriptive link:

Enter the necessary details and click:

That ought to do it.


Reply to this email directly or view it on GitHub.

@krkeegan
Copy link
Collaborator

Ahh, ok this means then that your Calendar branch has all of these commits. I don't know how you created the calendar branch, but the following is how I do things, hope this helps:

My master branch is my repo is set as a tracking branch of the hollie/master branch just to make my life easier. Whenever I start a new branch I do the following:
git checkout master
git checkout -b new_branch

This basically starts new_branch as a branch off of master. I then apply all of my related changes to this new_branch and commit them. You need to keep each separate topic in separate branches.

But sometimes I have mutliple topics going at once. When this happens I use my "running" branch. I then merge all of my outstanding branches into this running branch. This allows me to test things together. But when I submit my pull request I do it from new_branch, not running.

In your case I think you want to do the following:

git checkout master
git checkout -b Calendar_2
git cherry-pick 1555d1357f54b63f8ab14ffad986e00a04f8ce65
git push origin --all

Then make a pull request from this new Calendar_2 branch.

Kevin

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

OK, I followed those steps, and the git cherry-pick seemed to take just the 3 files.

I couldn’t push to origin (as it seems to push to hollie), so I had to git push https://github.com/hplato/misterhouse.git

At this point I go to github, and see the new branch, create a pull request and….see 59 files.

Maybe I messed something up when I migrated from SVN to git, or that my ‘master’ branch which was cloned from hollie is in effect a ‘running’ branch — having all my local customizations?

On Jan 11, 2014, at 2:54 PM, Kevin Robert Keegan notifications@github.com wrote:

Ahh, ok this means then that your Calendar branch has all of these commits. I don't know how you created the calendar branch, but the following is how I do things, hope this helps:

My master branch is my repo is set as a tracking branch of the hollie/master branch just to make my life easier. Whenever I start a new branch I do the following:
git checkout master
git checkout -b new_branch

This basically starts new_branch as a branch off of master. I then apply all of my related changes to this new_branch and commit them. You need to keep each separate topic in separate branches.

But sometimes I have mutliple topics going at once. When this happens I use my "running" branch. I then merge all of my outstanding branches into this running branch. This allows me to test things together. But when I submit my pull request I do it from new_branch, not running.

In your case I think you want to do the following:

git checkout master
git checkout -b Calendar_2
git cherry-pick 1555d13
git push origin --all
Then make a pull request from this new Calendar_2 branch.

Kevin


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Hey Howard,

are you sure you want to cherry-pick only 1555d13 ? This is only the update of the comments in the header of the code as far as I see in the diff.

I think you made multiple changes to the three files over time and you committed them intermixed with some ad2usb changes. Since they were (I assume?) not applied in a separate branch you cannot with a single command apply them to the current master.

What I propose to have a clean pull request:

  • make a new clone from your repo somewhere in a separate folder on your disk, checkout the master branch and ensure it is up to date with hollie/misterhouse.git
  • git checkout -b Calendar_3
  • copy the files you want to be in the pull request in the clone on your computer
  • stage, commit
  • push calendar_3 to your repo on Github
  • create the pull request as Kevin described.

That should create a clean and mean pull request containing only the changes you want to be in the pull request.

Lieven.

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

Thanks lieven. I think the problem is that my 'master' has around 54 different files that hollie/master, so git is trying to push those as well.

I think i need to restructure, so that 'master' is a true replica of master, and create a running branch with all my local changes. This doesn't seem trivial, and i'll need to make copies and then identify all the changed files to pull into running.

As this is will take a while, can you add these to a branch somehow to get some testing. I'd like for it to be added for the upcoming 3.1 release.

Sent from my mobile device.

On Jan 12, 2014, at 12:20 PM, Lieven Hollevoet notifications@github.com wrote:

Hey Howard,

are you sure you want to cherry-pick only 1555d13 ? This is only the update of the comments in the header of the code as far as I see in the diff.

I think you made multiple changes to the three files over time and you committed them intermixed with some ad2usb changes. Since they were (I assume?) not applied in a separate branch you cannot with a single command apply them to the current master.

What I propose to have a clean pull request:

make a new clone from your repo somewhere in a separate folder on your disk, checkout the master branch and ensure it is up to date with hollie/misterhouse.git
git checkout -b Calendar_3
copy the files you want to be in the pull request in the clone on your computer
stage, commit
push calendar_3 to your repo on Github
create the pull request as Kevin described.
That should create a clean and mean pull request containing only the changes you want to be in the pull request.

Lieven.


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Hi Howards,

to bring your master up to date, and supposed that your clone has the hollie/misterhouse remote defined as 'hollie' you can do just:

git checkout master
git fetch hollie
git merge hollie/master
git push origin master

Then you should be up to date and you should be able to create the pull request.

I'll create the calendar one for now and close this pull request as it is an invalid one.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Created the new pull request #362

@hplato, can you check this contains the changes you want to apply?

@hollie hollie closed this Jan 12, 2014
@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

Thanks Lieven,

If i do this, what will happen to all my local changes -- ie the 54 files that git wants to add to my pull requests?

I think hollie/misterhouse is defined as my origin, not as a remote.

Sent from my mobile device.

On Jan 12, 2014, at 12:39 PM, Lieven Hollevoet notifications@github.com wrote:

Hi Howards,

to bring your master up to date, and supposed that your clone has the hollie/misterhouse remote defined as 'hollie' you can do just:

git checkout master
git fetch hollie
git merge hollie/master
git push origin master

Then you should be up to date and you should be able to create the pull request.

I'll create the calendar one for now and close this pull request as it is an invalid one.


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Hey Howard,

to cause less confusion: I advise you to set the origin of your clone to be hplato/misterhouse and not hollie/misterhouse. You can change this easily, check the 'git remote’ command.

If you merge hollie/master then git will bring the branch to which you apply the merge command up to date with hollie/master. Nice thing with git is that you (and me) can actually try this out on our own computer. So this is the result if I apply the merge command of hollie/master to your calendar_2 branch:

Merge made by the 'recursive' strategy.
README.md | 8 ++++++--
bin/mh | 3 ++-
bin/mh.ini | 3 ---
bin/update_docs | 9 +++++++--
code/common/internet_weather.pl | 8 ++++----
code/common/mh_control.pl | 8 +++++++-
code/examples/mht-mode.el | 37 +++++++++++++++++++++++++++++++++++++
docs/download.html | 82 ----------------------------------------------------------------------------------
docs/download.pod | 17 ++++++++++++-----
lib/Generic_Item.pm | 17 ++++++++++++-----
lib/Insteon.pm | 4 ++++
lib/Insteon/AllLinkDatabase.pm | 78 ++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
lib/Insteon/BaseInsteon.pm | 44 +++++++++++++++++++++++++++++++++++++++++---
lib/Insteon/Lighting.pm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/Insteon/MessageDecoder.pm | 2 +-
lib/Insteon/PLMTerminal.pl | 6 +++---
lib/Insteon/Thermostat.pm | 38 +++++++++++++++++++++++++++++++++++---
lib/Insteon_PLM.pm | 33 +++++++++++++++++++++++++++++++++
lib/Weather_Common.pm | 2 +-
lib/X10_Items.pm | 1 -
web/bin/triggers.pl | 2 +-
web/default.css | 3 ++-
22 files changed, 306 insertions(+), 151 deletions(-)
create mode 100644 code/examples/mht-mode.el
delete mode 100644 docs/download.html

So: no merging conflicts, no problems expected. All your other changes remain untouched.

Best regards,
Lieven.

Op 12-jan.-2014, om 20:50 heeft hplato notifications@github.com het volgende geschreven:

Thanks Lieven,

If i do this, what will happen to all my local changes -- ie the 54 files that git wants to add to my pull requests?

I think hollie/misterhouse is defined as my origin, not as a remote.

Sent from my mobile device.

On Jan 12, 2014, at 12:39 PM, Lieven Hollevoet notifications@github.com wrote:

Hi Howards,

to bring your master up to date, and supposed that your clone has the hollie/misterhouse remote defined as 'hollie' you can do just:

git checkout master
git fetch hollie
git merge hollie/master
git push origin master

Then you should be up to date and you should be able to create the pull request.

I'll create the calendar one for now and close this pull request as it is an invalid one.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

Yup, hollie/misterhouse is my origin:

[root@hc1 git-prod]# git remote -v
hplato https://github.com/hplato/misterhouse.git (fetch)
hplato https://github.com/hplato/misterhouse.git (push)
origin git://github.com/hollie/misterhouse.git (fetch)
origin git://github.com/hollie/misterhouse.git (push)
pmatis https://github.com/pmatis/misterhouse.git (fetch)
pmatis https://github.com/pmatis/misterhouse.git (push)

How can I change origin? (I’m guessing this is the first step I’ll need to clean things up)

On Jan 12, 2014, at 12:56 PM, Lieven Hollevoet notifications@github.com wrote:

Hey Howard,

to cause less confusion: I advise you to set the origin of your clone to be hplato/misterhouse and not hollie/misterhouse. You can change this easily, check the 'git remote’ command.

If you merge hollie/master then git will bring the branch to which you apply the merge command up to date with hollie/master. Nice thing with git is that you (and me) can actually try this out on our own computer. So this is the result if I apply the merge command of hollie/master to your calendar_2 branch:

Merge made by the 'recursive' strategy.
README.md | 8 ++++++--
bin/mh | 3 ++-
bin/mh.ini | 3 ---
bin/update_docs | 9 +++++++--
code/common/internet_weather.pl | 8 ++++----
code/common/mh_control.pl | 8 +++++++-
code/examples/mht-mode.el | 37 +++++++++++++++++++++++++++++++++++++
docs/download.html | 82 ----------------------------------------------------------------------------------
docs/download.pod | 17 ++++++++++++-----
lib/Generic_Item.pm | 17 ++++++++++++-----
lib/Insteon.pm | 4 ++++
lib/Insteon/AllLinkDatabase.pm | 78 ++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
lib/Insteon/BaseInsteon.pm | 44 +++++++++++++++++++++++++++++++++++++++++---
lib/Insteon/Lighting.pm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/Insteon/MessageDecoder.pm | 2 +-
lib/Insteon/PLMTerminal.pl | 6 +++---
lib/Insteon/Thermostat.pm | 38 +++++++++++++++++++++++++++++++++++---
lib/Insteon_PLM.pm | 33 +++++++++++++++++++++++++++++++++
lib/Weather_Common.pm | 2 +-
lib/X10_Items.pm | 1 -
web/bin/triggers.pl | 2 +-
web/default.css | 3 ++-
22 files changed, 306 insertions(+), 151 deletions(-)
create mode 100644 code/examples/mht-mode.el
delete mode 100644 docs/download.html

So: no merging conflicts, no problems expected. All your other changes remain untouched.

Best regards,
Lieven.

Op 12-jan.-2014, om 20:50 heeft hplato notifications@github.com het volgende geschreven:

Thanks Lieven,

If i do this, what will happen to all my local changes -- ie the 54 files that git wants to add to my pull requests?

I think hollie/misterhouse is defined as my origin, not as a remote.

Sent from my mobile device.

On Jan 12, 2014, at 12:39 PM, Lieven Hollevoet notifications@github.com wrote:

Hi Howards,

to bring your master up to date, and supposed that your clone has the hollie/misterhouse remote defined as 'hollie' you can do just:

git checkout master
git fetch hollie
git merge hollie/master
git push origin master

Then you should be up to date and you should be able to create the pull request.

I'll create the calendar one for now and close this pull request as it is an invalid one.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Hey Howard,

see here: https://help.github.com/articles/renaming-a-remote

Just rename the remote origin to hollie and hplato to origin. There is nothing special about the exact name a remote has. It is just handy that we know your clone uses the convention we assume it has.

Regards,
Lieven.

Op 12-jan.-2014, om 21:08 heeft hplato notifications@github.com het volgende geschreven:

Yup, hollie/misterhouse is my origin:

[root@hc1 git-prod]# git remote -v
hplato https://github.com/hplato/misterhouse.git (fetch)
hplato https://github.com/hplato/misterhouse.git (push)
origin git://github.com/hollie/misterhouse.git (fetch)
origin git://github.com/hollie/misterhouse.git (push)
pmatis https://github.com/pmatis/misterhouse.git (fetch)
pmatis https://github.com/pmatis/misterhouse.git (push)

How can I change origin? (I’m guessing this is the first step I’ll need to clean things up)

On Jan 12, 2014, at 12:56 PM, Lieven Hollevoet notifications@github.com wrote:

Hey Howard,

to cause less confusion: I advise you to set the origin of your clone to be hplato/misterhouse and not hollie/misterhouse. You can change this easily, check the 'git remote’ command.

If you merge hollie/master then git will bring the branch to which you apply the merge command up to date with hollie/master. Nice thing with git is that you (and me) can actually try this out on our own computer. So this is the result if I apply the merge command of hollie/master to your calendar_2 branch:

Merge made by the 'recursive' strategy.
README.md | 8 ++++++--
bin/mh | 3 ++-
bin/mh.ini | 3 ---
bin/update_docs | 9 +++++++--
code/common/internet_weather.pl | 8 ++++----
code/common/mh_control.pl | 8 +++++++-
code/examples/mht-mode.el | 37 +++++++++++++++++++++++++++++++++++++
docs/download.html | 82 ----------------------------------------------------------------------------------
docs/download.pod | 17 ++++++++++++-----
lib/Generic_Item.pm | 17 ++++++++++++-----
lib/Insteon.pm | 4 ++++
lib/Insteon/AllLinkDatabase.pm | 78 ++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
lib/Insteon/BaseInsteon.pm | 44 +++++++++++++++++++++++++++++++++++++++++---
lib/Insteon/Lighting.pm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/Insteon/MessageDecoder.pm | 2 +-
lib/Insteon/PLMTerminal.pl | 6 +++---
lib/Insteon/Thermostat.pm | 38 +++++++++++++++++++++++++++++++++++---
lib/Insteon_PLM.pm | 33 +++++++++++++++++++++++++++++++++
lib/Weather_Common.pm | 2 +-
lib/X10_Items.pm | 1 -
web/bin/triggers.pl | 2 +-
web/default.css | 3 ++-
22 files changed, 306 insertions(+), 151 deletions(-)
create mode 100644 code/examples/mht-mode.el
delete mode 100644 docs/download.html

So: no merging conflicts, no problems expected. All your other changes remain untouched.

Best regards,
Lieven.

Op 12-jan.-2014, om 20:50 heeft hplato notifications@github.com het volgende geschreven:

Thanks Lieven,

If i do this, what will happen to all my local changes -- ie the 54 files that git wants to add to my pull requests?

I think hollie/misterhouse is defined as my origin, not as a remote.

Sent from my mobile device.

On Jan 12, 2014, at 12:39 PM, Lieven Hollevoet notifications@github.com wrote:

Hi Howards,

to bring your master up to date, and supposed that your clone has the hollie/misterhouse remote defined as 'hollie' you can do just:

git checkout master
git fetch hollie
git merge hollie/master
git push origin master

Then you should be up to date and you should be able to create the pull request.

I'll create the calendar one for now and close this pull request as it is an invalid one.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Howard,

I have synchronization with the google calendar up and running using the settings you gave me. I have added a note to the wiki on this.

Now onto testing calendar control: can you give me some more info on this?

Kind regards,
Lieven.

Op 12-jan.-2014, om 21:21 heeft Lieven Hollevoet hollie@lika.be het volgende geschreven:

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

Yes, sorry, organizer.pl should be enabled.

So create a second google calendar in your account, I call mine MH Control. Then create another ical2vsdb entry in your mh.private.ini, and give it the control attribute in the options:

ical2vsbd_testcontrolcalendar = ….
ical2vsdb_testcontrolcalendar_options = control,name=MH Control

Create an event that matches the name of an item that you have. So I created an event called entry_light from 7:00 to 8:00. At 7:00 the light turns on and at 8:00 it turns off. You can see this if you grep organizer_events.pl after the ical is parsed.

howard

On Jan 12, 2014, at 1:21 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

Just a note on the wiki, the ical_read_interval is what activates the sync. 10 minutes may or may not be the right number. I sync mine every 30 minutes, however with a control calendar, it might make sense to change this to 5. Just note that 10 is not the number to turn it on, it’s whatever is best for the end user.

For testing 10 minutes is good to validate changes.

And the title should be (sync with Google or other ical servers). Calendar sync should still work with things like the darwin calendar server, however I’m thinking that the ease and ubiquity of google, google will be the primary source for most users.

On Jan 12, 2014, at 1:39 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

I have synchronization with the google calendar up and running using the settings you gave me. I have added a note to the wiki on this.

Now onto testing calendar control: can you give me some more info on this?

Kind regards,
Lieven.

Op 12-jan.-2014, om 21:21 heeft Lieven Hollevoet hollie@lika.be het volgende geschreven:

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Cool, I’ll add this info to the pull request and the wiki.

Another question: is there a problem if the calendar that has the ‘control' option has ‘non-control’ entries too? Or is it the idea to have a regular calendar for the normal entries and to have a separate one for control where every event is attempted to be executed?

Regards,
Lieven.

Op 12-jan.-2014, om 21:39 heeft hplato notifications@github.com het volgende geschreven:

Yes, sorry, organizer.pl should be enabled.

So create a second google calendar in your account, I call mine MH Control. Then create another ical2vsdb entry in your mh.private.ini, and give it the control attribute in the options:

ical2vsbd_testcontrolcalendar = ….
ical2vsdb_testcontrolcalendar_options = control,name=MH Control

Create an event that matches the name of an item that you have. So I created an event called entry_light from 7:00 to 8:00. At 7:00 the light turns on and at 8:00 it turns off. You can see this if you grep organizer_events.pl after the ical is parsed.

howard

On Jan 12, 2014, at 1:21 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

The idea was to separate them. Calendars that have the control attribute don’t show on the web interface. I thought mixing and matching things would add a lot of complexity, plus in my case my google calendars are shared with family members, but I wouldn’t want them to mess with MH.

Any event in the control calendar that doesn’t match an existing object is ignored (you can see this in the logs).

On Jan 12, 2014, at 1:46 PM, Lieven Hollevoet notifications@github.com wrote:

Cool, I’ll add this info to the pull request and the wiki.

Another question: is there a problem if the calendar that has the ‘control' option has ‘non-control’ entries too? Or is it the idea to have a regular calendar for the normal entries and to have a separate one for control where every event is attempted to be executed?

Regards,
Lieven.

Op 12-jan.-2014, om 21:39 heeft hplato notifications@github.com het volgende geschreven:

Yes, sorry, organizer.pl should be enabled.

So create a second google calendar in your account, I call mine MH Control. Then create another ical2vsdb entry in your mh.private.ini, and give it the control attribute in the options:

ical2vsbd_testcontrolcalendar = ….
ical2vsdb_testcontrolcalendar_options = control,name=MH Control

Create an event that matches the name of an item that you have. So I created an event called entry_light from 7:00 to 8:00. At 7:00 the light turns on and at 8:00 it turns off. You can see this if you grep organizer_events.pl after the ical is parsed.

howard

On Jan 12, 2014, at 1:21 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Howard,

works like a charm! Fair enough to have a separate command calendar. Does this support changing other stuff too (e.g. setting modes)? Or is this work in progress?

Only required change for my installation: I had to update the first line of the bin/ical2vsdb to be

#!/usr/bin/env perl

In order to get the correct Perl to be called. Otherwise the system Perl is used and that one does not have the correct modules installed. Can you verify if the script still works if you change it on your installation too? If it does (you’re on Linux?) then I can change the shabangs of the other scripts too.

See #249, I received no feedback from testers on this fix yet…

Kind regards,
Lieven.

Op 12-jan.-2014, om 21:49 heeft hplato notifications@github.com het volgende geschreven:

The idea was to separate them. Calendars that have the control attribute don’t show on the web interface. I thought mixing and matching things would add a lot of complexity, plus in my case my google calendars are shared with family members, but I wouldn’t want them to mess with MH.

Any event in the control calendar that doesn’t match an existing object is ignored (you can see this in the logs).

On Jan 12, 2014, at 1:46 PM, Lieven Hollevoet notifications@github.com wrote:

Cool, I’ll add this info to the pull request and the wiki.

Another question: is there a problem if the calendar that has the ‘control' option has ‘non-control’ entries too? Or is it the idea to have a regular calendar for the normal entries and to have a separate one for control where every event is attempted to be executed?

Regards,
Lieven.

Op 12-jan.-2014, om 21:39 heeft hplato notifications@github.com het volgende geschreven:

Yes, sorry, organizer.pl should be enabled.

So create a second google calendar in your account, I call mine MH Control. Then create another ical2vsdb entry in your mh.private.ini, and give it the control attribute in the options:

ical2vsbd_testcontrolcalendar = ….
ical2vsdb_testcontrolcalendar_options = control,name=MH Control

Create an event that matches the name of an item that you have. So I created an event called entry_light from 7:00 to 8:00. At 7:00 the light turns on and at 8:00 it turns off. You can see this if you grep organizer_events.pl after the ical is parsed.

howard

On Jan 12, 2014, at 1:21 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

I’ll make that change and test.

Right now, it just turns things on and off. I was thinking about adding additional states (ie an event mode_sleeping:all where the state is set to whatever is after the :, in this case ‘all' ), however there would have to be additional logic to capture the previous state of the object so that it would revert properly when the event is over. Not impossible, but more complex then simple on/off. The only risk to the current approach, is that control calendar items aren’t checked if ON/OFF are valid states, so if you create an event called mode_sleeping, then organizer will attempt to set that object to ON.

howard
On Jan 12, 2014, at 1:55 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

works like a charm! Fair enough to have a separate command calendar. Does this support changing other stuff too (e.g. setting modes)? Or is this work in progress?

Only required change for my installation: I had to update the first line of the bin/ical2vsdb to be

#!/usr/bin/env perl

In order to get the correct Perl to be called. Otherwise the system Perl is used and that one does not have the correct modules installed. Can you verify if the script still works if you change it on your installation too? If it does (you’re on Linux?) then I can change the shabangs of the other scripts too.

See #249, I received no feedback from testers on this fix yet…

Kind regards,
Lieven.

Op 12-jan.-2014, om 21:49 heeft hplato notifications@github.com het volgende geschreven:

The idea was to separate them. Calendars that have the control attribute don’t show on the web interface. I thought mixing and matching things would add a lot of complexity, plus in my case my google calendars are shared with family members, but I wouldn’t want them to mess with MH.

Any event in the control calendar that doesn’t match an existing object is ignored (you can see this in the logs).

On Jan 12, 2014, at 1:46 PM, Lieven Hollevoet notifications@github.com wrote:

Cool, I’ll add this info to the pull request and the wiki.

Another question: is there a problem if the calendar that has the ‘control' option has ‘non-control’ entries too? Or is it the idea to have a regular calendar for the normal entries and to have a separate one for control where every event is attempted to be executed?

Regards,
Lieven.

Op 12-jan.-2014, om 21:39 heeft hplato notifications@github.com het volgende geschreven:

Yes, sorry, organizer.pl should be enabled.

So create a second google calendar in your account, I call mine MH Control. Then create another ical2vsdb entry in your mh.private.ini, and give it the control attribute in the options:

ical2vsbd_testcontrolcalendar = ….
ical2vsdb_testcontrolcalendar_options = control,name=MH Control

Create an event that matches the name of an item that you have. So I created an event called entry_light from 7:00 to 8:00. At 7:00 the light turns on and at 8:00 it turns off. You can see this if you grep organizer_events.pl after the ical is parsed.

howard

On Jan 12, 2014, at 1:21 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

and I should enable ‘organizer.pl’ under the common code activation?

Can you give me an example of the calendar control? You mean you plan a command in the calendar and it gets executed at that time?

Regards,
Lieven.

Op 12-jan.-2014, om 21:16 heeft hplato notifications@github.com het volgende geschreven:

No, there is no ‘up to date’ documentation. http://misterhouse.wikispaces.com/Calendar+(sync+with+Google) is mostly right (i added dcsfix and sync_dtstamp as defaults), so the new version should simplify things. Try this, just set

ical2vsdb_ = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics
ical2vsdb__options = name=Something
ical_read_interval = 10

Finding the ical address for the google calendar should still be correct.

The calendar control is new, and wouldn’t mind some testing. I think this has some very interesting potential for the future.

If this works for you let me know and I’ll try and figure out how to update the wiki.

On Jan 12, 2014, at 12:59 PM, Lieven Hollevoet notifications@github.com wrote:

Howard, if I want to test this out: is there an up to date documentation or a short note somewhere on how to configure this to be used with a Google calendar?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@hollie
Copy link
Owner

hollie commented Jan 12, 2014

Howard,

yes, cool. If it works for you I'll update the branch with the pull request to that it gets applied to other people testing this out too.

On/off: fair. Let's extend this further as the need arises. For the mode it would be very cool if you could plan a holiday in the calendar and then have the house revert to 'coming back home mode' some hours before the actual return to start heating the house for you.

The calendar interface would be very useful for such planned timings.

@hplato
Copy link
Collaborator Author

hplato commented Jan 12, 2014

Actually, there are specific holiday and vacation calendars. I used the holiday calendar to turn on a generic item if it was a ‘holiday night / holiday day’ schedule (ie lights go off later in the evening). Vacation was the same thing, so that certain events got activated when the vacation was on.

However off-hand I don’t remember how that all worked, and looking at my local organizer_holiday.pl, it looks like I haven’t had events in there since 2007, so obviously it wasn’t a strongly used feature :)

This should probably be revisited if more folks want to use some of the google features.

The birthday calendar options is also pretty cool as MH emails be a week before all birthday events as a reminder…

On Jan 12, 2014, at 2:18 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

yes, cool. If it works for you I'll update the branch with the pull request to that it gets applied to other people testing this out too.

On/off: fair. Let's extend this further as the need arises. For the mode it would be very cool if you could plan a holiday in the calendar and then have the house revert to 'coming back home mode' some hours before the actual return to start heating the house for you.

The calendar interface would be very useful for such planned timings.


Reply to this email directly or view it on GitHub.

@hplato
Copy link
Collaborator Author

hplato commented Apr 2, 2014

How’s this been working for you? Any suggestions

So with v3.1 out, I figure this is an opportune time to fix up my local repo and get consistent with other developers. So I figure I need to:

  • create a ‘running’ branch where MH will run from. This can contain merges of separate changes, like Kevin mentioned, and is how I generally use MH. This also needs to have the 54 files that I have custom from the main master branch.
  • I’ve just done this by a git checkout -b running.
  • Clean up my master to remove all the above customizations. Can I just delete this branch?
  • Set hplato/master as the remote for master and hplato/stable for stable?
  • Then pull from hollie/master to update master, and hollie/stable.
  • Then somehow update hplato/running?

howard
Do I have the main steps correct?

On Jan 12, 2014, at 2:24 PM, H Plato hplato@gmail.com wrote:

Actually, there are specific holiday and vacation calendars. I used the holiday calendar to turn on a generic item if it was a ‘holiday night / holiday day’ schedule (ie lights go off later in the evening). Vacation was the same thing, so that certain events got activated when the vacation was on.

However off-hand I don’t remember how that all worked, and looking at my local organizer_holiday.pl, it looks like I haven’t had events in there since 2007, so obviously it wasn’t a strongly used feature :)

This should probably be revisited if more folks want to use some of the google features.

The birthday calendar options is also pretty cool as MH emails be a week before all birthday events as a reminder…

On Jan 12, 2014, at 2:18 PM, Lieven Hollevoet notifications@github.com wrote:

Howard,

yes, cool. If it works for you I'll update the branch with the pull request to that it gets applied to other people testing this out too.

On/off: fair. Let's extend this further as the need arises. For the mode it would be very cool if you could plan a holiday in the calendar and then have the house revert to 'coming back home mode' some hours before the actual return to start heating the house for you.

The calendar interface would be very useful for such planned timings.


Reply to this email directly or view it on GitHub.

@hplato hplato deleted the calendar branch April 6, 2014 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants