diff --git a/build-flags/build_flags_controllino b/build-flags/build_flags_controllino index f1ebb51..21da758 100644 --- a/build-flags/build_flags_controllino +++ b/build-flags/build_flags_controllino @@ -1,3 +1,4 @@ -DCONTROLLINO -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:07 -DWiz5100 +-DPID_DISABLE diff --git a/build-flags/build_flags_due b/build-flags/build_flags_due index f049f64..ed6dfb3 100644 --- a/build-flags/build_flags_due +++ b/build-flags/build_flags_due @@ -5,4 +5,5 @@ -DARTNET_ENABLE -DOTA -DSTATUSLED +-DPID_DISABLE diff --git a/build-flags/build_flags_due-5100 b/build-flags/build_flags_due-5100 index e61c690..54fdb55 100644 --- a/build-flags/build_flags_due-5100 +++ b/build-flags/build_flags_due-5100 @@ -3,3 +3,4 @@ -DSTATUSLED -DSYSLOG_ENABLE -DWiz5100 +-DPID_DISABLE diff --git a/build-flags/build_flags_due-5500 b/build-flags/build_flags_due-5500 index cf06dbf..c8c0f50 100644 --- a/build-flags/build_flags_due-5500 +++ b/build-flags/build_flags_due-5500 @@ -3,3 +3,4 @@ -DDMX_SMOOTH -DSTATUSLED -DSYSLOG_ENABLE +-DPID_DISABLE diff --git a/build-flags/build_flags_esp32-wifi b/build-flags/build_flags_esp32-wifi index 704b8e3..5a47655 100644 --- a/build-flags/build_flags_esp32-wifi +++ b/build-flags/build_flags_esp32-wifi @@ -13,3 +13,4 @@ #-DARTNET_ENABLE - udp rx errors (( #-DUSE_1W_PIN=16 #-DW5500_CS_PIN=15 +-DPID_DISABLE diff --git a/build-flags/build_flags_esp8266-wifi b/build-flags/build_flags_esp8266-wifi index bdbe26d..4660db1 100644 --- a/build-flags/build_flags_esp8266-wifi +++ b/build-flags/build_flags_esp8266-wifi @@ -7,3 +7,4 @@ -DARTNET_ENABLE -DUSE_1W_PIN=16 -DW5500_CS_PIN=15 +-DPID_DISABLE diff --git a/build-flags/build_flags_lighthub21 b/build-flags/build_flags_lighthub21 index 8ac4def..b8748f1 100644 --- a/build-flags/build_flags_lighthub21 +++ b/build-flags/build_flags_lighthub21 @@ -8,3 +8,4 @@ #-DWiz5500 -DSTATUSLED -DMCP23017 +-DPID_DISABLE diff --git a/build-flags/build_flags_m5stack b/build-flags/build_flags_m5stack index a90f56a..637a1d9 100644 --- a/build-flags/build_flags_m5stack +++ b/build-flags/build_flags_m5stack @@ -9,3 +9,4 @@ -DM5STACK #-DSYSLOG_ENABLE -DUSE_1W_PIN=16 +-DPID_DISABLE diff --git a/build-flags/build_flags_mega2560-5100 b/build-flags/build_flags_mega2560-5100 index b1180b0..7dd7ffe 100644 --- a/build-flags/build_flags_mega2560-5100 +++ b/build-flags/build_flags_mega2560-5100 @@ -2,3 +2,4 @@ -DAVR_DMXOUT_PIN=18 -DSYSLOG_ENABLE -DWiz5100 +-DPID_DISABLE diff --git a/build-flags/build_flags_mega2560-5500 b/build-flags/build_flags_mega2560-5500 index cd8b727..bdf3a8c 100644 --- a/build-flags/build_flags_mega2560-5500 +++ b/build-flags/build_flags_mega2560-5500 @@ -2,3 +2,4 @@ -DMODBUS_DIMMER_PARAM=SERIAL_8E1 -DAVR_DMXOUT_PIN=18 -DSYSLOG_ENABLE +-DPID_DISABLE \ No newline at end of file diff --git a/build-flags/build_flags_mega2560slim-5100 b/build-flags/build_flags_mega2560slim-5100 index f73472e..54b7a7d 100644 --- a/build-flags/build_flags_mega2560slim-5100 +++ b/build-flags/build_flags_mega2560slim-5100 @@ -12,3 +12,4 @@ -DSPILED_DISABLE -DAC_DISABLE -DSYSLOG_ENABLE +-DPID_DISABLE diff --git a/build-flags/build_flags_nrf52840-5500 b/build-flags/build_flags_nrf52840-5500 index e00537f..486230d 100644 --- a/build-flags/build_flags_nrf52840-5500 +++ b/build-flags/build_flags_nrf52840-5500 @@ -11,3 +11,4 @@ -DAC_DISABLE -DSYSLOG_ENABLE -DMBUS_DISABLE +-DPID_DISABLE diff --git a/build-flags/build_flags_stm32-enc2860 b/build-flags/build_flags_stm32-enc2860 index 34ee102..8d34a98 100644 --- a/build-flags/build_flags_stm32-enc2860 +++ b/build-flags/build_flags_stm32-enc2860 @@ -8,3 +8,4 @@ -DCSSHDC_DISABLE -DSPILED_DISABLE -DAC_DISABLE +-DPID_DISABLE diff --git a/compiled/esp32-wifi/StartCounter.ino.bin b/compiled/esp32-wifi/StartCounter.ino.bin new file mode 100644 index 0000000..14732a0 Binary files /dev/null and b/compiled/esp32-wifi/StartCounter.ino.bin differ diff --git a/compiled/esp32-wifi/uploadCounter.sh b/compiled/esp32-wifi/uploadCounter.sh new file mode 100755 index 0000000..476cc79 --- /dev/null +++ b/compiled/esp32-wifi/uploadCounter.sh @@ -0,0 +1 @@ +../tools/mac/arduinoOTA -address 192.168.8.58 -port 65280 -username arduino -password password -sketch StartCounter.ino.bin -b -upload /sketch diff --git a/compiled/esp32-wifi/uploadOTA.sh b/compiled/esp32-wifi/uploadOTA.sh new file mode 100755 index 0000000..cec15bb --- /dev/null +++ b/compiled/esp32-wifi/uploadOTA.sh @@ -0,0 +1 @@ +../tools/mac/arduinoOTA -address 192.168.88.45 -port 65280 -username arduino -password password -sketch firmware.bin -upload /sketch -b \ No newline at end of file diff --git a/config-examples/12-12-12-12-12-12.config.json b/config-examples/12-12-12-12-12-12.config.json new file mode 100644 index 0000000..7177987 --- /dev/null +++ b/config-examples/12-12-12-12-12-12.config.json @@ -0,0 +1,302 @@ +{ + "mqtt":["abc3","192.168.88.2"], + "syslog":["192.168.88.2"], + "dmx":[3,80], + "topics":{"root":"abc"}, + "modbus":[], + "items": + { + "lightall":[7,[ + "lampbedr3", + "lampcab31", + "lampcab32", + "lampsauna3", + "lampbath33", + "lampktc3", + "lampwc3", + "lamp4", + "lampext4", + "lamphall3", + "lampstw3", + "fasadeast", + "bra31", + "lampgst3", + "lampkln3", + "lampbalk3", + "fasadsouth", + "bra32"]], + "gr_hall3":[7,["lamphall3","lampstw3"]], + "gr_gost3":[7,["lampgst3","lampktc3"]], + "relays":[7,["pout0","thermostat","pout2","pout3","pout4","pout5","pout6"]], + "uouts":[7,["unprot0","unprot1","unprot2","unprot3","unprot4","unprot5","unprot6","unprot7"]], + + "mb1":[44,[1,0,3,100]], + "mb2":[44,[1,1,3,100]], + "mb3":[44,[1,2,3,100]], + "mb4":[44,[1,3,3,100]], + "mba":[44,[96,0,0]], + + "lampbedr3":[0,1], + "lampcab31":[0,2], + "lampcab32":[0,3], + + "lampsauna3":[0,4], + "lampbath3":[0,5], + "lampwc3":[0,6], + + "lampktc3":[0,7], + "lamp4":[0,8], + "lamphall3":[0,9], + + "lampext4":[0,10], + "lampstw3":[0,11], + "fasadeast":[0,12], + + "lampgst3":[0,13], + "bra31":[0,14], + "bra32":[0,15], + + "lampbalk3":[0,16], + "fasadsouth":[0,17], + "lampkln3":[0,18], + "lampbar3":[0,21], + + "ledbedr3":[1,22], + "ledcab31":[1,26], + "ledcab32":[1,30], + "ledkab":[7,["ledcab31","ledcab32"]], + "ledsauna31":[1,34], + "ledsauna32":[1,38], + "ledsauna":[7,["ledsauna31","ledsauna32"]], + "led4":[1,42], + + "ledktc31":[1,48], + "ledktc31w":[0,52], + "ledktc32":[1,53], + "ledktc32w":[0,57], + "ledgst31":[1,58], + "ledgst31w":[0,62], + "ledgst32":[1,63], + "ledgst32w":[0,67], + "ledktc3w":[7,["ledktc31w","ledktc32w","ledgst31w","ledgst32w"]], + "ledktc3":[7,["ledktc31","ledktc32","ledgst31","ledgst32"]], + + "fanbath3":[0,68], + "fanwc3":[0,69], + + "pout0":[6,22], + "thermostat":[5,23,33], + "pout2":[6,24], + "water3":[6,25], + "pout4":[3,9], + "pout5":[3,8], + "pout6":[3,11], + "pout7":[6,12], + + + "pwm0" :[3,4], + "pwm1" :[3,5], + "pwm2" :[3,6], + "pwm3" :[3,7], + "pwm10":[3,10], + + + "unprot0":[6,33], + "unprot1":[6,32], + "unprot2":[6,31], + "unprot3":[6,30], + "unprot4":[6,29], + "unprot5":[6,28], + "unprot6":[6,27], + "unprot7":[6,26] + }, + + "in": + [ {"#":42,"emit":"power3","item":"fanwc3"}, + {"#":44,"emit":"in1"}, + {"#":46,"emit":"in2"}, + {"#":49,"emit":"in3"}, + {"#":43,"emit":"in4"}, + {"#":45,"emit":"in5"}, + {"#":47,"emit":"in6"}, + {"#":48,"emit":"in7"}, + {"#":34,"emit":"in8"}, + {"#":36,"emit":"in9"}, + + {"#":38,"T":0, + "click":{"item":"gr_hall3","icmd":"ON"}, + "dclick":{"item":"lampbedr3","icmd":"ON"}, + "tclick":{"item":"lightall","icmd":"REST"}, + "rpcmd":{"item":"gr_hall3","icmd":"%+2"} + }, + {"#":40,"T":0, + "click":{"item":"gr_hall3","icmd":"OFF"}, + "dclick":{"item":"lampbedr3","icmd":"OFF"}, + "tclick":{"item":"lightall","icmd":"HALT"}, + "rpcmd":{"item":"gr_hall3","icmd":"%-2"} + }, + {"#":35,"T":0, + "click":{"item":"gr_gost3","icmd":"ON"}, + "dclick":{"item":"lampwc3","icmd":"ON"}, + "tclick":{"item":"lampbath3","icmd":"ON"}, + "rpcmd":{"item":"gr_gost3","icmd":"%+2"} + }, + {"#":37,"T":0, + "click":{"item":"gr_gost3","icmd":"OFF"}, + "dclick":{"item":"lampwc3","icmd":"OFF"}, + "tclick":{"item":"lampbath3","icmd":"OFF"}, + "rpcmd":{"item":"gr_gost3","icmd":"%-2"} + }, + + {"#":39,"emit":"in14"}, + {"#":41,"emit":"in15"}, + + {"#":54,"T":0,"act": + [ + { + "map":[128,640], + "click":{"item":"gr_gost3","icmd":"ON"}, + "dclick":{"item":"lampwc3","icmd":"ON"}, + "tclick":{"item":"lampbath3","icmd":"ON"}, + "rpcmd":{"item":"gr_gost3","icmd":"%+2"} + }, + { + "map":[641,1024], + "click":{"item":"gr_gost3","icmd":"OFF"}, + "dclick":{"item":"lampwc3","icmd":"OFF"}, + "tclick":{"item":"lampbath3","icmd":"OFF"}, + "rpcmd":{"item":"gr_gost3","icmd":"%-2"} + } + ]}, + {"#":55,"T":66,"emit":"a01","map":[0,1024,0,1024,10]}, + + {"#":56,"T":66,"emit":"a02","map":[0,1024,0,1024,10]}, + {"#":57,"T":66,"emit":"a03","map":[0,1024,0,1024,10]}, + + {"#":58,"T":66,"emit":"a04","map":[0,1024,0,1024,10]}, + {"#":59,"T":66,"emit":"a05","map":[0,1024,0,1024,10]}, + + {"#":60,"T":0,"act": + [ + { + "map":[128,640], + "click":{"item":"gr_hall3","icmd":"ON"}, + "dclick":{"item":"lampbedr3","icmd":"ON"}, + "tclick":{"item":"lightall","icmd":"REST"}, + "rpcmd":{"item":"gr_hall3","icmd":"%+2"} + }, + { + "map":[641,1024], + "click":{"item":"gr_hall3","icmd":"OFF"}, + "dclick":{"item":"lampbedr3","icmd":"OFF"}, + "tclick":{"item":"lightall","icmd":"HALT"}, + "rpcmd":{"item":"gr_hall3","icmd":"%-2"} + } + ]}, + {"#":61,"T":0,"act": + [ + { + "map":[128,640], + "click":{"item":"gr_gost3","icmd":"ON"}, + "dclick":{"item":"lampwc3","icmd":"ON"}, + "tclick":{"item":"lampbath3","icmd":"ON"}, + "rpcmd":{"item":"gr_gost3","icmd":"%+2"} + }, + { + "map":[641,1024], + "click":{"item":"gr_gost3","icmd":"OFF"}, + "dclick":{"item":"lampwc3","icmd":"OFF"}, + "tclick":{"item":"lampbath3","icmd":"OFF"}, + "rpcmd":{"item":"gr_gost3","icmd":"%-2"} + } + ]}, + + {"#":62,"T":66,"emit":"a08","map":[0,1024,0,1024,10]}, + {"#":63,"T":66,"emit":"a09","map":[0,1024,0,1024,10]}, + + {"#":64,"T":66,"emit":"a10","map":[0,1024,0,1024,10]}, + {"#":65,"T":66,"emit":"a11","map":[0,1024,0,1024,10]}, + {"#":66,"T":0,"emit":"leak31","item":"water3","scmd":"OFF","rcmd":"ON"}, + {"#":67,"T":2,"emit":"leak32","item":"water3","scmd":"OFF","rcmd":"ON"}, + {"#":68,"T":0,"emit":"leak33","item":"water3","scmd":"OFF","rcmd":"ON"}, + {"#":69,"T":0,"emit":"a15"} + ], + + "in2": + { "42":{"emit":"power3","item":"fanwc3"}, + "44":{"emit":"in1"}, + "46":{"emit":"in2"}, + "49":{"emit":"in3"}, + "43":{"emit":"in4"}, + "45":{"emit":"in5"}, + "47":{"emit":"in6"}, + "48":{"emit":"in7"}, + "34":{"emit":"in8"}, + "36":{"emit":"in9"}, + + "38":{"T":0, + "click":{"item":"gr_hall3","icmd":"ON"}, + "dclick":{"item":"lampbedr3","icmd":"ON"}, + "tclick":{"item":"lightall","icmd":"REST"}, + "rpcmd":{"item":"gr_hall3","icmd":"%+2"} + }, + "40":{"T":0, + "click":{"item":"gr_hall3","icmd":"OFF"}, + "dclick":{"item":"lampbedr3","icmd":"OFF"}, + "tclick":{"item":"lightall","icmd":"HALT"}, + "rpcmd":{"item":"gr_hall3","icmd":"%-2"} + }, + "35":{"T":0, + "click":{"item":"gr_gost3","icmd":"ON"}, + "dclick":{"item":"lampwc3","icmd":"ON"}, + "tclick":{"item":"lampbath3","icmd":"ON"}, + "rpcmd":{"item":"gr_gost3","icmd":"%+2"} + }, + "37":{"T":0, + "click":{"item":"gr_gost3","icmd":"OFF"}, + "dclick":{"item":"lampwc3","icmd":"OFF"}, + "tclick":{"item":"lampbath3","icmd":"OFF"}, + "rpcmd":{"item":"gr_gost3","icmd":"%-2"} + }, + + "39":{"emit":"in14"}, + "41":{"emit":"in15"}, + + "54":{"addr":54,"T":0,"act": + [ + { + "map":[128,640], + "click":{"item":"gr_gost3","icmd":"ON"}, + "dclick":{"item":"lampwc3","icmd":"ON"}, + "tclick":{"item":"lampbath3","icmd":"ON"}, + "rpcmd":{"item":"gr_gost3","icmd":"%+2"} + }, + { + "map":[641,1024], + "click":{"item":"gr_gost3","icmd":"OFF"}, + "dclick":{"item":"lampwc3","icmd":"OFF"}, + "tclick":{"item":"lampbath3","icmd":"OFF"}, + "rpcmd":{"item":"gr_gost3","icmd":"%-2"} + } + ]}, + "55":{"T":66,"emit":"a01","map":[0,1024,0,1024,10]}, + + "56":{"T":66,"emit":"a02","map":[0,1024,0,1024,10]}, + "57":{"T":66,"emit":"a03","map":[0,1024,0,1024,10]}, + + "58":{"T":66,"emit":"a04","map":[0,1024,0,1024,10]}, + "59":{"T":66,"emit":"a05","map":[0,1024,0,1024,10]}, + + "60":{"T":66,"emit":"a06","map":[0,1024,0,1024,10]}, + "61":{"T":66,"emit":"a07","map":[0,1024,0,1024,10]}, + + "62":{"T":66,"emit":"a08","map":[0,1024,0,1024,10]}, + "63":{"T":66,"emit":"a09","map":[0,1024,0,1024,10]}, + + "64":{"T":66,"emit":"a10","map":[0,1024,0,1024,10]}, + "65":{"T":66,"emit":"a11","map":[0,1024,0,1024,10]}, + "66":{"T":0,"emit":"leak31","item":"water3","scmd":"OFF","rcmd":"ON"}, + "67":{"T":2,"emit":"leak32","item":"water3","scmd":"OFF","rcmd":"ON"}, + "68":{"T":0,"emit":"leak33","item":"water3","scmd":"OFF","rcmd":"ON"} + } + } \ No newline at end of file diff --git a/lighthub/item.cpp b/lighthub/item.cpp index 6ac927a..09df30b 100644 --- a/lighthub/item.cpp +++ b/lighthub/item.cpp @@ -720,6 +720,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem) // continue processing as SET case S_SET: //case S_ESET: + if ((st.getArgType() == ST_RGB || st.getArgType() == ST_RGBW) && (cmd.getArgType() == ST_HSV ) || (cmd.getArgType() == ST_HSV255)) st.setArgType(cmd.getArgType()); if (itemType == CH_GROUP && cmd.isColor()) st.setArgType(ST_HSV);//Extend storage for group channel st.assignFrom(cmd); st.saveItem(this); @@ -1552,13 +1553,22 @@ int Item::SendStatus(int sendFlags) { sendFlags |= getFlag(SEND_COMMAND | SEND_PARAMETERS); //if some delayed status is pending char addrstr[48]; - char valstr[16] = ""; + char valstr[20] = ""; char cmdstr[8] = ""; if (sendFlags & SEND_PARAMETERS) { // Preparing parameters payload ////////// - st.toString(valstr, sizeof(valstr), SEND_PARAMETERS); + switch (st.getArgType()) { + case ST_RGB: + case ST_RGBW: + //valstr[0]='#'; + st.Cmd(CMD_RGB); + st.toString(valstr, sizeof(valstr), SEND_PARAMETERS|SEND_COMMAND); + break; + default: + st.toString(valstr, sizeof(valstr), SEND_PARAMETERS); + } } if (sendFlags & SEND_COMMAND) @@ -1577,6 +1587,7 @@ int Item::SendStatus(int sendFlags) { strcpy_P(cmdstr, OFF_P); break; case CMD_VOID: + case CMD_RGB: sendFlags &= ~SEND_COMMAND; // Not send command for parametrized req break; default: @@ -1623,7 +1634,7 @@ int Item::SendStatus(int sendFlags) { switch (st.getArgType()) { case ST_RGB: case ST_RGBW: - strncat_P(addrstr, RGB_P, sizeof(addrstr)); + strncat_P(addrstr, SET_P, sizeof(addrstr)); break; case ST_PERCENTS255: case ST_HSV255: diff --git a/lighthub/itemCmd.cpp b/lighthub/itemCmd.cpp index e64615b..aa3d213 100644 --- a/lighthub/itemCmd.cpp +++ b/lighthub/itemCmd.cpp @@ -384,8 +384,10 @@ itemCmd itemCmd::assignFrom(itemCmd from) switch (from.cmd.itemArgType) { case ST_RGBW: + RGBW_flag=true; case ST_RGB: param.asInt32=from.param.asInt32; + cmd.itemArgType=from.cmd.itemArgType; break; // Those types are not possible to apply over RGB without convertion toward HSV case ST_PERCENTS255: diff --git a/lighthub/modules/out_pid.cpp b/lighthub/modules/out_pid.cpp new file mode 100644 index 0000000..04ce8f9 --- /dev/null +++ b/lighthub/modules/out_pid.cpp @@ -0,0 +1,217 @@ +#ifndef PID_DISABLE + +#include "modules/out_pid.h" +#include "Arduino.h" +#include "options.h" +#include "utils.h" +#include "Streaming.h" +#include "item.h" +#include "main.h" + +bool out_pid::getConfig() +{ + double kP=0.0; + double kI=0.0; + double kD=0.0; + int direction = DIRECT; + + // Retrieve and store + if (!store || !item || !item->itemArg || (item->itemArg->type != aJson_Array) || aJson.getArraySize(item->itemArg)<2) + { + errorSerial<itemArg<itemArg->type != aJson_Array)<itemArg)<2)<itemArg, 0); + if (kPIDObj->type != aJson_Array) + { + errorSerial<type == aJson_Float) kD=param->valuefloat; + case 2: + param = aJson.getArrayItem(kPIDObj, 1); + if (param->type == aJson_Float) kI=param->valuefloat; + case 1: + param = aJson.getArrayItem(kPIDObj, 0); + if (param->type == aJson_Float) kP=param->valuefloat; + if (kP<0) + { + kP=-kP; + direction=REVERSE; + } + } + + switch (item->itemVal->type) + { + case aJson_Int: item->itemVal->valuefloat = item->itemVal->valueint; + break; + case aJson_Float: + break; + default: + + } + + item->itemVal->type = aJson_Float; + + if (!store->pid) store->pid= new PID (&store->input, &store->output, &item->itemVal->valuefloat, kP, kI, kD, direction); + + return true; + //store->addr=item->getArg(0); + } + + +int out_pid::Setup() +{ +if (!store) store= (pidPersistent *)item->setPersistent(new pidPersistent); +if (!store) + { errorSerial<timestamp=millis(); +if (getConfig()) + { + //item->clearFlag(ACTION_NEEDED); + //item->clearFlag(ACTION_IN_PROCESS); + infoSerial<itemArr->name<driverStatus = CST_INITIALIZED; + return 1; + } +else + { errorSerial<driverStatus = CST_FAILED; + return 0; + } + +} + +int out_pid::Stop() +{ +Serial.println("Modbus De-Init"); +if (store) delete (store->pid()); +delete store; +item->setPersistent(NULL); +store = NULL; +return 1; +} + +int out_pid::Status() +{ +if (store) + return store->driverStatus; +return CST_UNKNOWN; +} + +int out_pid::isActive() +{ +return item->getVal(); +} + + +int out_pid::Poll(short cause) +{ +if ((Status() == CST_INITIALIZED) && isTimeOver(store->timestamp,millis(),store->pollingInterval)) + { + + store->timestamp=millis(); + debugSerial<itemArr->name << endl; + + } + +return store->pollingInterval; +}; + +int out_pid::getChanType() +{ + return CH_MODBUS; +} + + +//!Control unified Modbus item +// Priority of selection sub-items control to: +// 1. if defined standard suffix Code inside cmd +// 2. custom textual subItem +// 3. non-standard numeric suffix Code equal param id + +int out_pid::Ctrl(itemCmd cmd, char* subItem, bool toExecute) +{ +//int chActive = item->isActive(); +//bool toExecute = (chActive>0); +//itemCmd st(ST_UINT32,CMD_VOID); +int suffixCode = cmd.getSuffix(); +aJsonObject *templateParamObj = NULL; +short mappedCmdVal = 0; + +// trying to find parameter in template with name == subItem (NB!! standard suffixes dint working here) +if (subItem && strlen (subItem)) templateParamObj = aJson.getObjectItem(store->parameters, subItem); + +if (!templateParamObj) +{ + // Trying to find template parameter where id == suffixCode + templateParamObj = store->parameters->child; + + while (templateParamObj) + { + //aJsonObject *regObj = aJson.getObjectItem(paramObj, "reg"); + aJsonObject *idObj = aJson.getObjectItem(templateParamObj, "id"); + if (idObj->type==aJson_Int && idObj->valueint == suffixCode) break; + + aJsonObject *mapObj = aJson.getObjectItem(templateParamObj, "mapcmd"); + if (mapObj && (mappedCmdVal = cmd.doReverseMappingCmd(mapObj))) break; + + templateParamObj=templateParamObj->next; + } +} + + +// aJsonObject *typeObj = aJson.getObjectItem(paramObj, "type"); +// aJsonObject *mapObj = aJson.getObjectItem(paramObj, "map"); +// aJsonObject * itemParametersObj = aJson.getArrayItem(item->itemArg, 2); +// uint16_t data = node.getResponseBuffer(posInBuffer); + + + +if (cmd.isCommand() && !suffixCode) suffixCode=S_CMD; //if some known command find, but w/o correct suffix - got it + +switch(suffixCode) +{ +case S_NOTFOUND: + // turn on and set +toExecute = true; +debugSerial< +#include +#include + + +class pidPersistent : public chPersistent { +public: + PID pid; + double output; + double input; + int driverStatus; +}; + + + +class out_pid : public abstractOut { +public: + + out_pid(Item * _item):abstractOut(_item){store = (pidPersistent *) item->getPersistent();}; + int Setup() override; + int Poll(short cause) override; + int Stop() override; + int Status() override; + int isActive() override; + int getChanType() override; + int Ctrl(itemCmd cmd, char* subItem=NULL, bool toExecute=true) override; + + +protected: + pidPersistent * store; + bool getConfig(); +}; +#endif diff --git a/platformio.ini b/platformio.ini index edd9920..fc788b3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,4 +1,4 @@ -; PlatformIO Project Configuration File (for copy and paste) +; PlatformIO Project Configuration File ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags @@ -6,30 +6,29 @@ ; Advanced options: extra scripting ; ; Please visit documentation for the other options and examples -; http://docs.platformio.org/page/projectconf.html +; https://docs.platformio.org/page/projectconf.html + [platformio] -;home_dir = C:\platformio src_dir = lighthub -;monitor_speed = 115200 -default_envs = +default_envs = ; ****** UNCOMMENT single environment name for target platform below ******* ; Arduino Mega (without onewire) + Ethernet shield Wiznet 5100 ; mega2560slim-5100 ; Arduino Mega + Ethernet shield Wiznet 5100 ; mega2560-5100 - + ; Arduino Mega + Ethernet shield Wiznet 5500 ; mega2560-5500 ; LightHub controller HW revision 2.1 and above (Wiznet 5500 CS on pin 53) - lighthub21 +; lighthub21 ; Arduino DUE + Ethernet shield Wiznet 5100 ; due-5100 ; Generic DUE -; due + due ; Arduino DUE + Ethernet shield Wiznet 5500 ; due-5500 @@ -62,373 +61,366 @@ monitor_baud = 115200 ;upload_port = /dev/cu.SLAB_USBtoUART framework = arduino build_flags = !python get_build_flags.py nrf52840-5500 -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - ESP_EEPROM - DmxSimple - DMXSerial - DmxDue - EEPROM - SD - SdFat - WifiManager - Ethernet - Ethernet3 - Ethernet5100 - httpClient - FastLED - ESPDMX - ESP-Dmx - DueFlashStorage - PrintEx - ;DHT sensor library - DHT sensor library for ESPx - ;Adafruit Unified Sensor - WebServer - UIPEthernet - ;Adafruit_Sensor - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library - ESP8266HTTPClient - M5Stack + ESP_EEPROM + DmxSimple + DMXSerial + DmxDue + EEPROM + SD + SdFat + WifiManager + Ethernet + Ethernet3 + Ethernet5100 + httpClient + FastLED + ESPDMX + ESP-Dmx + DueFlashStorage + PrintEx + DHT sensor library for ESPx + WebServer + UIPEthernet + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library + ESP8266HTTPClient + M5Stack ;ArduinoOTA -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/Ethernet2 - ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/knolleary/pubsubclient.git +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/Ethernet2 + ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/knolleary/pubsubclient.git ; https://github.com/anklimov/Artnet.git ; FastLED@3.3.2 - Adafruit Unified Sensor - DHT sensor library - Streaming - https://github.com/anklimov/NRFFlashStorage - https://github.com/adafruit/Adafruit_NeoPixel.git - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - https://github.com/arcao/Syslog.git - - - + Adafruit Unified Sensor + DHT sensor library + Streaming + https://github.com/anklimov/NRFFlashStorage + https://github.com/adafruit/Adafruit_NeoPixel.git + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + https://github.com/arcao/Syslog.git + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:m5stack] platform = espressif32 board = m5stack-core-esp32 -monitor_baud = 115200 framework = arduino upload_speed = 921600 build_flags = !python get_build_flags.py m5stack -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DmxSimple - DMXSerial - DmxDue - DueFlashStorage - SD - SdFat - Ethernet - Ethernet2 - Ethernet3 - Ethernet5100 - EEPROM - Artnet - UIPEthernet - ESP_EEPROM - httpClient - HttpClient_ID66 - HttpClient - ArduinoHttpClient -lib_deps = - https://github.com/ebenolson/WIFIMANAGER-ESP32.git - https://github.com/zhouhan0126/WebServer-esp32.git - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/knolleary/pubsubclient.git - Streaming + DmxSimple + DMXSerial + DmxDue + DueFlashStorage + SD + SdFat + Ethernet + Ethernet2 + Ethernet3 + Ethernet5100 + EEPROM + Artnet + UIPEthernet + ESP_EEPROM + httpClient + HttpClient_ID66 + HttpClient + ArduinoHttpClient +lib_deps = + https://github.com/ebenolson/WIFIMANAGER-ESP32.git + https://github.com/zhouhan0126/WebServer-esp32.git + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/knolleary/pubsubclient.git + Streaming ;ESP_EEPROM - https://github.com/anklimov/NRFFlashStorage - Adafruit Unified Sensor - DHT sensor library for ESPx - https://github.com/anklimov/Artnet.git - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/ESP-Dmx - FastLED@3.3.2 - ClosedCube HDC1080 + https://github.com/anklimov/NRFFlashStorage + Adafruit Unified Sensor + DHT sensor library for ESPx + https://github.com/anklimov/Artnet.git + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/ESP-Dmx + FastLED@3.3.2 + ClosedCube HDC1080 ;SparkFun CCS811 Arduino Library - SparkFun CCS811 Arduino Library@~1.0.7 - M5Stack - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - https://github.com/arcao/Syslog.git + SparkFun CCS811 Arduino Library@~1.0.7 + M5Stack + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + https://github.com/arcao/Syslog.git + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:esp32-wifi] platform = espressif32 framework = arduino -monitor_baud = 115200 monitor_filters = esp32_exception_decoder build_type = debug -;board = pico32 board = esp32-evb upload_speed = 115200 build_flags = !python get_build_flags.py esp32-wifi -lib_ignore = +lib_ignore = ;COMMENT/UNCOMMENT next line for software 1-wire driver on/off ;DS2482_OneWire - DmxSimple - DMXSerial - DmxDue - DueFlashStorage - SD - SdFat - Ethernet - Ethernet2 - Ethernet3 - Ethernet5100 - EEPROM - UIPEthernet - ESP_EEPROM - httpClient - HttpClient_ID66 - HttpClient - ArduinoHttpClient - M5Stack -lib_deps = - https://github.com/ebenolson/WIFIMANAGER-ESP32.git - https://github.com/zhouhan0126/WebServer-esp32.git - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/knolleary/pubsubclient.git - Streaming + DmxSimple + DMXSerial + DmxDue + DueFlashStorage + SD + SdFat + Ethernet + Ethernet2 + Ethernet3 + Ethernet5100 + EEPROM + UIPEthernet + ESP_EEPROM + httpClient + HttpClient_ID66 + HttpClient + ArduinoHttpClient + M5Stack +lib_deps = + https://github.com/ebenolson/WIFIMANAGER-ESP32.git + https://github.com/zhouhan0126/WebServer-esp32.git + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/knolleary/pubsubclient.git + Streaming ;ESP_EEPROM - https://github.com/anklimov/NRFFlashStorage - Adafruit Unified Sensor - DHT sensor library for ESPx - https://github.com/anklimov/Artnet.git - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/ESP-Dmx - FastLED@3.3.2 - ClosedCube HDC1080 - ;SparkFun CCS811 Arduino Library - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel + https://github.com/anklimov/NRFFlashStorage + Adafruit Unified Sensor + DHT sensor library for ESPx + https://github.com/anklimov/Artnet.git + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/ESP-Dmx + FastLED@3.3.2 + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - https://github.com/arcao/Syslog.git - + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + https://github.com/arcao/Syslog.git + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:due-5100] platform = atmelsam framework = arduino board = due -monitor_baud = 115200 build_flags = !python get_build_flags.py due-5100 -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - ESP_EEPROM - DMXSerial - DmxSimple - httpClient - ESPDMX - ESP-Dmx - WifiManager - Ethernet3 - NRFFlashStorage - WebServer - UIPEthernet - EEPROM - M5Stack + DHT sensor library for ESPx + ESP_EEPROM + DMXSerial + DmxSimple + httpClient + ESPDMX + ESP-Dmx + WifiManager + Ethernet3 + NRFFlashStorage + WebServer + UIPEthernet + EEPROM + M5Stack ;ArduinoOTA -lib_deps = - https://github.com/sebnil/DueFlashStorage - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet5100 - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - SD - SdFat - Adafruit Unified Sensor - DHT sensor library - https://github.com/arcao/Syslog.git - Streaming - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet5100 + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + SD + SdFat + Adafruit Unified Sensor + DHT sensor library + https://github.com/arcao/Syslog.git + Streaming + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:due] ;Experimental target with universal Ethernet Library platform = atmelsam framework = arduino board = due -monitor_baud = 115200 build_flags = !python get_build_flags.py due ; Need to place arduinoOTA utility from Arduino IDE distribution to folder in your PATH ;fix address and password ;upload_flags = upload_command = arduinoOTA -address 192.168.88.21 -port 65280 -username arduino -password password -b -upload /sketch -sketch $SOURCE upload_protocol = custom -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - ESP_EEPROM - DMXSerial - DmxSimple - httpClient - ESPDMX - ESP-Dmx - WifiManager - Ethernet3 - Ethernet2 - Ethernet5100 - NRFFlashStorage - WebServer - UIPEthernet - EEPROM - M5Stack + DHT sensor library for ESPx + ESP_EEPROM + DMXSerial + DmxSimple + httpClient + ESPDMX + ESP-Dmx + WifiManager + Ethernet3 + Ethernet2 + Ethernet5100 + NRFFlashStorage + WebServer + UIPEthernet + EEPROM + M5Stack ;ArduinoOTA -lib_deps = - https://github.com/sebnil/DueFlashStorage - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet.git - ;https://github.com/anklimov/Ethernet2.git - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - SD - SdFat - Adafruit Unified Sensor - DHT sensor library - https://github.com/arcao/Syslog.git - Streaming - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet.git + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + SD + SdFat + Adafruit Unified Sensor + DHT sensor library + https://github.com/arcao/Syslog.git + Streaming + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:mega2560slim-5100] platform = atmelavr board = megaatmega2560 -monitor_baud = 115200 -;upload_port = net:192.168.88.31:23 upload_port = net:192.168.88.2:23000 framework = arduino build_flags = !python get_build_flags.py mega2560slim-5100 -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - DmxDue - DueFlashStorage - WifiManager - Ethernet3 - Ethernet2 - HTTPClient - NRFFlashStorage - WebServer - UIPEthernet - ESP_EEPROM - M5Stack -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/httpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet + DHT sensor library for ESPx + DmxDue + DueFlashStorage + WifiManager + Ethernet3 + Ethernet2 + HTTPClient + NRFFlashStorage + WebServer + UIPEthernet + ESP_EEPROM + M5Stack +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet ;5100 lib have ~90 bytes less footprint of RAM - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - ;EEPROM - Adafruit Unified Sensor - DHT sensor library - https://github.com/arcao/Syslog.git - Streaming - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + Adafruit Unified Sensor + DHT sensor library + https://github.com/arcao/Syslog.git + Streaming + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:mega2560-5500] platform = atmelavr board = megaatmega2560 -monitor_baud = 115200 framework = arduino build_flags = !python get_build_flags.py mega2560-5500 -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - DmxDue - DueFlashStorage - WifiManager - Ethernet - Ethernet3 - Ethernet5100 - HTTPClient - NRFFlashStorage - WebServer - UIPEthernet - ESP_EEPROM - M5Stack -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/httpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet2 - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - Adafruit Unified Sensor - DHT sensor library - https://github.com/arcao/Syslog.git - Streaming - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - + DHT sensor library for ESPx + DmxDue + DueFlashStorage + WifiManager + Ethernet + Ethernet3 + Ethernet5100 + HTTPClient + NRFFlashStorage + WebServer + UIPEthernet + ESP_EEPROM + M5Stack +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet2 + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + Adafruit Unified Sensor + DHT sensor library + https://github.com/arcao/Syslog.git + Streaming + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:esp8266-wifi] platform = espressif8266 framework = arduino board = nodemcuv2 -monitor_baud = 115200 upload_protocol = esptool ;upload_protocol = espota @@ -438,303 +430,301 @@ upload_protocol = esptool ; --auth=password ; --port=65280 build_flags = !python get_build_flags.py esp8266-wifi -lib_ignore = +lib_ignore = ;COMMENT/UNCOMMENT next line for software 1-wire driver on/off - DS2482_OneWire - DmxSimple - DMXSerial - DmxDue - DueFlashStorage - SD - SdFat - httpClient - HTTPClient - HttpClient_ID66 - HttpClient - ArduinoHttpClient - Ethernet3 - Ethernet2 - Ethernet5100 - Ethernet - NRFFlashStorage - UIPEthernet - EEPROM - M5Stack -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git + DS2482_OneWire + DmxSimple + DMXSerial + DmxDue + DueFlashStorage + SD + SdFat + httpClient + HTTPClient + HttpClient_ID66 + HttpClient + ArduinoHttpClient + Ethernet3 + Ethernet2 + Ethernet5100 + Ethernet + NRFFlashStorage + UIPEthernet + EEPROM + M5Stack +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git ;COMMENT/UNCOMMENT next line for software 1-wire driver on/off ;https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/ESP-Dmx - ESP8266HTTPClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - https://github.com/FastLED/FastLED.git - Adafruit Unified Sensor - DHT sensor library for ESPx - DHT sensor library - WifiManager - https://github.com/arcao/Syslog.git - Streaming - ESP_EEPROM - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA.git - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - - + https://github.com/anklimov/ESP-Dmx + ESP8266HTTPClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + https://github.com/FastLED/FastLED.git + Adafruit Unified Sensor + DHT sensor library for ESPx + DHT sensor library + WifiManager + https://github.com/arcao/Syslog.git + Streaming + ESP_EEPROM + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA.git + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:mega2560-5100] platform = atmelavr board = megaatmega2560 -monitor_baud = 115200 framework = arduino upload_port = net:192.168.88.2:23000 build_flags = !python get_build_flags.py mega2560-5100 -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - DmxDue - DueFlashStorage - ESPDMX - ESP-Dmx - WifiManager - Ethernet3 - Ethernet2 - Ethernet - NRFFlashStorage - WebServer - UIPEthernet - ESP_EEPROM - M5Stack -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/httpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet5100 - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - Adafruit Unified Sensor - DHT sensor library - https://github.com/arcao/Syslog.git - Streaming - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + DHT sensor library for ESPx + DmxDue + DueFlashStorage + ESPDMX + ESP-Dmx + WifiManager + Ethernet3 + Ethernet2 + Ethernet + NRFFlashStorage + WebServer + UIPEthernet + ESP_EEPROM + M5Stack +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet5100 + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + Adafruit Unified Sensor + DHT sensor library + https://github.com/arcao/Syslog.git + Streaming + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:due-5500] platform = atmelsam framework = arduino board = due -monitor_baud = 115200 -;build_flags = !bash check_custom_build_flags_due-5500.sh build_flags = !python get_build_flags.py due-5500 -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - ESPDMX - ESP-Dmx - DMXSerial - WifiManager - DmxSimple - httpClient - Ethernet - Ethernet3 - Ethernet5100 - NRFFlashStorage - WebServer - UIPEthernet - ESP_EEPROM - EEPROM - M5Stack - ;ArduinoOTA -lib_deps = - https://github.com/sebnil/DueFlashStorage - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/Ethernet2 - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - SD - SdFat - Adafruit Unified Sensor - DHT sensor library - https://github.com/arcao/Syslog.git - Streaming - https://github.com/livello/PrintEx#is-select-redecl - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + DHT sensor library for ESPx + ESPDMX + ESP-Dmx + DMXSerial + WifiManager + DmxSimple + httpClient + Ethernet + Ethernet3 + Ethernet5100 + NRFFlashStorage + WebServer + UIPEthernet + ESP_EEPROM + EEPROM + M5Stack +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet2 + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + SD + SdFat + Adafruit Unified Sensor + DHT sensor library + https://github.com/arcao/Syslog.git + Streaming + https://github.com/livello/PrintEx#is-select-redecl + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:lighthub21] platform = atmelsam framework = arduino board = due -monitor_baud = 115200 build_flags = !python get_build_flags.py lighthub21 ;upload_command = arduinoOTA -address 192.168.11.172 -port 65280 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;upload_command = arduinoOTA -address 192.168.88.34 -port 65280 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;upload_protocol = custom -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - ESPDMX - ESP-Dmx - DMXSerial - WifiManager - DmxSimple - httpClient - Ethernet2 - ;Ethernet - Ethernet3 - Ethernet5100 - NRFFlashStorage - WebServer - UIPEthernet - ESP_EEPROM - EEPROM - M5Stack - ;ArduinoOTA -lib_deps = - https://github.com/sebnil/DueFlashStorage - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxDue - ArduinoHttpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - ;https://github.com/anklimov/Ethernet2 - https://github.com/anklimov/Ethernet - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - SD - SdFat - Adafruit Unified Sensor - DHT sensor library - https://github.com/arcao/Syslog.git - Streaming - https://github.com/livello/PrintEx#is-select-redecl - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - + DHT sensor library for ESPx + ESPDMX + ESP-Dmx + DMXSerial + WifiManager + DmxSimple + httpClient + Ethernet2 + Ethernet3 + Ethernet5100 + NRFFlashStorage + WebServer + UIPEthernet + ESP_EEPROM + EEPROM + M5Stack +lib_deps = + https://github.com/sebnil/DueFlashStorage + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxDue + ArduinoHttpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/Ethernet + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + SD + SdFat + Adafruit Unified Sensor + DHT sensor library + https://github.com/arcao/Syslog.git + Streaming + https://github.com/livello/PrintEx#is-select-redecl + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:controllino] platform = atmelavr board = megaatmega2560 -monitor_baud = 115200 framework = arduino build_flags = !python get_build_flags.py controllino -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - DmxDue - DueFlashStorage - ESPDMX - ESP-Dmx - WifiManager - Ethernet3 - Ethernet2 - NRFFlashStorage - WebServer - UIPEthernet - ESP_EEPROM - M5Stack -lib_deps = - https://github.com/anklimov/Arduino-Temperature-Control-Library.git - https://github.com/anklimov/DS2482_OneWire - https://github.com/anklimov/DmxSimple - https://github.com/anklimov/httpClient - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - https://github.com/anklimov/ModbusMaster - https://github.com/anklimov/DMXSerial - https://github.com/anklimov/Ethernet5100 - https://github.com/knolleary/pubsubclient.git - https://github.com/anklimov/Artnet.git - FastLED@3.3.2 - ;EEPROM - Adafruit Unified Sensor - DHT sensor library - Streaming - https://github.com/livello/PrintEx#is-select-redecl - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library@~1.0.7 - Adafruit NeoPixel - https://github.com/anklimov/ArduinoOTA - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - https://github.com/arcao/Syslog.git + DHT sensor library for ESPx + DmxDue + DueFlashStorage + ESPDMX + ESP-Dmx + WifiManager + Ethernet3 + Ethernet2 + NRFFlashStorage + WebServer + UIPEthernet + ESP_EEPROM + M5Stack +lib_deps = + https://github.com/anklimov/Arduino-Temperature-Control-Library.git + https://github.com/anklimov/DS2482_OneWire + https://github.com/anklimov/DmxSimple + https://github.com/anklimov/httpClient + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + https://github.com/anklimov/ModbusMaster + https://github.com/anklimov/DMXSerial + https://github.com/anklimov/Ethernet5100 + https://github.com/knolleary/pubsubclient.git + https://github.com/anklimov/Artnet.git + FastLED@3.3.2 + Adafruit Unified Sensor + DHT sensor library + Streaming + https://github.com/livello/PrintEx#is-select-redecl + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library@~1.0.7 + Adafruit NeoPixel + https://github.com/anklimov/ArduinoOTA + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + https://github.com/arcao/Syslog.git + br3ttb/PID@^1.2.1 +monitor_speed = 115200 [env:stm32-enc2860] platform = ststm32 framework = arduino board = nucleo_f103rb -monitor_baud = 115200 upload_protocol = stlink debug_tool = stlink build_flags = !python get_build_flags.py stm32-enc2860 -lib_ignore = +lib_ignore = ;DS2482_OneWire //UNCOMMENT for software 1-wire driver - DHT sensor library for ESPx - DmxDue - DueFlashStorage - ESPDMX - ESP-Dmx - WifiManager - FastLED - Ethernet - DMXSerial - DmxSimple - httpClient - SD - PrintEx - Ethernet2 - Artnet - Ethernet3 - WebServer - ESP_EEPROM - DHT sensor library - DallasTemperature - Adafruit Unified Sensor - DS2482_OneWire - ModbusMaster - Syslog - EEPROM - ClosedCube HDC1080 - SparkFun CCS811 Arduino Library - M5Stack - ArduinoOTA -lib_deps = - https://github.com/anklimov/aJson - https://github.com/anklimov/CmdArduino - ArduinoHttpClient - https://github.com/knolleary/pubsubclient.git - Streaming - UIPEthernet - https://github.com/anklimov/NRFFlashStorage - Adafruit NeoPixel - https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library - SPI + DHT sensor library for ESPx + DmxDue + DueFlashStorage + ESPDMX + ESP-Dmx + WifiManager + FastLED + Ethernet + DMXSerial + DmxSimple + httpClient + SD + PrintEx + Ethernet2 + Artnet + Ethernet3 + WebServer + ESP_EEPROM + DHT sensor library + DallasTemperature + Adafruit Unified Sensor + DS2482_OneWire + ModbusMaster + Syslog + EEPROM + ClosedCube HDC1080 + SparkFun CCS811 Arduino Library + M5Stack + ArduinoOTA +lib_deps = + https://github.com/anklimov/aJson + https://github.com/anklimov/CmdArduino + ArduinoHttpClient + https://github.com/knolleary/pubsubclient.git + Streaming + UIPEthernet + https://github.com/anklimov/NRFFlashStorage + Adafruit NeoPixel + https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library + SPI + br3ttb/PID@^1.2.1 +monitor_speed = 115200 diff --git a/spare_files/ArduinoOTA b/spare_files/ArduinoOTA new file mode 160000 index 0000000..8feeea7 --- /dev/null +++ b/spare_files/ArduinoOTA @@ -0,0 +1 @@ +Subproject commit 8feeea77869a5039857d2d23d0a46f8a8fe1514a