Skip to content

Commit

Permalink
- Fixed "Unknown/Unsupported" module error appearing in some browsers…
Browse files Browse the repository at this point in the history
… (eg. SmartTV web browser)

- Fixed parsing error in scheduler expressions with blank characers before/after parentheses
- Added Scheduler.DateTime comparison operators to Wizard programs' condition
- Newly added scheduler events are now set to enabled by default
- Fixed Solar Altitude "NaN" bug
(sf.net r377)
  • Loading branch information
genemars committed Jun 23, 2014
1 parent e9f639b commit 876be26
Show file tree
Hide file tree
Showing 77 changed files with 3,550 additions and 2,035 deletions.
22 changes: 22 additions & 0 deletions CREDITS.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CREDITS AND RESOURCES

HomeGenie is using:
- jQuery Mobile for its UI http://http://jquerymobile.com
- jQuery UI Touch Punch http://touchpunch.furf.com
- Flot for statistics graphs http://code.google.com/p/flot
- moment.js for date formatting http://momentjs.com
- libusb for its CM15Pro Usb Driver http://www.libusb.org
- SQLite for statistics database http://sqlite.org
- CodeMirror http://codemirror.net
- Raphael Js http://raphaeljs.com
- Raspberry#-IO https://github.com/raspberry-sharp/raspberry-sharp-io
- Expression Evaluator http://www.codeproject.com/Articles/9114/math-function-boolean-string-expression-evaluator
- NewtonSoft Json http://james.newtonking.com/json
- IronLanguages http://github.com/IronLanguages/main
- NCrontab http://code.google.com/p/ncrontab/
- Intel UPnP http://opentools.homeip.net/dev-tools-for-upnp
- LIRC http://lirc.org
- LAME http://lame.sourceforge.net
- Pepper One Z-Wave DB http://www.pepper1.net/

Z-Wave driver (ZWaveLib) originarly based on article "An introduction to Z-Wave programming in C#" (http://www.digiwave.dk/en/programming/an-introduction-to-z-wave-programming-in-c/).
28 changes: 28 additions & 0 deletions DEVELOPERS.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
LINUX

Open HomeGenie_Linux/HomeGenie_Linux.sln file using MonoDevelop.
http://monodevelop.com/


MAC

Open HomeGenie_Mac/HomeGenie_Mac.sln file using Xamarin Studio.
http://xamarin.com/studio


WINDOWS

Open HomeGenie_VS10/HomeGenie_VS10.sln file using Microsoft Visual Studio Professional.
http://www.microsoft.com/en-us/download/details.aspx?id=40763


SOURCE CODE

http://sourceforge.net/projects/homegenie/
http://github.com/genielabs/HomeGenie


SUPPORT FORUM AND WIKI

http://www.homegenie.it/forum
http://sourceforge.net/p/homegenie/wiki/Home/
749 changes: 749 additions & 0 deletions HISTORY.TXT

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion HomeGenie/Automation/ProgramEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ private bool VerifyProgramCondition(ProgramCondition c)
bool returnValue = false;
string comparisonValue = c.ComparisonValue;
//
if (c.Domain == Domains.HomeAutomation_HomeGenie && c.Target == "Automation" && c.Property == "Scheduler.TimeEvent")
if (c.Domain == Domains.HomeAutomation_HomeGenie && c.Target == "Automation" && (c.Property == "Scheduler.TimeEvent" || c.Property == "Scheduler.CronEvent"))
{
return homegenie.ProgramEngine.SchedulerService.IsScheduling(c.ComparisonValue);
}
Expand Down Expand Up @@ -632,30 +632,39 @@ private bool VerifyProgramCondition(ProgramCondition c)
switch (parameter.Name)
{
case "Programs.DateDay":
case "Scheduler.DateDay":
parameter.Value = DateTime.Now.Day.ToString();
break;
case "Programs.DateMonth":
case "Scheduler.DateMonth":
parameter.Value = DateTime.Now.Month.ToString();
break;
case "Programs.DateDayOfWeek":
case "Scheduler.DateDayOfWeek":
parameter.Value = ((int)DateTime.Now.DayOfWeek).ToString();
break;
case "Programs.DateYear":
case "Scheduler.DateYear":
parameter.Value = DateTime.Now.Year.ToString();
break;
case "Programs.DateHour":
case "Scheduler.DateHour":
parameter.Value = DateTime.Now.Hour.ToString();
break;
case "Programs.DateMinute":
case "Scheduler.DateMinute":
parameter.Value = DateTime.Now.Minute.ToString();
break;
case "Programs.Date":
case "Scheduler.Date":
parameter.Value = DateTime.Now.ToString("YY-MM-dd");
break;
case "Programs.Time":
case "Scheduler.Time":
parameter.Value = DateTime.Now.ToString("HH:mm:ss");
break;
case "Programs.DateTime":
case "Scheduler.DateTime":
parameter.Value = DateTime.Now.ToString("YY-MM-dd HH:mm:ss");
break;
}
Expand Down
11 changes: 10 additions & 1 deletion HomeGenie/Automation/Scheduler/SchedulerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,22 @@ public SchedulerItem AddOrUpdate(string name, string cronExpression)
if (String.IsNullOrEmpty(name)) return null;
//
var eventItem = Get(name);
bool justAdded = false;
if (eventItem == null)
{
eventItem = new SchedulerItem();
eventItem.Name = name;
events.Add(eventItem);
justAdded = true;
}
eventItem.CronExpression = cronExpression;
eventItem.LastOccurrence = "-";
eventItem.NextOccurrence = GetNextEventOccurrence(eventItem.CronExpression);
// by default newly added events are enabled
if (justAdded)
{
eventItem.IsEnabled = true;
}
return eventItem;
}

Expand Down Expand Up @@ -183,8 +190,10 @@ public bool IsScheduling(string cronExpression)
}
}

currentExpression = currentExpression.Trim(new char[] { ' ', '\t' });
if (String.IsNullOrEmpty(currentExpression)) continue;

bool isEntryActive = false;
currentExpression = currentExpression.Trim(new char[]{ ' ', '\t' });
if (currentExpression.StartsWith("@"))
{
// Check expresion from scheduled item with a given name
Expand Down
22 changes: 13 additions & 9 deletions HomeGenie/HomeGenie.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BFD3C868-1F62-43FF-8771-CF21825F0C0A}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HomeGenie</RootNamespace>
<AssemblyName>HomeGenie</AssemblyName>
<FileAlignment>512</FileAlignment>
<ReleaseVersion>1.0 beta</ReleaseVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -29,21 +26,16 @@
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile />
<ReleaseVersion>1.0</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CustomCommands>
<CustomCommands>
<Command type="AfterBuild" command="" workingdir="" />
</CustomCommands>
</CustomCommands>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
Expand Down Expand Up @@ -201,6 +193,18 @@
<Compile Include="Service\StringCipher.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\CREDITS.TXT">
<Link>CREDITS.TXT</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\DEVELOPERS.TXT">
<Link>DEVELOPERS.TXT</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\HISTORY.TXT">
<Link>HISTORY.TXT</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\LICENCE.TXT">
<Link>LICENCE.TXT</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
Loading

0 comments on commit 876be26

Please sign in to comment.