Closed chrwh closed 3 years ago
1.Use latest version or version tagged v1.0.7
Any other question, please attach full sketch
Hi,
I'm using v.1.0.7
I now also see and unprotected wifi ESP-E4061A, when finished pairing a setting up a new device, that give access to 192.168.4.1 ?? and evrybody can lok into that?
Here is the hole sketch look for //test
/// BASIC CONFIGURATION
// Otherwise direct connect ssid and pwd will be used
// for Wifi manager need extra library //https://github.com/tzapu/WiFiManager
ESP8266WebServer server(80);
WebServer server(80);
bool isWebserver_started=false;
const int relay_gpio=2; const int relay1_gpio=0;
const char HOSTNAME="my_thing"; const char ssid = "ssid"; const char* password = "pass";
extern "C"{
}
homekit_service_t hapservice={0}; homekit_service_t hapservice_CD={0};
String pair_file_name="/pair.dat";
void switch_callback(homekit_characteristic_t ch, homekit_value_t value, void context); void switch1_callback(homekit_characteristic_t ch, homekit_value_t value, void context);
//Web server section
bool getSwitchVal(){ if(hapservice){ homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice, HOMEKIT_CHARACTERISTIC_ON); if(ch){ return ch->value.bool_value; } }
if(hapservice_CD){
homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice_CD, HOMEKIT_CHARACTERISTIC_ON);
if(ch){
return ch->value.bool_value;
}
}
return false;
}
void setup() {
disable_extra4k_at_link_time();
Serial.begin(115200); delay(10);
if (!SPIFFS.begin(true)) {
// Serial.print("SPIFFS Mount failed");
}
if (!SPIFFS.begin()) {
Serial.print("SPIFFS Mount failed");
}
Serial.print("Free heap: ");
Serial.println(system_get_free_heap_size());
pinMode(relay_gpio, OUTPUT);
pinMode(relay1_gpio, OUTPUT);
init_hap_storage();
set_callback_storage_change(storage_changed);
/// We will use for this example only one accessory (possible to use a several on the same esp)
//Our accessory type is light bulb , apple interface will proper show that
hap_setbase_accessorytype(homekit_accessory_category_switch);
/// init base properties
hap_initbase_accessory_service("doswitch","Fun","0","dSwitch","1.54");
//we will add only one light bulb service and keep pointer for nest using hapservice= hap_add_switch_service("AUX",switch_callback,(void)&relay_gpio); hapservice_CD= hap_add_switch_service("CD",switch1_callback,(void)&relay1_gpio);
//test
//homekit_characteristic_t * ch = homekit_service_characteristic_by_type(hapservice, HOMEKIT_CHARACTERISTIC_ON); //INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
// homekit_characteristic_t * ch1= homekit_service_characteristic_by_type(hapservice_CD, HOMEKIT_CHARACTERISTIC_ON); //INIT_CHARACHTERISTIC_VAL(bool,ch1,false); // will inform apple that lights is OFF //end test
startwifimanager();
WiFi.mode(WIFI_STA);
WiFi.begin((char*)ssid, (char*)password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println(PSTR("WiFi connected"));
Serial.println(PSTR("IP address: "));
Serial.println(WiFi.localIP());
hap_init_homekit_server();
String strIp=String(WiFi.localIP()[0]) + String(".") + String(WiFi.localIP()[1]) + String(".") + String(WiFi.localIP()[2]) + String(".") + String(WiFi.localIP()[3]);
if(hap_homekit_is_paired()){
Serial.println(PSTR("Setting web server"));
SETUP_FILEHANDLES
server.on("/get", handleGetVal);
server.on("/set", handleSetVal);
server.begin();
Serial.println(String("Web site http://")+strIp);
Serial.println(String("File system http://")+strIp+String("/browse"));
Serial.println(String("Update http://")+strIp+String("/update"));
isWebserver_started=true;
}else Serial.println(PSTR("Web server is NOT SET, waiting for pairing"));
}
void handleGetVal(){ server.send(200, FPSTR(TEXT_PLAIN), getSwitchVal()?"1":"0"); } void handleSetVal(){ if (server.args() !=2){ server.send(505, FPSTR(TEXT_PLAIN), "Bad args"); return; } //to do analyze if(server.arg("var") == "ch1"){ if(hapservice){
homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice, HOMEKIT_CHARACTERISTIC_ON);
if(ch){
set_switch(server.arg("val")=="true");
}
}
}
if(server.arg("var") == "ch2"){
if(hapservice_CD){
homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice_CD, HOMEKIT_CHARACTERISTIC_ON);
if(ch){
set_switch1(server.arg("val")=="true");
}
}
} } void loop() {
hap_homekit_loop();
if(isWebserver_started) server.handleClient();
}
void init_hap_storage(){ Serial.print("init_hap_storage");
File fsDAT=SPIFFS.open(pair_file_name, "r");
if(!fsDAT){ Serial.println("Failed to read pair.dat"); SPIFFS.format();
} int size=hap_get_storage_size_ex(); char* buf=new char[size]; memset(buf,0xff,size); if(fsDAT) fsDAT.readBytes(buf,size);
hap_init_storage_ex(buf,size); if(fsDAT) fsDAT.close(); delete []buf;
} void storage_changed(char * szstorage,int bufsize){
SPIFFS.remove(pair_file_name); File fsDAT=SPIFFS.open(pair_file_name, "w+"); if(!fsDAT){ Serial.println("Failed to open pair.dat"); return; } fsDAT.write((uint8_t*)szstorage, bufsize);
fsDAT.close(); } //can be used for any logic, it will automatically inform Apple about state changes
void set_switch(bool val){ Serial.println(String("set_switch:")+String(val?"True":"False")); digitalWrite(relay_gpio, val?HIGH:LOW); //we need notify apple about changes
if(hapservice){ Serial.println("notify hap"); //getting on/off characteristic homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice, HOMEKIT_CHARACTERISTIC_ON); if(ch){
if(ch->value.bool_value!=val){ //wil notify only if different
ch->value.bool_value=val;
homekit_characteristic_notify(ch,ch->value);
}
}
} }
void switch_callback(homekit_characteristic_t ch, homekit_value_t value, void context) { Serial.println("switch_callback"); set_switch(ch->value.bool_value); }
void set_switch1(bool val){ Serial.println(String("set_switch1:")+String(val?"True":"False")); digitalWrite(relay1_gpio, val?HIGH:LOW); //we need notify apple about changes
if(hapservice_CD){ Serial.println("notify hap"); //getting on/off characteristic homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice_CD, HOMEKIT_CHARACTERISTIC_ON); if(ch){
if(ch->value.bool_value!=val){ //wil notify only if different
ch->value.bool_value=val;
homekit_characteristic_notify(ch,ch->value);
}
}
} }
void switch1_callback(homekit_characteristic_t ch, homekit_value_t value, void context) { Serial.println("switch1_callback"); set_switch1(ch->value.bool_value); }
void startwifimanager() { WiFiManager wifiManager;
if (!wifiManager.autoConnect(HOSTNAME, NULL)) { ESP.restart(); delay(1000); } }
Hi, About I now also see and unprotected wifi ESP-E4061A, when finished pairing a setting up a new device, that give access to 192.168.4.1 ?? and evrybody can lok into that?
This is not related to this library and standard behaviour of WiFi manager, It's properly documented
Definetelly thgs can happen when ESP not able to connect to your Wifi network and i't started in configuration mode.
So, problem could be
Hi, Can you provide any further help on how to use the below, I can't make it work? homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice, HOMEKIT_CHARACTERISTIC_ON); INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF Best regards, Christian
Yes, but could you explain what is not working, compilation, behaviour... As well please attach a log
I get this error, if you try to compile the code about (right now the lines are masked out //)
I get this error:
EspHapSwitch8266_Double_Web:146:27: error: expected primary-expression before 'bool' INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:32: error: 'ch' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:40: error: 'INIT_CHARACHTERISTIC_VAL' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
What I want, is the outputs to be OFF when power is initial turned on
Ok,
From: chrwh notifications@github.com Sent: Wednesday, February 17, 2021 12:45 PM To: Yurik72/ESPHap ESPHap@noreply.github.com Cc: Yurik72 yurik.kovalenko@gmail.com; State change state_change@noreply.github.com Subject: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
I get this error, if you try to compile the code about (right now the lines are masked out //)
I get this error:
EspHapSwitch8266_Double_Web:146:27: error: expected primary-expression before 'bool' INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:32: error: 'ch' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:40: error: 'INIT_CHARACHTERISTIC_VAL' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
What I want, is the outputs to be OFF when power is initial turned on
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780468769 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDREXNZHOGZC32TXFNYMXDS7OMZTANCNFSM4XH735BQ . https://github.com/notifications/beacon/AKDREXJI6DMSRFIV4FB57R3S7OMZTA5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CQEII.gif
Hi,
I use V.1.0.7 (if I look in the library.properties file it says 1.0.3) but I downloaded from here https://github.com/Yurik72/ESPHap/releases/tag/v1.0.7
Atteched the full sketch, look around line 157, they are masked out // at the moment
Thanks and best regards,
Christian
Fra: Yurik72 notifications@github.com Sendt: 17. februar 2021 12:17 Til: Yurik72/ESPHap ESPHap@noreply.github.com Cc: chrwh chwh@c.dk; Author author@noreply.github.com Emne: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
Ok,
From: chrwh <notifications@github.com mailto:notifications@github.com > Sent: Wednesday, February 17, 2021 12:45 PM To: Yurik72/ESPHap <ESPHap@noreply.github.com mailto:ESPHap@noreply.github.com > Cc: Yurik72 <yurik.kovalenko@gmail.com mailto:yurik.kovalenko@gmail.com >; State change <state_change@noreply.github.com mailto:state_change@noreply.github.com > Subject: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
I get this error, if you try to compile the code about (right now the lines are masked out //)
I get this error:
EspHapSwitch8266_Double_Web:146:27: error: expected primary-expression before 'bool' INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:32: error: 'ch' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:40: error: 'INIT_CHARACHTERISTIC_VAL' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
What I want, is the outputs to be OFF when power is initial turned on
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780468769 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDREXNZHOGZC32TXFNYMXDS7OMZTANCNFSM4XH735BQ . https://github.com/notifications/beacon/AKDREXJI6DMSRFIV4FB57R3S7OMZTA5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CQEII.gif
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780486795 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUAINVSEFOQYTZ75UAHB4LS7OQSLANCNFSM4XH735BQ . https://github.com/notifications/beacon/ABUAINWH4BMLDHQDZA2DG4TS7OQSLA5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CURCY.gif
I do not see any attachments,
Check your Library folder ESPHap If file homeintegration.h contains
From: chrwh notifications@github.com Sent: Wednesday, February 17, 2021 1:53 PM To: Yurik72/ESPHap ESPHap@noreply.github.com Cc: Yurik72 yurik.kovalenko@gmail.com; State change state_change@noreply.github.com Subject: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
Hi,
I use V.1.0.7 (if I look in the library.properties file it says 1.0.3) but I downloaded from here https://github.com/Yurik72/ESPHap/releases/tag/v1.0.7
Atteched the full sketch, look around line 157, they are masked out // at the moment
Thanks and best regards,
Christian
Fra: Yurik72 <notifications@github.com mailto:notifications@github.com > Sendt: 17. februar 2021 12:17 Til: Yurik72/ESPHap <ESPHap@noreply.github.com mailto:ESPHap@noreply.github.com > Cc: chrwh <chwh@c.dk mailto:chwh@c.dk >; Author <author@noreply.github.com mailto:author@noreply.github.com > Emne: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
Ok,
From: chrwh <notifications@github.com mailto:notifications@github.com%20%3cmailto:notifications@github.com mailto:notifications@github.com > Sent: Wednesday, February 17, 2021 12:45 PM To: Yurik72/ESPHap <ESPHap@noreply.github.com mailto:ESPHap@noreply.github.com%20%3cmailto:ESPHap@noreply.github.com mailto:ESPHap@noreply.github.com > Cc: Yurik72 <yurik.kovalenko@gmail.com mailto:yurik.kovalenko@gmail.com%20%3cmailto:yurik.kovalenko@gmail.com mailto:yurik.kovalenko@gmail.com >; State change <state_change@noreply.github.com mailto:state_change@noreply.github.com%20%3cmailto:state_change@noreply.github.com mailto:state_change@noreply.github.com > Subject: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
I get this error, if you try to compile the code about (right now the lines are masked out //)
I get this error:
EspHapSwitch8266_Double_Web:146:27: error: expected primary-expression before 'bool' INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:32: error: 'ch' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:40: error: 'INIT_CHARACHTERISTIC_VAL' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
What I want, is the outputs to be OFF when power is initial turned on
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780468769 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDREXNZHOGZC32TXFNYMXDS7OMZTANCNFSM4XH735BQ . https://github.com/notifications/beacon/AKDREXJI6DMSRFIV4FB57R3S7OMZTA5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CQEII.gif
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780486795 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUAINVSEFOQYTZ75UAHB4LS7OQSLANCNFSM4XH735BQ . https://github.com/notifications/beacon/ABUAINWH4BMLDHQDZA2DG4TS7OQSLA5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CURCY.gif
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780504972 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDREXKTWROFXQ7TPELGHMLS7OUY5ANCNFSM4XH735BQ . https://github.com/notifications/beacon/AKDREXILGSAA5BGZ2PUJWZ3S7OUY5A5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CY7DA.gif
Argh I forgot to attach it. You can see the code above in the thread on GitHub.
Best regards
Christian
Den 17. feb. 2021 kl. 14.48 skrev Yurik72 notifications@github.com:
I do not see any attachments,
Check your Library folder ESPHap If file homeintegration.h contains
define INIT_CHARACHTERISTIC_VAL
From: chrwh notifications@github.com Sent: Wednesday, February 17, 2021 1:53 PM To: Yurik72/ESPHap ESPHap@noreply.github.com Cc: Yurik72 yurik.kovalenko@gmail.com; State change state_change@noreply.github.com Subject: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
Hi,
I use V.1.0.7 (if I look in the library.properties file it says 1.0.3) but I downloaded from here https://github.com/Yurik72/ESPHap/releases/tag/v1.0.7
Atteched the full sketch, look around line 157, they are masked out // at the moment
Thanks and best regards,
Christian
Fra: Yurik72 <notifications@github.com mailto:notifications@github.com > Sendt: 17. februar 2021 12:17 Til: Yurik72/ESPHap <ESPHap@noreply.github.com mailto:ESPHap@noreply.github.com > Cc: chrwh <chwh@c.dk mailto:chwh@c.dk >; Author <author@noreply.github.com mailto:author@noreply.github.com > Emne: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
Ok,
- Send me a full sketch
- Which version you are using, please check . INIT_CHARACHTERISTIC_VAL implemented not so far
From: chrwh <notifications@github.com mailto:notifications@github.com%20%3cmailto:notifications@github.com mailto:notifications@github.com > Sent: Wednesday, February 17, 2021 12:45 PM To: Yurik72/ESPHap <ESPHap@noreply.github.com mailto:ESPHap@noreply.github.com%20%3cmailto:ESPHap@noreply.github.com mailto:ESPHap@noreply.github.com > Cc: Yurik72 <yurik.kovalenko@gmail.com mailto:yurik.kovalenko@gmail.com%20%3cmailto:yurik.kovalenko@gmail.com mailto:yurik.kovalenko@gmail.com >; State change <state_change@noreply.github.com mailto:state_change@noreply.github.com%20%3cmailto:state_change@noreply.github.com mailto:state_change@noreply.github.com > Subject: Re: [Yurik72/ESPHap] Initial value bool error with INIT_CHARACHTERISTIC_VAL(bool,ch,false); (#48)
I get this error, if you try to compile the code about (right now the lines are masked out //)
I get this error:
EspHapSwitch8266_Double_Web:146:27: error: expected primary-expression before 'bool' INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:32: error: 'ch' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:40: error: 'INIT_CHARACHTERISTIC_VAL' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
What I want, is the outputs to be OFF when power is initial turned on
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780468769 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDREXNZHOGZC32TXFNYMXDS7OMZTANCNFSM4XH735BQ . https://github.com/notifications/beacon/AKDREXJI6DMSRFIV4FB57R3S7OMZTA5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CQEII.gif
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780486795 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUAINVSEFOQYTZ75UAHB4LS7OQSLANCNFSM4XH735BQ . https://github.com/notifications/beacon/ABUAINWH4BMLDHQDZA2DG4TS7OQSLA5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CURCY.gif
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/48#issuecomment-780504972 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDREXKTWROFXQ7TPELGHMLS7OUY5ANCNFSM4XH735BQ . https://github.com/notifications/beacon/AKDREXILGSAA5BGZ2PUJWZ3S7OUY5A5CNFSM4XH735B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CY7DA.gif
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Just checked, the "#define INIT_CHARACHTERISTIC_VAL" is not in the homeintegration.h file, So the link you refere to here as being V.1.0.7 is not it's V.1.0.3 https://github.com/Yurik72/ESPHap/releases/tag/v1.0.7, I now downloaded from the from page, and it can now compile, but with many warining. When trying to access the webserver it crashes and reboots. This is run in a ESP8266-01 1mb. File is now attached EspHapSwitch8266_Double_Web 1.zip
Updtate: Completely wiped the ESP-01, and it seems to work now. Still getting a lot of compile warnings in regards to Wolfssl?
Ok , good news, warning appears in wolfssl you are right, but you do not see any impact
Sent from my iPhone
On 20 Feb 2021, at 13:04, chrwh notifications@github.com wrote:
Updtate: Completely wiped the ESP-01, and it seems to work now. Still getting a lot of compile warnings in regards to Wolfssl?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.
So far no impact with the Wolfssl errors
Hi,
When I try to implement initial value from the library API description, I get and bool and ch not declared error?
Optinally you can set a default (initial) value to be informed Apple about initial state
homekit_characteristic_t * ch= homekit_service_characteristic_by_type(hapservice, HOMEKIT_CHARACTERISTIC_ON); INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
I get this error:
EspHapSwitch8266_Double_Web:146:27: error: expected primary-expression before 'bool' INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:32: error: 'ch' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF ^ EspHapSwitch8266_Double_Web:146:40: error: 'INIT_CHARACHTERISTIC_VAL' was not declared in this scope INIT_CHARACHTERISTIC_VAL(bool,ch,false); // will inform apple that lights is OFF
Best regards, Christian