fix ambiguous overload error with json depency of homie by specifying older version
This commit is contained in:
parent
53c65bd46c
commit
6349c2386d
|
@ -17,6 +17,8 @@ data_dir=data_sensoresp2
|
||||||
#data_dir=data_sensoresp3
|
#data_dir=data_sensoresp3
|
||||||
#data_dir=data_sensoresp4
|
#data_dir=data_sensoresp4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Arbeitszimmer
|
#Arbeitszimmer
|
||||||
[env:sensoresp1]
|
[env:sensoresp1]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
|
@ -52,6 +54,7 @@ build_flags =
|
||||||
lib_deps =
|
lib_deps =
|
||||||
Adafruit BMP085 Library@1.1.0
|
Adafruit BMP085 Library@1.1.0
|
||||||
DHT sensor library@1.3.10
|
DHT sensor library@1.3.10
|
||||||
|
ArduinoJson@6.16.1 #dependency of homie. using older version because of "ambiguous overload for operator|" error
|
||||||
Homie@3.0.0
|
Homie@3.0.0
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,8 +81,9 @@ build_flags =
|
||||||
-D dataSDS018_pm10_minchange=4
|
-D dataSDS018_pm10_minchange=4
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
MHZ19@0.0.1
|
klevytskyi/MHZ19@0.0.1
|
||||||
EspSoftwareSerial@6.8.1
|
EspSoftwareSerial@6.8.1
|
||||||
|
ArduinoJson@6.16.1 #dependency of homie. using older version because of "ambiguous overload for operator|" error
|
||||||
Homie@3.0.0
|
Homie@3.0.0
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +99,7 @@ monitor_speed = 115200
|
||||||
build_flags =
|
build_flags =
|
||||||
-D SENSOR_DHT22
|
-D SENSOR_DHT22
|
||||||
-D DHTPIN=D7
|
-D DHTPIN=D7
|
||||||
-D dataDHT22_temperature_minchange=0.1
|
-D dataDHT22_temperature_minchange=0.2
|
||||||
-D dataDHT22_humidity_minchange=1.0
|
-D dataDHT22_humidity_minchange=1.0
|
||||||
|
|
||||||
-D SENSOR_PIR
|
-D SENSOR_PIR
|
||||||
|
@ -109,7 +113,8 @@ build_flags =
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
adafruit/DHT sensor library@1.3.10
|
adafruit/DHT sensor library@1.3.10
|
||||||
BH1750@1.1.4
|
claws/BH1750@1.1.4
|
||||||
|
ArduinoJson@6.16.1 #dependency of homie. using older version because of "ambiguous overload for operator|" error
|
||||||
Homie@3.0.0
|
Homie@3.0.0
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,7 +130,7 @@ monitor_speed = 115200
|
||||||
build_flags =
|
build_flags =
|
||||||
-D SENSOR_DHT22
|
-D SENSOR_DHT22
|
||||||
-D DHTPIN=D7
|
-D DHTPIN=D7
|
||||||
-D dataDHT22_temperature_minchange=0.1
|
-D dataDHT22_temperature_minchange=0.2
|
||||||
-D dataDHT22_humidity_minchange=1.0
|
-D dataDHT22_humidity_minchange=1.0
|
||||||
|
|
||||||
-D SENSOR_PIR
|
-D SENSOR_PIR
|
||||||
|
@ -145,7 +150,10 @@ build_flags =
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
adafruit/DHT sensor library@1.3.10
|
adafruit/DHT sensor library@1.3.10
|
||||||
BH1750@1.1.4
|
claws/BH1750@1.1.4
|
||||||
MHZ19@0.0.1
|
klevytskyi/MHZ19@0.0.1
|
||||||
EspSoftwareSerial@6.8.1
|
EspSoftwareSerial@6.8.1
|
||||||
|
ArduinoJson@6.16.1 #dependency of homie. using older version because of "ambiguous overload for operator|" error
|
||||||
Homie@3.0.0
|
Homie@3.0.0
|
||||||
|
|
||||||
|
|
||||||
|
|
19
src/main.cpp
19
src/main.cpp
|
@ -4,18 +4,6 @@
|
||||||
//Compile and upload: platformio run --environment sensorespx -t upload
|
//Compile and upload: platformio run --environment sensorespx -t upload
|
||||||
//Spiffs data upload with (comment in data_dir line unter platformio section): platformio run --environment sensorespx -t uploadfs
|
//Spiffs data upload with (comment in data_dir line unter platformio section): platformio run --environment sensorespx -t uploadfs
|
||||||
|
|
||||||
/* DELETE BELOW
|
|
||||||
// DHT22
|
|
||||||
#define SENSOR_DHT22
|
|
||||||
#define DHTPIN D7 // Digital pin connected to the DHT sensor. // dht pins: 1=power, 2=data, 3=NC, 4=GND. 10k from data to power needed
|
|
||||||
|
|
||||||
// PIR Sensors HC-SR501 (modified to put out shortest pulse time)
|
|
||||||
#define SENSOR_PIR
|
|
||||||
#define PIRPIN D6 //pir sensor needs 5v. output level is 3.3v
|
|
||||||
|
|
||||||
//BH1750 Lux Sensor
|
|
||||||
#define SENSOR_BH1750
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//GPIO2 is blue led on wemos_d1
|
//GPIO2 is blue led on wemos_d1
|
||||||
|
@ -27,9 +15,6 @@
|
||||||
#define FW_NAME "sensoresp" //gets printed on topic/$fw/name
|
#define FW_NAME "sensoresp" //gets printed on topic/$fw/name
|
||||||
#define FW_VERSION "1.0.0" //gets printed on topic/$fw/version
|
#define FW_VERSION "1.0.0" //gets printed on topic/$fw/version
|
||||||
|
|
||||||
#ifdef SENSOR_LDR
|
|
||||||
int get_lux(const unsigned int* _in, const unsigned int* _out, byte size); //for analog ldr light calculation
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct sensordata
|
struct sensordata
|
||||||
{
|
{
|
||||||
|
@ -92,6 +77,7 @@ struct sensordata
|
||||||
static const unsigned int out_ldr[] = {0, 30, 50, 60, 130, 170, 250, 420, 780, 1300,2600, 5000, 5350, 7700, 10900, 12000, 17000,20000}; // x10 (i.e. gets later divided by 10)
|
static const unsigned int out_ldr[] = {0, 30, 50, 60, 130, 170, 250, 420, 780, 1300,2600, 5000, 5350, 7700, 10900, 12000, 17000,20000}; // x10 (i.e. gets later divided by 10)
|
||||||
static const unsigned int in_ldr[] = {0, 12, 100, 150, 350, 400, 450, 650, 730, 780, 840, 930, 948 , 970, 993, 1005, 1019, 1023}; // 0 - 1023
|
static const unsigned int in_ldr[] = {0, 12, 100, 150, 350, 400, 450, 650, 730, 780, 840, 930, 948 , 970, 993, 1005, 1019, 1023}; // 0 - 1023
|
||||||
#endif
|
#endif
|
||||||
|
int get_lux(const unsigned int* _in, const unsigned int* _out, byte size); //for analog ldr light calculation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SENSOR_MHZ19
|
#ifdef SENSOR_MHZ19
|
||||||
|
@ -294,8 +280,9 @@ void setup() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//Homie_setFirmware(FW_NAME, FW_VERSION);
|
||||||
|
//Homie_setBrand(FW_NAME);
|
||||||
Homie_setFirmware(FW_NAME, FW_VERSION);
|
Homie_setFirmware(FW_NAME, FW_VERSION);
|
||||||
Homie_setBrand(FW_NAME);
|
|
||||||
Homie.setLoopFunction(loopHandler);
|
Homie.setLoopFunction(loopHandler);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue