-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from HomeControlAS/no_issue_arduino_lib_manager
No issue arduino lib manager
- Loading branch information
Showing
9 changed files
with
123 additions
and
182 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Syntax Coloring Map For HomeControl-mqtt library | ||
|
||
# Datatypes (KEYWORD1) | ||
HomeControlMagic KEYWORD1 | ||
EndpointOnOff KEYWORD1 | ||
EndpointColor KEYWORD1 | ||
EndpointIdentify KEYWORD1 | ||
EndpointLevel KEYWORD1 | ||
EndpointMotion KEYWORD1 | ||
EndpointTemperature KEYWORD1 | ||
EndpointThermostat KEYWORD1 | ||
|
||
# Methods and Functions (KEYWORD2) | ||
doMagic KEYWORD2 | ||
addEndpoint KEYWORD2 | ||
getState KEYWORD2 | ||
setState KEYWORD2 | ||
setLevel KEYWORD2 | ||
getLevel KEYWORD2 | ||
getColorR KEYWORD2 | ||
getColorG KEYWORD2 | ||
getColorB KEYWORD2 | ||
setTemperature KEYWORD2 | ||
getTemperature KEYWORD2 | ||
setHeatingSetpoint KEYWORD2 | ||
getHeatingSetpoint KEYWORD2 | ||
networkSetSsid KEYWORD2 | ||
networkSetPass KEYWORD2 | ||
networkSetSecure KEYWORD2 | ||
networkSetup KEYWORD2 | ||
networkStart KEYWORD2 | ||
wrapperSetServer KEYWORD2 | ||
wrapperSetUsernamePassword KEYWORD2 | ||
wrapperSetup KEYWORD2 | ||
|
||
# Instances (KEYWORD2) | ||
|
||
# Constants (LITERAL1) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name=homecontrol-mqtt | ||
version=0.1 | ||
author=homecontrol | ||
maintainer=homecontrol | ||
version=1.0.0 | ||
author=Home Control <integration@homecontrol.no> | ||
maintainer=Home Control <integration@homecontrol.no> | ||
sentence=A client library for MQTT messaging. | ||
paragraph= This library allows you to send and receive MQTT messages with HomeControlAS system. | ||
category=Communication | ||
url=https://github.com/HomeControlAS/homecontrol-mqtt | ||
architectures=* | ||
architectures=* | ||
depends=PubSubClient |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#include "EndpointThermostat.h" | ||
#include "HomeControlMagic.h" | ||
#include "debugDefines.h" | ||
#include "helperFunctions.h" | ||
#include "printWrapper.h" | ||
|
||
static char* const CONFIG = "thrmstt"; | ||
|
||
EndpointThermostat::EndpointThermostat(HomeControlMagic* hcm_ptr) | ||
: Endpoint(hcm_ptr) | ||
, m_temperature(0) | ||
{ | ||
m_config = CONFIG; | ||
} | ||
|
||
void EndpointThermostat::setTemperature(double temperature) | ||
{ | ||
m_temperature = temperature; | ||
} | ||
|
||
double EndpointThermostat::getTemperature() | ||
{ | ||
return m_temperature; | ||
} | ||
|
||
void EndpointThermostat::setHeatingSetpoint(double temperature) | ||
{ | ||
m_heating_setpoint = temperature; | ||
} | ||
|
||
double EndpointThermostat::getHeatingSetpoint() | ||
{ | ||
return m_heating_setpoint; | ||
} | ||
|
||
void EndpointThermostat::incomingMessage(char* topic, uint8_t* payload, unsigned int length) | ||
{ | ||
#ifdef ENDPOINT_THERMOSTAT_DEBUG | ||
print(F("Incoming message, EndpointThermostat")); | ||
#endif | ||
|
||
if(lineContains(topic, "chs")) | ||
{ | ||
m_heating_setpoint = extractDouble(payload, length); | ||
} | ||
|
||
else if(lineContains(topic, "shs")) | ||
{ | ||
m_owner->sendMessage("shs", m_heating_setpoint, m_id); | ||
} | ||
|
||
else if(lineContains(topic, "st")) | ||
{ | ||
m_owner->sendMessage("st", m_temperature, m_id); | ||
} | ||
} | ||
|
||
void EndpointThermostat::sendFeedbackMessage() | ||
{ | ||
#ifdef ENDPOINT_THERMOSTAT_DEBUG | ||
print(F("Sending feedback message, EndpointThermostat")); | ||
#endif | ||
|
||
m_owner->sendMessage("st", m_temperature, m_id); | ||
m_owner->sendMessage("shs", m_heating_setpoint, m_id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters