Calendar

Share your scripts written for the Script Device in this forum.
Post Reply
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Calendar

Post by Richard Naninck »

The script contains many Dutch comments which I will translate if there are questions. First try to get it to work.

Also I put much work into getting the date stuff correct for European standards. Our first day of the week is a monday whereas in the US it is a sunday. That might be a problem, but can be overcome in code.

Attached a hbx file with most of the stuff. Also a zipped image directory and a dat file. The dat file however is called Agenda ItemList.zip. Just rename .zip to .dat because .dat cannot be attached to this message and it really isn't a zip file, .zip just works

Put the images in C:\Program Files\Meedio\Meedio HouseBot\Config\Themes\Autohome\Agenda\

This path can be set in the property list of the Agenda NULL Device in Picture Path. Adjust it at will and hopefully the script will follow at full.

Put the dat file in C:\Program Files\Meedio\Meedio HouseBot\Config\Autohome\Agenda\

I know I should change my directory structure some time to get rid of the Meedio part, but that is lots of work so I left it for now.

Agenda means Calendar or Scheduler

The dat file contains just one entry meaning Mothersday

The hbx should contain the script + script device, the theme panels + buttons, a One Minute Timer, the NULL device and a task.
Be aware that the main theme panel has an Entry List value set to trigger the task.

Good luck
Attachments
Agenda ItemList.zip
(44 Bytes) Downloaded 1164 times
Agenda.zip
(305.22 KiB) Downloaded 1129 times
Calendar.hbx
(73.49 KiB) Downloaded 1133 times
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

Funny. I started a new post, too. I just moved my response to your post.

Richard,

I like what you've done here on the schedule. I have to say I disagree with Steve regarding no requirement to port to SQLite. There are very good reasons to get data in an SQL database. The first, and most obvious, thing that comes to mind is the ability to query and sort data very quickly. This might not seem very important when dealing with simple datasets, but SQL lends itself to extensibility. They also allow you to build in logical relationships between datasets. A very common mistake programmers make, I know because I've made them, is that there is no standardization in the way they store/manipulate/retrieve data. I think one of the reasons people still use Meedio for functionality is because they had built standardization into the design. Meedio relied heavily on SQL and XML. That provided a VERY good basis for their import and export architecture. One of my goals when working on scripts is to develop them in a very generic way so they can be easily be used by others without requiring costly, or messy, third-party applications. I'm convinced that HB can handle just about every application. It would be nice if it could be done natively. I'm working on a couple of plug-ins written in C to provide both ID3V2 tag and SQLite functionality to support my THC Jukebox without any external applications. I'm brainstorming a way that I can create applications/scripts that allows me to build upon what I've already done and the collective efforts of others.

This is getting a little off-topic, but I envision a plug-in similar to the Meedio Import/Export that used a combination of XML/WSDL, SQLite to populate 2 Dimensional HB lists. WSDL documents are used define XML structure. The problem with raw XML is that it doesn't allow format changes to made on the fly without blowing up programs or it doesn't adapt to change. If something like this was created you could easily and transparently tie any XML data available on the internet directly reliably to an HB list. That is powerful.

I'm trying to come up with a way we can redistribute these There is no reason that Housebot, or at least our collection of add-ins, can't do these things in a way where everyone could benefit from the fruits of our labors.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I know what you mean. I like SQL very much too and porting my schedular to SQL has always been on my mind. It is just that I have created so many plugins for HB in the last 18 months that I just didn't get to it. I also went through a steep learning curve and about a year ago I came to standardise my programming in HB. HB for me is the basis for my devices and my theme remote. All other stuff is done using scripts because I can bundle many subs (tasks) into one readable scripted plugin. I don't use too many tasks, just lots of NULL devices and scripts. To make certain stuff multithreaded, I use timers controlled by tasks.

The scheduler stayed somewhat small when it comes to data. I use it a lot and have done so for the last 18 months and still I only got up to 141 items. Most of them are reoccuring. SQL would greatly increase the flexibility when it comes to almost everything I can think of; sorting, rescheduling etc. It would help build stuff like early heads ups (alarm an item an hour or a day before it is due etc). I still have some ideas, but hey.. it works and I have other things to do. It is very easy to couple devices to the scheduler like; turn on the radio or a light scheme when an alarm clock is due etc. All of that can be done using tasks as well, but now it is all bundled together with birthdays and appointments and it sits nicely in a theme.

You are still very welcome though to take a look, strip the ideas of of it and build a better one.
Steve Horn
HouseBot Guru
Posts: 757
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

My 2 cents - My suggestion to roll it out as-is was to not burden Richard with an SQL conversion effort. I'm not smart enough to know the benefits of SQL vs. a flat file as applied to this app. I went with Richard's assessment that basically "if it aint broke don't fix it.". I did think it would be neat if it were SQL based, but I'm fairly sure that, to me anyway, it would not have been worth his effort to convert it.

I intend to dive into Incoronado's jukebox vbscript as a learning exercise for me. I did some of this in my former life but its been too long ago.

Thanks for offering your work up for other's use and enjoyment.
Steve
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

You're absolutely right. Didn't mean to imply that. Just brainstorming on a way to guide future efforts into some form of standardization. That way we, and others, can benefit and build from each others work.

Sometimes my enthusiasm can be construed as criticism.

“Nothing great was ever achieved without enthusiasm"

--Ralph Waldo Emerson
Steve Horn
HouseBot Guru
Posts: 757
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

Incoranado, I agree 100% with your ideas re. standardization, and I did not take your reply as criticism at all. I just thought I needed to clarify MY suggestion. After all, I'm freeloading here. I feel guilty taking advantage of your and Richard's development work!
Steve
Post Reply