mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 07:56:39 +02:00
ESP8266 v0.4.16
* request only one inverter per loop (https://github.com/grindylow/ahoy/issues/53#issuecomment-1147042489) * mqtt loop interval calculated by # of inverters and inverter request interval * limit maximum number of retries * added feature request #62 (readable names for channels) * improved setup page, added javascript to hide / show channel fields ** IMORTANT: memory layout change, all configuration will be lost, except WiFI **
This commit is contained in:
parent
b995cc0a93
commit
f148c41a1f
13 changed files with 260 additions and 117 deletions
|
@ -25,6 +25,7 @@ class mqtt {
|
|||
mAddressSet = true;
|
||||
mClient->setServer(broker, port);
|
||||
|
||||
mPort = port;
|
||||
snprintf(mUser, MQTT_USER_LEN, "%s", user);
|
||||
snprintf(mPwd, MQTT_PWD_LEN, "%s", pwd);
|
||||
snprintf(mTopic, MQTT_TOPIC_LEN, "%s", topic);
|
||||
|
@ -65,6 +66,10 @@ class mqtt {
|
|||
return mTopic;
|
||||
}
|
||||
|
||||
uint16_t getPort(void) {
|
||||
return mPort;
|
||||
}
|
||||
|
||||
void loop() {
|
||||
//DPRINT(F("m"));
|
||||
//if(!mClient->connected())
|
||||
|
@ -88,6 +93,7 @@ class mqtt {
|
|||
PubSubClient *mClient;
|
||||
|
||||
bool mAddressSet;
|
||||
uint16_t mPort;
|
||||
char mUser[MQTT_USER_LEN];
|
||||
char mPwd[MQTT_PWD_LEN];
|
||||
char mTopic[MQTT_TOPIC_LEN];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue