Skip to content

Commit

Permalink
Changed: RFLink controller initialisation detection (reported by gkro…
Browse files Browse the repository at this point in the history
…one)

Removed: Duplicate lines from the manufacturer_specific.xml
  • Loading branch information
gizmocuz committed May 23, 2015
1 parent 3b809d7 commit a6874e9
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 55 deletions.
12 changes: 4 additions & 8 deletions Config/manufacturer_specific.xml
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,10 @@
<Manufacturer id="0109" name="Vision">
<Product type="1001" id="0101" name="ZU1401 Z-Wave USB Stick"/>
<Product type="1001" id="0105" name="ZU1401 Z-Wave USB Stick"/>
<Product type="2001" id="0101" name="ZD2102 Door/Window Sensor"/>
<Product type="2001" id="0102" name="ZD2102 Door/Window Sensor"/>
<Product type="2001" id="0104" name="ZD2102 Door/Window Sensor"/>
<Product type="2001" id="0105" name="ZD2102 Door/Window Sensor"/>
<Product type="2001" id="0101" name="ZD2102 US Door/Window Sensor" config="vision/zd2102.xml"/>
<Product type="2001" id="0102" name="ZD2102 AU Door/Window Sensor" config="vision/zd2102.xml"/>
<Product type="2001" id="0104" name="ZD2102 JP Door/Window Sensor" config="vision/zd2102.xml"/>
<Product type="2001" id="0105" name="ZD2102 EU Door/Window Sensor" config="vision/zd2102.xml"/>
<Product type="2002" id="0201" name="ZP3102 US PIR Motion Sensor" config="vision/zp3102.xml"/>
<Product type="2002" id="0202" name="ZP3102 AU PIR Motion Sensor" config="vision/zp3102.xml"/>
<Product type="2002" id="0203" name="ZP3102 EU PIR Motion Sensor" config="vision/zp3102.xml"/>
Expand All @@ -673,10 +673,6 @@
<Product type="2014" id="1401" name="ZL7101 Plug-in Dimmer Module"/>
<Product type="2017" id="1717" name="ZL7432 In-Wall Switch, Dual Relay"/>
<Product type="3001" id="0104" name="ZM1602 Main Operated Siren"/>
<Product type="2001" id="0101" name="ZD2102 US Door/Window Sensor" config="vision/zd2102.xml"/>
<Product type="2001" id="0102" name="ZD2102 AU Door/Window Sensor" config="vision/zd2102.xml"/>
<Product type="2001" id="0104" name="ZD2102 JP Door/Window Sensor" config="vision/zd2102.xml"/>
<Product type="2001" id="0105" name="ZD2102 EU Door/Window Sensor" config="vision/zd2102.xml"/>
</Manufacturer>
<Manufacturer id="0115" name="Z-Wave.Me">
<Product type="0001" id="0001" name="Z-Wave USB Stick"/>
Expand Down
2 changes: 2 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Version 2.0.xxxx (xxxx 2015)
- Fixed: HTTP Notification (Script) stop url encoding subject/message
- Implemented: KMTronic USB-> RS485 relay hardware
- Implemented: Extra check in short-log cleanup
- Changed: RFLink controller initialisation detection (reported by gkroone)


Version 2.0.2284 (February 22th 2015)
- Fixed: Firefox, RGBW/Setpoint popup
Expand Down
6 changes: 3 additions & 3 deletions hardware/RFLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,11 @@ bool CRFLink::ParseLine(const std::string &sLine)
#endif

std::string Sensor_ID = results[1];
std::string Name_ID = results[2];
if (results.size() == 3)
if (results.size() >2)
{
//Status reply
if (Name_ID.find("Nodo RadioFrequencyLink")!=std::string::npos)
std::string Name_ID = results[2];
if (Name_ID.find("Nodo RadioFrequencyLink") != std::string::npos)
{
_log.Log(LOG_STATUS, "RFLink: Controller Initialized!...");
//Enable DEBUG
Expand Down
2 changes: 1 addition & 1 deletion main/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3221,7 +3221,7 @@ namespace http {
void CWebServer::Cmd_GetConfig(Json::Value &root)
{
root["status"] = "OK";
root["title"] = "GetActiveTabs";
root["title"] = "GetConfig";

bool bHaveUser = (m_pWebEm->m_actualuser != "");
int urights = 3;
Expand Down
81 changes: 54 additions & 27 deletions server_cert.pem
Original file line number Diff line number Diff line change
@@ -1,30 +1,57 @@
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQCxI/lar5EOkR/wO+8yxO1lwT0ouAHDSkPt9EDz2uajWqqO3UyL
Z6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3PM/cp8
ek0mW+Dl45MBO0GE5NzsyRcw3SxRICnQfV+r8VignT7tATrYsAXUoFbJ2lTShCYg
89YiKp3K/dhSsygdx67d7+pzeoUHtIgfQG+JGa0Tu9T3QrRwNVICBqgPRi/u1WVy
Tv+I9/FcpxWtlvQySP8=
-----END CERTIFICATE-----
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEAqRpAeUSD+sitKNc5EVkZVH6WBYxkYwtP4jRZOxGBROaLjt1ueltR
6CXdr3HRjvIn2UFZPx4m0oLs4YxcFi8rxyYdPTa03mI3q/osDnCA6ggZPOGhAMlf
5PmwHf4m7lBioR/JEV6ou4QX+nzz27EqGg9bRE1F16tXwg864WnIwZyayPtsV1zJ
PwS64fx15JFvBEh2vEXOuMeHT1t+qyhR8kU4EF7Ue495Ju0bE7oqa6bBlhpYUPT6
BX1FyDgqEUMxQEAEU1njB2GxVH8dHElhpetEM9VCo3K99imh5lOATQKLxjAv8Yje
e0Q2/jxxHkX4pqXKg3v+PhD0InRUZRVFywIBAg==
-----END DH PARAMETERS-----
4 changes: 4 additions & 0 deletions webserver/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ void connection::handle_handshake(const boost::system::error_code& error)
// handshake completed, start reading
read_more_secure();
}
else
{
connection_manager_.stop(shared_from_this());
}
}
}

Expand Down
27 changes: 22 additions & 5 deletions webserver/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "stdafx.h"
#include <boost/bind.hpp>
#include "server.hpp"
#include <fstream>

namespace http {
namespace server {
Expand All @@ -19,10 +20,21 @@ server::server(const std::string& address, const std::string& port,
#endif
request_handler_( user_request_handler),
timeout_(20), // default read timeout in seconds
new_connection_(new connection(io_service_,
connection_manager_, request_handler_, timeout_))
secure_(false)
{
secure_ = (certificatefile != "");
#ifdef NS_ENABLE_SSL
secure_ = (certificatefile != "");
#endif
if (!secure_)
{
new_connection_.reset(new connection(io_service_, connection_manager_, request_handler_, timeout_));
}
else
{
#ifdef NS_ENABLE_SSL
new_connection_.reset(new connection(io_service_, connection_manager_, request_handler_, timeout_,context_));
#endif
}
// Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
boost::asio::ip::tcp::resolver resolver(io_service_);
boost::asio::ip::tcp::resolver::query query(address, port);
Expand All @@ -39,8 +51,13 @@ server::server(const std::string& address, const std::string& port,
| boost::asio::ssl::context::single_dh_use);
context_.use_certificate_chain_file(certificatefile);
context_.use_private_key_file(certificatefile, boost::asio::ssl::context::pem);
// we won't use a separate diffie hellman file (commented out)
// context_.use_tmp_dh_file("dh512.pem");

//Check if certificate contains DH parameters
std::ifstream ifs(certificatefile);
std::string content((std::istreambuf_iterator<char>(ifs)),
(std::istreambuf_iterator<char>()));
if (content.find("BEGIN DH PARAMETERS")!=std::string::npos)
context_.use_tmp_dh_file(certificatefile);
#endif
}
// bind to our port
Expand Down
2 changes: 1 addition & 1 deletion www/html5.appcache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CACHE MANIFEST
# ref 893
# ref 894

CACHE:
# CSS
Expand Down
10 changes: 0 additions & 10 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@
//data.HaveUpdate=true;
if (data.HaveUpdate == true) {
window.my_config.hasupdatesupport = true;
$("#mUpdate").show();
$("#mCheckUpdate").hide();
if (showdialog) {
bootbox.confirm($.t("Update Available !... Update Now?"), function(result) {
if (result==true) {
Expand All @@ -168,14 +166,9 @@
{
if (data.IsSupported==false) {
window.my_config.hasupdatesupport = false;
$("#dUpdate").hide();
$("#mUpdate").hide();
$("#mCheckUpdate").hide();
}
else {
window.my_config.hasupdatesupport = true;
$("#mUpdate").hide();
$("#mCheckUpdate").show();
}
if (showdialog) {
bootbox.alert($.t("No Update Available !..."));
Expand All @@ -184,8 +177,6 @@
}
},
error: function(){
$("#mUpdate").hide();
$("#mCheckUpdate").show();
if (showdialog) {
bootbox.alert($.t("Error communicating to server!"));
}
Expand Down Expand Up @@ -806,7 +797,6 @@ <h1 id="theader" data-i18n="Usage this Year">Usage this Year</h1>
<li ng-class="{'current_page_item':getClass('/Devices')}" id="mDevices"><a id="cDevices" href="#Devices"><img src="images/devices.png"> <span data-i18n="Devices">Devices</span></a></li>
<li ng-class="{'current_page_item':getClass('/Setup')}" id="mSetup"><a id="cSetup" href="#Setup"><img src="images/setup.png"> <span data-i18n="Settings">Settings</span></a></li>
<li id="dUpdate" class="divider"></li>
<li ng-class="{'current_page_item':getClass('/Update')}" id="mUpdate"><a id="cUpdate" href="#Update"><img src="images/utility.png"> <span data-i18n="Update Domoticz">Update Domoticz</span></a></li>
<li id="mCheckUpdate"><a id="cCheckUpdate" class="lcursor" onclick="javascript:CheckForUpdate(true)"><img src="images/utility.png"> <span data-i18n="Check for Update">Check for Update</span></a></li>
<li class="dropdown-submenu">
<a id="cMoreOptions" tabindex="-1" data-i18n="More options">More options</a>
Expand Down

0 comments on commit a6874e9

Please sign in to comment.