aqhome-apps: decreased verbosity.
This commit is contained in:
@@ -108,8 +108,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
GWEN_Logger_Open(0, "aqhome-react", 0, GWEN_LoggerType_Console, GWEN_LoggerFacility_User);
|
||||
//GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Warning);
|
||||
GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info);
|
||||
GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Warning);
|
||||
//GWEN_Logger_SetLevel(0, GWEN_LoggerLevel_Info);
|
||||
|
||||
rv=_setSignalHandlers();
|
||||
if (rv<0) {
|
||||
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
|
||||
|
||||
_runService(aqh, eventLoop);
|
||||
|
||||
//AQH_NodeServer_Fini(aqh);
|
||||
AQH_ReactServer_Fini(aqh);
|
||||
AQH_Object_free(aqh);
|
||||
|
||||
GWEN_Gui_SetGui(NULL);
|
||||
@@ -175,7 +175,7 @@ void _runService(AQH_OBJECT *aqh, AQH_EVENT_LOOP *eventLoop)
|
||||
now=time(NULL);
|
||||
|
||||
if (_diffInSeconds(now, timeLastConnCheck)>CONNCHECK_INTERVAL_IN_SECS) {
|
||||
DBG_ERROR(NULL, "Check connections");
|
||||
DBG_INFO(NULL, "Check connections");
|
||||
AQH_ReactServer_CheckBrokerConnection(aqh);
|
||||
timeLastConnCheck=now;
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ int _startBroker(AQH_OBJECT *o, AQH_REACT_SERVER *xo)
|
||||
DBG_ERROR(NULL, "Error connecting to broker server %s:%d", xo->brokerAddress, xo->brokerPort);
|
||||
return GWEN_ERROR_IO;
|
||||
}
|
||||
DBG_ERROR(NULL, "Physically connected to broker server %s:%d", xo->brokerAddress, xo->brokerPort);
|
||||
DBG_INFO(NULL, "Physically connected to broker server %s:%d", xo->brokerAddress, xo->brokerPort);
|
||||
|
||||
ep=AQH_IpcClientObject_new(AQH_Object_GetEventLoop(o), fd);
|
||||
assert(ep);
|
||||
@@ -496,7 +496,7 @@ int _startBroker(AQH_OBJECT *o, AQH_REACT_SERVER *xo)
|
||||
DBG_ERROR(NULL, "Error connecting to broker: %d", rv);
|
||||
return (rv<0)?rv:GWEN_ERROR_PERMISSIONS;
|
||||
}
|
||||
DBG_ERROR(NULL, "Connected to broker at %s:%d", xo->brokerAddress, xo->brokerPort);
|
||||
DBG_INFO(NULL, "Connected to broker at %s:%d", xo->brokerAddress, xo->brokerPort);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
@@ -596,7 +596,7 @@ void _handleMsgFromBroker(AQH_REACT_SERVER *xo, const AQH_MESSAGE *msg)
|
||||
|
||||
tagList=AQH_IpcMessageTag16_ParsePayload(msg, 0);
|
||||
if (tagList) {
|
||||
DBG_ERROR(NULL, "Received IPC packet %d (%x)", (int) code, code);
|
||||
DBG_INFO(NULL, "Received IPC packet %d (%x)", (int) code, code);
|
||||
switch(code) {
|
||||
case AQH_MSGTYPE_IPC_DATA_DATACHANGED: _handleBrokerChangeData(xo->serverVarChangeUnit, tagList); break;
|
||||
default: break;
|
||||
@@ -620,9 +620,9 @@ void _handleBrokerChangeData(AQHREACT_UNIT *varChangeUnit, const GWEN_TAG16_LIST
|
||||
value=AQH_IpcdMessageMultiData_ReadValue(tagList);
|
||||
if (value) {
|
||||
AQH_IpcdMessageMultiData_ReadDatapoints(tagList, &dataPoints, &numberOfPoints);
|
||||
DBG_ERROR(NULL, "Value changed on server: %s (%d data points)",
|
||||
AQH_Value_GetNameForSystem(value),
|
||||
(int) numberOfPoints);
|
||||
DBG_INFO(NULL, "Value changed on server: %s (%d data points)",
|
||||
AQH_Value_GetNameForSystem(value),
|
||||
(int) numberOfPoints);
|
||||
if (numberOfPoints>0 && dataPoints) {
|
||||
uint32_t i;
|
||||
|
||||
@@ -633,7 +633,7 @@ void _handleBrokerChangeData(AQHREACT_UNIT *varChangeUnit, const GWEN_TAG16_LIST
|
||||
timestamp=*(dataPoints++);
|
||||
u.i=*(dataPoints++);
|
||||
AqHomeReact_UnitVarChanges_ValueUpdated(varChangeUnit, value, timestamp, u.f);
|
||||
DBG_ERROR(NULL, " datapoint: %f", u.f);
|
||||
DBG_INFO(NULL, " datapoint: %f", u.f);
|
||||
}
|
||||
}
|
||||
AQH_Value_free(value);
|
||||
@@ -650,7 +650,7 @@ void AQH_ReactServer_CheckBrokerConnection(AQH_OBJECT *o)
|
||||
if (xo && xo->dbArgs) {
|
||||
if (xo->brokerEndpoint) {
|
||||
if (AQH_Object_GetFlags(xo->brokerEndpoint) & AQH_OBJECT_FLAGS_DELETE) {
|
||||
DBG_ERROR(NULL, "Deleting broker connection");
|
||||
DBG_INFO(NULL, "Deleting broker connection");
|
||||
AQH_Object_Disable(xo->brokerEndpoint);
|
||||
AQH_Object_free(xo->brokerEndpoint);
|
||||
xo->brokerEndpoint=NULL;
|
||||
|
||||
@@ -184,7 +184,7 @@ int _isInsideSuntime(AQHREACT_UNIT *unit)
|
||||
endTimeInMinutes=xunit->sunSetTimeInMinutes+xunit->offsetMinsForSunset;
|
||||
|
||||
result=(nowInMinutes>=startTimeInMinutes && nowInMinutes<=endTimeInMinutes)?1:0;
|
||||
DBG_ERROR(NULL, "Is inside suntime: %d", result);
|
||||
DBG_INFO(NULL, "Is inside suntime: %d", result);
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
@@ -205,13 +205,13 @@ void _updateSuntimes(AQHREACT_UNIT *unit)
|
||||
|
||||
t=AQHomeReact_GetSunriseTimeForDateAndLoc(xunit->date, xunit->latitude, xunit->longitude);
|
||||
xunit->sunRiseTimeInMinutes=_gwenTimeToMinutes(t);
|
||||
DBG_ERROR(NULL, "%s: Sunrise today at %02d:%02d UTC",
|
||||
DBG_INFO(NULL, "%s: Sunrise today at %02d:%02d UTC",
|
||||
GWEN_Date_GetString(xunit->date), xunit->sunRiseTimeInMinutes/60, xunit->sunRiseTimeInMinutes%60);
|
||||
GWEN_Time_free(t);
|
||||
|
||||
t=AQHomeReact_GetSunsetTimeForDateAndLoc(xunit->date, xunit->latitude, xunit->longitude);
|
||||
xunit->sunSetTimeInMinutes=_gwenTimeToMinutes(t);
|
||||
DBG_ERROR(NULL, "%s: Sunset today at %02d:%02d UTC",
|
||||
DBG_INFO(NULL, "%s: Sunset today at %02d:%02d UTC",
|
||||
GWEN_Date_GetString(xunit->date), xunit->sunSetTimeInMinutes/60, xunit->sunSetTimeInMinutes%60);
|
||||
GWEN_Time_free(t);
|
||||
|
||||
@@ -261,7 +261,7 @@ void _readParams(AQHREACT_UNIT *unit)
|
||||
|
||||
xunit=GWEN_INHERIT_GETDATA(AQHREACT_UNIT, AQHREACT_UNIT_SUNTIME, unit);
|
||||
if (xunit) {
|
||||
DBG_ERROR(NULL, "Reading parameters");
|
||||
DBG_INFO(NULL, "Reading parameters");
|
||||
/* default to "Neues Rathaus" Celle ;-) */
|
||||
xunit->latitude=AQHREACT_Unit_GetParamValueDouble(unit, AQHOMEREACT_UNIT_SUNTIME_PARAM_LAT, 52.619425);
|
||||
xunit->longitude=AQHREACT_Unit_GetParamValueDouble(unit, AQHOMEREACT_UNIT_SUNTIME_PARAM_LONG, 10.087891);
|
||||
|
||||
Reference in New Issue
Block a user