diff --git a/HomeGenie/HomeGenieUI/html/pages/home.html b/HomeGenie/HomeGenieUI/html/pages/home.html index 49c2d0237..ed224db3a 100644 --- a/HomeGenie/HomeGenieUI/html/pages/home.html +++ b/HomeGenie/HomeGenieUI/html/pages/home.html @@ -53,7 +53,7 @@
HomeGenie
version
-
 1.00 beta r342
+
 1.00 beta r343
diff --git a/HomeGenie/bin/Debug/HomeGenie.exe b/HomeGenie/bin/Debug/HomeGenie.exe index 99263385c..8cb155f96 100644 Binary files a/HomeGenie/bin/Debug/HomeGenie.exe and b/HomeGenie/bin/Debug/HomeGenie.exe differ diff --git a/HomeGenie/bin/Debug/HomeGenieService.exe b/HomeGenie/bin/Debug/HomeGenieService.exe index 5f7f4ae97..9b687bfe2 100644 Binary files a/HomeGenie/bin/Debug/HomeGenieService.exe and b/HomeGenie/bin/Debug/HomeGenieService.exe differ diff --git a/HomeGenie/bin/Debug/MIG.dll b/HomeGenie/bin/Debug/MIG.dll index 2b28442b6..6f63550f0 100644 Binary files a/HomeGenie/bin/Debug/MIG.dll and b/HomeGenie/bin/Debug/MIG.dll differ diff --git a/HomeGenie/bin/Debug/README.TXT b/HomeGenie/bin/Debug/README.TXT index a06f53d5e..131ddef58 100644 --- a/HomeGenie/bin/Debug/README.TXT +++ b/HomeGenie/bin/Debug/README.TXT @@ -165,7 +165,8 @@ https://sourceforge.net/p/homegenie/wiki/Home/ RELEASE HISTORY -26/02/2014 1.00 beta rev 342 +26/02/2014 1.00 beta rev 343 + - ZWaveLib: added fallback to Generic.Sensor handler when GenericType is not directly supported; removed Interlocked.Increment that was possibly causing server hang - Scheduler: replaced ',' (OR operator) with ':' symbol due to conflicts with regular cron expression - Updated "FibaroRGBW" plugin - Updated Weeco4m GPIO module diff --git a/HomeGenie/bin/Debug/ZWaveLib.dll b/HomeGenie/bin/Debug/ZWaveLib.dll index 71ca010fb..61c9b12fa 100644 Binary files a/HomeGenie/bin/Debug/ZWaveLib.dll and b/HomeGenie/bin/Debug/ZWaveLib.dll differ diff --git a/HomeGenie/bin/Debug/html/pages/home.html b/HomeGenie/bin/Debug/html/pages/home.html index 49c2d0237..ed224db3a 100644 --- a/HomeGenie/bin/Debug/html/pages/home.html +++ b/HomeGenie/bin/Debug/html/pages/home.html @@ -53,7 +53,7 @@
HomeGenie
version
-
 1.00 beta r342
+
 1.00 beta r343
diff --git a/HomeGenie/bin/Debug/release_info.xml b/HomeGenie/bin/Debug/release_info.xml index c042b9046..47ba74c17 100644 --- a/HomeGenie/bin/Debug/release_info.xml +++ b/HomeGenie/bin/Debug/release_info.xml @@ -1,10 +1,12 @@  HomeGenie - 1.00 beta r342 + 1.00 beta r343 Latest public release. - - Scheduler: replaced ',' (OR operator) with ':' symbol due to conflicts with regular cron expression + - ZWaveLib: added fallback to Generic.Sensor handler when GenericType is not directly supported + - Scheduler: replaced ',' (OR operator) with ':' symbol due to conflicts with regular cron expression - Updated "FibaroRGBW" plugin - - Updated Weeco4m GPIO module - 2014-02-26T17:06:55.0000Z + - Updated Weeco4m GPIO module + + 2014-02-26T21:35:27.0000Z \ No newline at end of file diff --git a/HomeGenie/release_info.xml b/HomeGenie/release_info.xml index c042b9046..47ba74c17 100644 --- a/HomeGenie/release_info.xml +++ b/HomeGenie/release_info.xml @@ -1,10 +1,12 @@  HomeGenie - 1.00 beta r342 + 1.00 beta r343 Latest public release. - - Scheduler: replaced ',' (OR operator) with ':' symbol due to conflicts with regular cron expression + - ZWaveLib: added fallback to Generic.Sensor handler when GenericType is not directly supported + - Scheduler: replaced ',' (OR operator) with ':' symbol due to conflicts with regular cron expression - Updated "FibaroRGBW" plugin - - Updated Weeco4m GPIO module - 2014-02-26T17:06:55.0000Z + - Updated Weeco4m GPIO module + + 2014-02-26T21:35:27.0000Z \ No newline at end of file diff --git a/MIG/MIG/Gateways/WebServiceGateway.cs b/MIG/MIG/Gateways/WebServiceGateway.cs index 83a2b221e..2b0b21b95 100644 --- a/MIG/MIG/Gateways/WebServiceGateway.cs +++ b/MIG/MIG/Gateways/WebServiceGateway.cs @@ -75,7 +75,6 @@ public class WebServiceGateway : MIGGateway, IDisposable public event Action ProcessRequest; // private ManualResetEvent _stopevent = new ManualResetEvent(false); - private int _requestcounter = 0; // private string _servicepassword; private string _homepath; @@ -247,18 +246,13 @@ private void Worker(object o) } - // finally a well working HttpListener implementation - // from: http://stackoverflow.com/questions/5895063/asynchronous-httplistener-problem-each-request-is-received-twice - private void ListenAsynchronously(IEnumerable prefixes) { HttpListener listener = new HttpListener(); - foreach (string s in prefixes) { listener.Prefixes.Add(s); } - listener.Start(); HttpListenerCallbackState state = new HttpListenerCallbackState(listener); ThreadPool.QueueUserWorkItem(Listen, state); @@ -275,8 +269,7 @@ private void Listen(object state) while (callbackState.Listener.IsListening) { callbackState.Listener.BeginGetContext(new AsyncCallback(ListenerCallback), callbackState); - int n = WaitHandle.WaitAny(new WaitHandle[] { callbackState.ListenForNextRequest, _stopevent }); - + int n = WaitHandle.WaitAny(new WaitHandle[] { callbackState.ListenForNextRequest, _stopevent }, 10000); if (n == 1) { // stopEvent was signalled @@ -290,23 +283,21 @@ private void ListenerCallback(IAsyncResult ar) { HttpListenerCallbackState callbackState = (HttpListenerCallbackState)ar.AsyncState; HttpListenerContext context = null; - - int requestNumber = Interlocked.Increment(ref _requestcounter); - + // try { context = callbackState.Listener.EndGetContext(ar); } catch (Exception ex) { - return; + Console.WriteLine("WebServiceGateway: " + ex.Message + "\n" + ex.StackTrace); } finally { callbackState.ListenForNextRequest.Set(); } if (context == null) return; - + // Worker(context); } diff --git a/MIG/Support Libraries/ZWaveLib/Devices/ZWaveNode.cs b/MIG/Support Libraries/ZWaveLib/Devices/ZWaveNode.cs index dea9502ba..584885d60 100644 --- a/MIG/Support Libraries/ZWaveLib/Devices/ZWaveNode.cs +++ b/MIG/Support Libraries/ZWaveLib/Devices/ZWaveNode.cs @@ -518,17 +518,11 @@ public void SetGenericHandler() case (byte)ZWaveLib.GenericType.THERMOSTAT: devhandler = new ProductHandlers.Generic.Thermostat(); break; - case (byte)ZWaveLib.GenericType.SENSOR_ALARM: - case (byte)ZWaveLib.GenericType.SENSOR_BINARY: - case (byte)ZWaveLib.GenericType.SENSOR_MULTILEVEL: - case (byte)ZWaveLib.GenericType.METER: - case (byte)ZWaveLib.GenericType.METER_PULSE: + // Fallback to generic Sensor driver if type is not directly supported. + // The Generic.Sensor handler is currently used as some kind of multi-purpose driver + default: devhandler = new ProductHandlers.Generic.Sensor(); - //Console.WriteLine(" * NODE " + this.NodeId + " associated to Generic.Sensor handler"); break; - // case (byte)ZWaveLib.GenericType.METER_PULSE: - // devhandler = new ProductHandlers.Generic.Meter(); - // break; } if (devhandler != null) { diff --git a/README.TXT b/README.TXT index a06f53d5e..bf27298b3 100644 --- a/README.TXT +++ b/README.TXT @@ -165,7 +165,8 @@ https://sourceforge.net/p/homegenie/wiki/Home/ RELEASE HISTORY -26/02/2014 1.00 beta rev 342 +26/02/2014 1.00 beta rev 343 + - ZWaveLib: added fallback to Generic.Sensor handler when GenericType is not directly supported - Scheduler: replaced ',' (OR operator) with ':' symbol due to conflicts with regular cron expression - Updated "FibaroRGBW" plugin - Updated Weeco4m GPIO module