make error with Dynamic fork
Closed this issue · 23 comments
Can i use the fan+light accessory with this dynamic fork? or have i misunderstood.
Im getting errors if i make with fan+light instead of the default light.....
root@raspberrypi:/PersonalHomeKit-Dynamic# make/PersonalHomeKit-Dynamic#
gcc -O0 -w -o chacha20.o -c Chacha20/chacha20_simple.c
gcc -O0 -w -o curve25519.o -c curve25519/curve25519-donna.c
gcc -O0 -w -o ed25519.o -c ed25519-donna/ed25519.c
gcc -O0 -w -o poly1305.o -c poly1305-opt-master/poly1305.c
gcc -O0 -w -c rfc6234-master/hkdf.c -o rfc6234-master/hkdf.o
gcc -O0 -w -c rfc6234-master/hmac.c -o rfc6234-master/hmac.o
gcc -O0 -w -c rfc6234-master/sha.c -o rfc6234-master/sha.o
g++ -O0 -w -c main.cpp
g++ -O0 -w -c PHKAccessory.cpp
g++ -O0 -w -c PHKControllerRecord.cpp
g++ -O0 -w -c PHKNetworkIP.cpp
gcc -c -o PHKArduinoLightInterface.o PHKArduinoLightInterface.c
gcc -O0 -lcrypto -w -c srp/srp.c -o srp/srp.o
gcc -O0 -lcrypto -w -c srp/cstr.c -o srp/cstr.o
gcc -O0 -lcrypto -w -c srp/t_math.c -o srp/t_math.o
gcc -O0 -lcrypto -w -c srp/srp6_server.c -o srp/srp6_server.o
gcc -O0 -lcrypto -w -c srp/t_conf.c -o srp/t_conf.o
gcc -O0 -lcrypto -w -c srp/t_conv.c -o srp/t_conv.o
gcc -O0 -lcrypto -w -c srp/t_pw.c -o srp/t_pw.o
gcc -O0 -lcrypto -w -c srp/t_misc.c -o srp/t_misc.o
gcc -O0 -lcrypto -w -c srp/t_truerand.c -o srp/t_truerand.o
gcc -O0 -lcrypto -w -c srp/t_read.c -o srp/t_read.o
g++ -O0 -w -c Accessory.cpp
Accessory.cpp: In constructor ‘lightPowerState::lightPowerState(int&)’:
Accessory.cpp:15:106: error: no matching function for call to ‘boolCharacteristics::boolCharacteristics(int&, charType, int)’
lightPowerState(int &index): boolCharacteristics(index, charType_on, premission_read|premission_write){}
^
Accessory.cpp:15:106: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:137:5: note: boolCharacteristics::boolCharacteristics(short unsigned int, int)
boolCharacteristics(unsigned short _type, int _premission): characteristics(_type, _premission) {}
^
PHKAccessory.h:137:5: note: candidate expects 2 arguments, 3 provided
PHKAccessory.h:133:7: note: boolCharacteristics::boolCharacteristics(const boolCharacteristics&)
class boolCharacteristics: public characteristics {
^
PHKAccessory.h:133:7: note: candidate expects 1 argument, 3 provided
Accessory.cpp: In constructor ‘lightBrightness::lightBrightness(int&)’:
Accessory.cpp:35:140: error: no matching function for call to ‘intCharacteristics::intCharacteristics(int&, charType, int, int, int, int, unit)’
lightBrightness(int &index):intCharacteristics(index, charType_brightness, premission_read|premission_write, 0, 100, 1, unit_percentage) {}
^
Accessory.cpp:35:140: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:176:5: note: intCharacteristics::intCharacteristics(short unsigned int, int, int, int, int, unit)
intCharacteristics(unsigned short _type, int _premission, int minVal, int maxVal, int step, unit charUnit): characteristics(_type, _premission), _minVal(minVal), _maxVal(maxVal), _step(step), _unit(charUnit) {
^
PHKAccessory.h:176:5: note: candidate expects 6 arguments, 7 provided
PHKAccessory.h:170:7: note: intCharacteristics::intCharacteristics(const intCharacteristics&)
class intCharacteristics: public characteristics {
^
PHKAccessory.h:170:7: note: candidate expects 1 argument, 7 provided
Accessory.cpp: In constructor ‘lightService::lightService(int&)’:
Accessory.cpp:49:102: error: no matching function for call to ‘Service::Service(int&, charType)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), brightness(index)
^
Accessory.cpp:49:102: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:213:5: note: Service::Service(int)
Service(int _uuid): uuid(_uuid) {}
^
PHKAccessory.h:213:5: note: candidate expects 1 argument, 2 provided
PHKAccessory.h:209:7: note: Service::Service(const Service&)
class Service {
^
PHKAccessory.h:209:7: note: candidate expects 1 argument, 2 provided
Accessory.cpp:49:102: error: no matching function for call to ‘stringCharacteristics::stringCharacteristics(int&, charType, , int)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), brightness(index)
^
Accessory.cpp:49:102: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:198:5: note: stringCharacteristics::stringCharacteristics(short unsigned int, int, short unsigned int)
stringCharacteristics(unsigned short _type, int _premission, unsigned short _maxLen): characteristics(_type, _premission), maxLen(_maxLen) {}
^
PHKAccessory.h:198:5: note: candidate expects 3 arguments, 4 provided
PHKAccessory.h:193:7: note: stringCharacteristics::stringCharacteristics(const stringCharacteristics&)
class stringCharacteristics: public characteristics {
^
PHKAccessory.h:193:7: note: candidate expects 1 argument, 4 provided
Accessory.cpp:51:30: error: ‘deviceName’ was not declared in this scope
serviceName.setValue(deviceName);
^
Accessory.cpp: At global scope:
Accessory.cpp:73:5: error: ‘infoService’ does not name a type
infoService info;
^
Accessory.cpp: In constructor ‘MainAccessory::MainAccessory(int)’:
Accessory.cpp:77:5: error: class ‘MainAccessory’ does not have any field named ‘info’
info(numberOfInstance), light(numberOfInstance) {}
^
Accessory.cpp:77:51: error: no matching function for call to ‘Accessory::Accessory(int&)’
info(numberOfInstance), light(numberOfInstance) {}
^
Accessory.cpp:77:51: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:254:5: note: Accessory::Accessory()
Accessory() {}
^
PHKAccessory.h:254:5: note: candidate expects 0 arguments, 1 provided
PHKAccessory.h:219:7: note: Accessory::Accessory(const Accessory&)
class Accessory {
^
PHKAccessory.h:219:7: note: no known conversion for argument 1 from ‘int’ to ‘const Accessory&’
Accessory.cpp: In member function ‘virtual Service* MainAccessory::serviceAtIndex(int)’:
Accessory.cpp:82:25: error: ‘info’ was not declared in this scope
return &info;
^
Accessory.cpp: In constructor ‘fanPowerState::fanPowerState(int&)’:
Accessory.cpp:92:104: error: no matching function for call to ‘boolCharacteristics::boolCharacteristics(int&, charType, int)’
fanPowerState(int &index): boolCharacteristics(index, charType_on, premission_read|premission_write){}
^
Accessory.cpp:92:104: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:137:5: note: boolCharacteristics::boolCharacteristics(short unsigned int, int)
boolCharacteristics(unsigned short _type, int _premission): characteristics(_type, _premission) {}
^
PHKAccessory.h:137:5: note: candidate expects 2 arguments, 3 provided
PHKAccessory.h:133:7: note: boolCharacteristics::boolCharacteristics(const boolCharacteristics&)
class boolCharacteristics: public characteristics {
^
PHKAccessory.h:133:7: note: candidate expects 1 argument, 3 provided
Accessory.cpp: In constructor ‘fanSpeed::fanSpeed(int&)’:
Accessory.cpp:112:133: error: no matching function for call to ‘intCharacteristics::intCharacteristics(int&, charType, int, int, int, int, unit)’
fanSpeed(int &index):intCharacteristics(index, charType_brightness, premission_read|premission_write, 0, 100, 1, unit_percentage) {}
^
Accessory.cpp:112:133: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:176:5: note: intCharacteristics::intCharacteristics(short unsigned int, int, int, int, int, unit)
intCharacteristics(unsigned short _type, int _premission, int minVal, int maxVal, int step, unit charUnit): characteristics(_type, _premission), _minVal(minVal), _maxVal(maxVal), _step(step), _unit(charUnit) {
^
PHKAccessory.h:176:5: note: candidate expects 6 arguments, 7 provided
PHKAccessory.h:170:7: note: intCharacteristics::intCharacteristics(const intCharacteristics&)
class intCharacteristics: public characteristics {
^
PHKAccessory.h:170:7: note: candidate expects 1 argument, 7 provided
Accessory.cpp: In constructor ‘fanService::fanService(int&)’:
Accessory.cpp:126:97: error: no matching function for call to ‘Service::Service(int&, charType)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), speed(index)
^
Accessory.cpp:126:97: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:213:5: note: Service::Service(int)
Service(int _uuid): uuid(_uuid) {}
^
PHKAccessory.h:213:5: note: candidate expects 1 argument, 2 provided
PHKAccessory.h:209:7: note: Service::Service(const Service&)
class Service {
^
PHKAccessory.h:209:7: note: candidate expects 1 argument, 2 provided
Accessory.cpp:126:97: error: no matching function for call to ‘stringCharacteristics::stringCharacteristics(int&, charType, , int)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), speed(index)
^
Accessory.cpp:126:97: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:198:5: note: stringCharacteristics::stringCharacteristics(short unsigned int, int, short unsigned int)
stringCharacteristics(unsigned short _type, int _premission, unsigned short _maxLen): characteristics(_type, _premission), maxLen(_maxLen) {}
^
PHKAccessory.h:198:5: note: candidate expects 3 arguments, 4 provided
PHKAccessory.h:193:7: note: stringCharacteristics::stringCharacteristics(const stringCharacteristics&)
class stringCharacteristics: public characteristics {
^
PHKAccessory.h:193:7: note: candidate expects 1 argument, 4 provided
Accessory.cpp: At global scope:
Accessory.cpp:147:5: error: ‘infoService’ does not name a type
infoService info;
^
Accessory.cpp: In constructor ‘FanAccessory::FanAccessory(int)’:
Accessory.cpp:150:44: error: class ‘FanAccessory’ does not have any field named ‘info’
FanAccessory(int aid): Accessory(aid), info(numberOfInstance), fan(numberOfInstance) {}
^
Accessory.cpp:150:88: error: no matching function for call to ‘Accessory::Accessory(int&)’
FanAccessory(int aid): Accessory(aid), info(numberOfInstance), fan(numberOfInstance) {}
^
Accessory.cpp:150:88: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:254:5: note: Accessory::Accessory()
Accessory() {}
^
PHKAccessory.h:254:5: note: candidate expects 0 arguments, 1 provided
PHKAccessory.h:219:7: note: Accessory::Accessory(const Accessory&)
class Accessory {
^
PHKAccessory.h:219:7: note: no known conversion for argument 1 from ‘int’ to ‘const Accessory&’
Accessory.cpp: In member function ‘virtual Service* FanAccessory::serviceAtIndex(int)’:
Accessory.cpp:155:25: error: ‘info’ was not declared in this scope
return &info;
^
makefile:36: recipe for target 'Accessory.o' failed
make: *** [Accessory.o] Error 1
root@raspberrypi:
You can’t use the source fan+light accessory in this fork. (I basically revamped the way data structure the accessory to support dynamic add/drop. The old one is designed specific for static mode. )
I will update the code in 30 minutes.
On Nov 26, 2014, at 00:48, gb160 notifications@github.com wrote:
Can i use the fan+light accessory with this dynamic fork? or have i misunderstood.
Im getting errors if i make with fan+light instead of the default light.....root@raspberrypi:
/PersonalHomeKit-Dynamic# make/PersonalHomeKit-Dynamic#
gcc -O0 -w -o chacha20.o -c Chacha20/chacha20_simple.c
gcc -O0 -w -o curve25519.o -c curve25519/curve25519-donna.c
gcc -O0 -w -o ed25519.o -c ed25519-donna/ed25519.c
gcc -O0 -w -o poly1305.o -c poly1305-opt-master/poly1305.c
gcc -O0 -w -c rfc6234-master/hkdf.c -o rfc6234-master/hkdf.o
gcc -O0 -w -c rfc6234-master/hmac.c -o rfc6234-master/hmac.o
gcc -O0 -w -c rfc6234-master/sha.c -o rfc6234-master/sha.o
g++ -O0 -w -c main.cpp
g++ -O0 -w -c PHKAccessory.cpp
g++ -O0 -w -c PHKControllerRecord.cpp
g++ -O0 -w -c PHKNetworkIP.cpp
gcc -c -o PHKArduinoLightInterface.o PHKArduinoLightInterface.c
gcc -O0 -lcrypto -w -c srp/srp.c -o srp/srp.o
gcc -O0 -lcrypto -w -c srp/cstr.c -o srp/cstr.o
gcc -O0 -lcrypto -w -c srp/t_math.c -o srp/t_math.o
gcc -O0 -lcrypto -w -c srp/srp6_server.c -o srp/srp6_server.o
gcc -O0 -lcrypto -w -c srp/t_conf.c -o srp/t_conf.o
gcc -O0 -lcrypto -w -c srp/t_conv.c -o srp/t_conv.o
gcc -O0 -lcrypto -w -c srp/t_pw.c -o srp/t_pw.o
gcc -O0 -lcrypto -w -c srp/t_misc.c -o srp/t_misc.o
gcc -O0 -lcrypto -w -c srp/t_truerand.c -o srp/t_truerand.o
gcc -O0 -lcrypto -w -c srp/t_read.c -o srp/t_read.o
g++ -O0 -w -c Accessory.cpp
Accessory.cpp: In constructor ‘lightPowerState::lightPowerState(int&)’:
Accessory.cpp:15:106: error: no matching function for call to ‘boolCharacteristics::boolCharacteristics(int&, charType, int)’
lightPowerState(int &index): boolCharacteristics(index, charType_on, premission_read|premission_write){}
^
Accessory.cpp:15:106: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:137:5: note: boolCharacteristics::boolCharacteristics(short unsigned int, int)
boolCharacteristics(unsigned short _type, int _premission): characteristics(_type, _premission) {}
^
PHKAccessory.h:137:5: note: candidate expects 2 arguments, 3 provided
PHKAccessory.h:133:7: note: boolCharacteristics::boolCharacteristics(const boolCharacteristics&)
class boolCharacteristics: public characteristics {
^
PHKAccessory.h:133:7: note: candidate expects 1 argument, 3 provided
Accessory.cpp: In constructor ‘lightBrightness::lightBrightness(int&)’:
Accessory.cpp:35:140: error: no matching function for call to ‘intCharacteristics::intCharacteristics(int&, charType, int, int, int, int, unit)’
lightBrightness(int &index):intCharacteristics(index, charType_brightness, premission_read|premission_write, 0, 100, 1, unit_percentage) {}
^
Accessory.cpp:35:140: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:176:5: note: intCharacteristics::intCharacteristics(short unsigned int, int, int, int, int, unit)
intCharacteristics(unsigned short _type, int _premission, int minVal, int maxVal, int step, unit charUnit): characteristics(_type, _premission), _minVal(minVal), _maxVal(maxVal), _step(step), _unit(charUnit) {
^
PHKAccessory.h:176:5: note: candidate expects 6 arguments, 7 provided
PHKAccessory.h:170:7: note: intCharacteristics::intCharacteristics(const intCharacteristics&)
class intCharacteristics: public characteristics {
^
PHKAccessory.h:170:7: note: candidate expects 1 argument, 7 provided
Accessory.cpp: In constructor ‘lightService::lightService(int&)’:
Accessory.cpp:49:102: error: no matching function for call to ‘Service::Service(int&, charType)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), brightness(index)
^
Accessory.cpp:49:102: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:213:5: note: Service::Service(int)
Service(int _uuid): uuid(_uuid) {}
^
PHKAccessory.h:213:5: note: candidate expects 1 argument, 2 provided
PHKAccessory.h:209:7: note: Service::Service(const Service&)
class Service {
^
PHKAccessory.h:209:7: note: candidate expects 1 argument, 2 provided
Accessory.cpp:49:102: error: no matching function for call to ‘stringCharacteristics::stringCharacteristics(int&, charType, , int)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), brightness(index)
^
Accessory.cpp:49:102: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:198:5: note: stringCharacteristics::stringCharacteristics(short unsigned int, int, short unsigned int)
stringCharacteristics(unsigned short _type, int _premission, unsigned short _maxLen): characteristics(_type, _premission), maxLen(_maxLen) {}
^
PHKAccessory.h:198:5: note: candidate expects 3 arguments, 4 provided
PHKAccessory.h:193:7: note: stringCharacteristics::stringCharacteristics(const stringCharacteristics&)
class stringCharacteristics: public characteristics {
^
PHKAccessory.h:193:7: note: candidate expects 1 argument, 4 provided
Accessory.cpp:51:30: error: ‘deviceName’ was not declared in this scope
serviceName.setValue(deviceName);
^
Accessory.cpp: At global scope:
Accessory.cpp:73:5: error: ‘infoService’ does not name a type
infoService info;
^
Accessory.cpp: In constructor ‘MainAccessory::MainAccessory(int)’:
Accessory.cpp:77:5: error: class ‘MainAccessory’ does not have any field named ‘info’
info(numberOfInstance), light(numberOfInstance) {}
^
Accessory.cpp:77:51: error: no matching function for call to ‘Accessory::Accessory(int&)’
info(numberOfInstance), light(numberOfInstance) {}
^
Accessory.cpp:77:51: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:254:5: note: Accessory::Accessory()
Accessory() {}
^
PHKAccessory.h:254:5: note: candidate expects 0 arguments, 1 provided
PHKAccessory.h:219:7: note: Accessory::Accessory(const Accessory&)
class Accessory {
^
PHKAccessory.h:219:7: note: no known conversion for argument 1 from ‘int’ to ‘const Accessory&’
Accessory.cpp: In member function ‘virtual Service* MainAccessory::serviceAtIndex(int)’:
Accessory.cpp:82:25: error: ‘info’ was not declared in this scope
return &info;
^
Accessory.cpp: In constructor ‘fanPowerState::fanPowerState(int&)’:
Accessory.cpp:92:104: error: no matching function for call to ‘boolCharacteristics::boolCharacteristics(int&, charType, int)’
fanPowerState(int &index): boolCharacteristics(index, charType_on, premission_read|premission_write){}
^
Accessory.cpp:92:104: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:137:5: note: boolCharacteristics::boolCharacteristics(short unsigned int, int)
boolCharacteristics(unsigned short _type, int _premission): characteristics(_type, _premission) {}
^
PHKAccessory.h:137:5: note: candidate expects 2 arguments, 3 provided
PHKAccessory.h:133:7: note: boolCharacteristics::boolCharacteristics(const boolCharacteristics&)
class boolCharacteristics: public characteristics {
^
PHKAccessory.h:133:7: note: candidate expects 1 argument, 3 provided
Accessory.cpp: In constructor ‘fanSpeed::fanSpeed(int&)’:
Accessory.cpp:112:133: error: no matching function for call to ‘intCharacteristics::intCharacteristics(int&, charType, int, int, int, int, unit)’
fanSpeed(int &index):intCharacteristics(index, charType_brightness, premission_read|premission_write, 0, 100, 1, unit_percentage) {}
^
Accessory.cpp:112:133: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:176:5: note: intCharacteristics::intCharacteristics(short unsigned int, int, int, int, int, unit)
intCharacteristics(unsigned short _type, int _premission, int minVal, int maxVal, int step, unit charUnit): characteristics(_type, _premission), _minVal(minVal), _maxVal(maxVal), _step(step), _unit(charUnit) {
^
PHKAccessory.h:176:5: note: candidate expects 6 arguments, 7 provided
PHKAccessory.h:170:7: note: intCharacteristics::intCharacteristics(const intCharacteristics&)
class intCharacteristics: public characteristics {
^
PHKAccessory.h:170:7: note: candidate expects 1 argument, 7 provided
Accessory.cpp: In constructor ‘fanService::fanService(int&)’:
Accessory.cpp:126:97: error: no matching function for call to ‘Service::Service(int&, charType)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), speed(index)
^
Accessory.cpp:126:97: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:213:5: note: Service::Service(int)
Service(int _uuid): uuid(_uuid) {}
^
PHKAccessory.h:213:5: note: candidate expects 1 argument, 2 provided
PHKAccessory.h:209:7: note: Service::Service(const Service&)
class Service {
^
PHKAccessory.h:209:7: note: candidate expects 1 argument, 2 provided
Accessory.cpp:126:97: error: no matching function for call to ‘stringCharacteristics::stringCharacteristics(int&, charType, , int)’
serviceName(index, charType_serviceName, premission_read, 0), powerState(index), speed(index)
^
Accessory.cpp:126:97: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:198:5: note: stringCharacteristics::stringCharacteristics(short unsigned int, int, short unsigned int)
stringCharacteristics(unsigned short _type, int _premission, unsigned short _maxLen): characteristics(_type, _premission), maxLen(_maxLen) {}
^
PHKAccessory.h:198:5: note: candidate expects 3 arguments, 4 provided
PHKAccessory.h:193:7: note: stringCharacteristics::stringCharacteristics(const stringCharacteristics&)
class stringCharacteristics: public characteristics {
^
PHKAccessory.h:193:7: note: candidate expects 1 argument, 4 provided
Accessory.cpp: At global scope:
Accessory.cpp:147:5: error: ‘infoService’ does not name a type
infoService info;
^
Accessory.cpp: In constructor ‘FanAccessory::FanAccessory(int)’:
Accessory.cpp:150:44: error: class ‘FanAccessory’ does not have any field named ‘info’
FanAccessory(int aid): Accessory(aid), info(numberOfInstance), fan(numberOfInstance) {}
^
Accessory.cpp:150:88: error: no matching function for call to ‘Accessory::Accessory(int&)’
FanAccessory(int aid): Accessory(aid), info(numberOfInstance), fan(numberOfInstance) {}
^
Accessory.cpp:150:88: note: candidates are:
In file included from Accessory.cpp:7:0:
PHKAccessory.h:254:5: note: Accessory::Accessory()
Accessory() {}
^
PHKAccessory.h:254:5: note: candidate expects 0 arguments, 1 provided
PHKAccessory.h:219:7: note: Accessory::Accessory(const Accessory&)
class Accessory {
^
PHKAccessory.h:219:7: note: no known conversion for argument 1 from ‘int’ to ‘const Accessory&’
Accessory.cpp: In member function ‘virtual Service* FanAccessory::serviceAtIndex(int)’:
Accessory.cpp:155:25: error: ‘info’ was not declared in this scope
return &info;
^
makefile:36: recipe for target 'Accessory.o' failed
make: *** [Accessory.o] Error 1
root@raspberrypi:—
Reply to this email directly or view it on GitHub #15.
cool...thanks.
I noticed the code for the fan + light accessory has been updated, is it now working?
what is the best approach to call shell commands/scripts on switch changes with this ?.....great progress with this fork!!
It’s working. (I tested it with iOS simulator)However, this fork is still in beta because I’m haven't add function callback to for any value change (something like lightOnCharacteristic->valueChange = &function
so you just need to pass the function pointer once).
I will add this part this weekend, after I deal with all the school assignments. In the meantime, try to make some changes to the code. I’m worry there is bugs inside the changes.
On Nov 26, 2014, at 16:37, gb160 notifications@github.com wrote:
I noticed the code for the fan + light accessory has been updated, is it now working?
what is the best approach to call shell commands/scripts on switch changes with this ?.....great progress with this fork!!
Well I've successfully added more devices now with this method , but tried and failed various times to add the function callback for the value change ...Im hoping someone made better progress than i did and can share an example ?
Hi @gb160,
Perhaps checkout my fork, I've just completed adding many devices and am now able to control them.
Roy
@gb160
Just pushed the function pointer feature early. I haven’t test fully, but it seems working now.
On Nov 29, 2014, at 18:46, gb160 notifications@github.com wrote:
Well I've successfully added more devices now with this method , but tried and failed various times to add the function callback for the value change ...Im hoping someone made better progress than i did and can share an example ?
—
Reply to this email directly or view it on GitHub #15 (comment).
this is really excellent progress, I'm now able to add and remove devices with ease..ive managed to setup three different lights, and my central heating.
The switching is almost instant and the siri responses are accurate as well.
@gb160
Are you using the Dynamic fork? If there's no obvious bugs, I think I will merge it soon,
@etwmc Yes I'm using the Dynamic Fork
Only one slight issue I've found.
I can control 3 devices fine, either 3 lights, or 2 lights and a heater it all works fine.
Upon adding a fourth device, no matter what that device is, i get an error when pairing.
It compiles fine, but the error when pairing is as follows...
root@raspberrypi:/PersonalHomeKit-Dynamic# ./PHK/PersonalHomeKit-Dynamic#
Initial Accessory
Serial Port: -1
*** WARNING *** The program 'PHK' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=PHK
Start Connect: 10
Start pairing state: 1
Start pairing state: 3
Start pairing state: 5
Start Connect: 11
State = 1
State = 3
*** glibc detected *** ./PHK: free(): invalid next size (normal): 0x014d5090 ***
Aborted
root@raspberrypi:
and obviously it quits at this point.
Removing the fourth device from the Accessory.cpp makes it work fine again.
Apart from this issue it seems to working fine.
@gb160 I noticed that some char sizes were too small when adding multiple accessories. I've added about 8 and needed to double some 4096 and 2048's. Perhaps this explains something?
@gb160 could you upload a fork with multiple devices?
That would be great because im having no idea how i could create multiple lights on my own.
editing a fork should be easier for me.
Thanks
@dermarder the only file that I've modified is the Accessory.cpp, which is available here...
https://gist.github.com/gb160/a774a066268488935c3d
@gb160
yeah im having problems turning my lights on and off.
I can switch the state of the lights directly in the app, but when i try to use siri it just doesn't work.
Siri says that my lamps doesn't answer.
thanks
@dermarder I now think my issue was elsewhere, it's working for me now.
You'll have to rename the lights in the iOS app, they won't work as they are, also assign them to rooms.
Use the phrase "turn on the x" where x is whatever you've named your device.
@gb160
Yes! Its working now! Great work 👍
Now im trying to use more than 3 devices and im getting the same error:
*** glibc detected *** ./PHK: free(): invalid next size (normal): 0x01b84768 ***
How could you get it to work?
@dermarder have no idea how to solve that one!
Solved with new commit.
I'm getting an error when pairing with this new commit.
Using 3 lights in my Accessory.cpp works fine.
Using 3 lights and a fan i get this error when attempting to pair...
root@raspberrypi:~/PersonalHomeKit-Dynamic# ./PHK
Initial Accessory
Serial Port: -1
*** WARNING *** The program 'PHK' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=PHK
Start Connect: 10
Start pairing state: 1
Pair Setup Transfered length 492
Start pairing state: 3
Password Correct
Pair Setup Transfered length 148
Start pairing state: 5
Start Connect: 11
Start Pair Verify
State = 1
Pair Verify M1
State = 3
Pair Verify M3
Successfully Connect
Receive request: GET /accessories HTTP/1.1
Ask for accessories info
Segmentation fault
root@raspberrypi:~/PersonalHomeKit-Dynamic#
my Accessory.cpp is here...https://gist.github.com/gb160/e613dff6112599804bc7
if i remove the section for the fan, it pairs and works fine.
This is the Console log from iOS simulator when the error occurs...
2014-12-02 10:57:26.594 HomeKitDemo[17457:415854] DidUpdateHomes:<HMHomeManager: 0x7fc8724228c0>
2014-12-02 10:57:26.596 HomeKitDemo[17457:415854] No Primary Home, try to setup one
2014-12-02 10:57:26.596 HomeKitDemo[17457:415854] No Home is available, ask user to add one.
2014-12-02 10:57:29.924 HomeKitDemo[17457:415854] New Home [ name = home, primary : Yes ]
2014-12-02 10:57:29.931 HomeKitDemo[17457:415854] DidSetPrimaryHome
2014-12-02 10:57:46.525 HomeKitDemo[17457:415854] Error Domain=HMErrorDomain Code=54 "Failed with OSStatus code -6753 (kConnectionErr)" UserInfo=0x7fc8725ee270 {NSLocalizedDescription=Failed with OSStatus code -6753 (kConnectionErr)}
@etwmc do u want me to open a new issue for this?
@gb160 yes, please.
BTW: I will need the console log from homed, but since the problem is on the client side, I think you should just set the HomeKitReplyHeaderLog to 1, and send the console log of PHK.
This issue seems to have solved itself....I will close this and re open if it occurs again