Funksteckdose steuern mit iphone

  • ich habe ein problem,

    ich habe funksteckdosen die ich mit meinem Raspberry und Homebridge über mein iphone steuern möchte.

    das soll alles über homekit im iphone laufen.

    habe alles eingerichtet mit homebridge, wirinpi und habe auch die codes ausgelesen von den steckdosen.

    habe auch das plugin Homebridge Rcswitch4 geladen. warum auch immer bekomme ich bei anderen plugins diese fehlermeldung:


    USER: homebridge

    DIR: /usr/local/lib

    CMD: sudo -E -n npm install homebridge-rcswitch-gpiomem@latest





    > [email protected] install /usr/local/lib/node_modules/homebridge-rcswitch-gpiomem/node_modules/rcswitch-gpiomem

    > node-gyp rebuild



    make: Verzeichnis „/usr/local/lib/node_modules/homebridge-rcswitch-gpiomem/node_modules/rcswitch-gpiomem/build“ wird betreten

    CXX(target) Release/obj.target/rcswitch-gpiomem/src/rcswitch.o

    In file included from ../src/rcswitch.cpp:1:

    ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:

    ../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]

    , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)

    ^

    In file included from ../../nan/nan.h:56,

    from ../src/rcswitch.cpp:1:

    ../src/rcswitch.cpp: At global scope:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:608:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]

    (node::addon_register_func) (regfunc), \

    ^

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:642:3: note: in expansion of macro ‘NODE_MODULE_X’

    NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)

    ^~~~~~~~~~~~~

    ../src/rcswitch.cpp:8:1: note: in expansion of macro ‘NODE_MODULE’

    NODE_MODULE(rcswitch, InitAll)

    ^~~~~~~~~~~

    CXX(target) Release/obj.target/rcswitch-gpiomem/src/RCSwitchNode.o

    In file included from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:

    ../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]

    , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)

    ^

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::Init(v8::Local<v8::Object>)’:

    ../src/RCSwitchNode.cpp:34:38: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’

    constructor.Reset(tpl->GetFunction());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’

    V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(

    ^~~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:6126:46: note: candidate expects 1 argument, 0 provided

    ../src/RCSwitchNode.cpp:35:72: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’

    exports->Set(Nan::New("RCSwitch").ToLocalChecked(), tpl->GetFunction());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:6126:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’

    V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(

    ^~~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:6126:46: note: candidate expects 1 argument, 0 provided

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::SwitchOp(const Nan::FunctionCallbackInfo<v8::Value>&, bool)’:

    ../src/RCSwitchNode.cpp:47:9: error: ‘Handle’ is not a member of ‘v8’

    v8::Handle<v8::Value> group = info[0];

    ^~~~~~

    ../src/RCSwitchNode.cpp:47:25: error: expected primary-expression before ‘>’ token

    v8::Handle<v8::Value> group = info[0];

    ^

    ../src/RCSwitchNode.cpp:47:27: error: ‘group’ was not declared in this scope

    v8::Handle<v8::Value> group = info[0];

    ^~~~~

    ../src/RCSwitchNode.cpp:47:27: note: suggested alternative: ‘strdup’

    v8::Handle<v8::Value> group = info[0];

    ^~~~~

    strdup

    ../src/RCSwitchNode.cpp:48:9: error: ‘Handle’ is not a member of ‘v8’

    v8::Handle<v8::Value> swtch = info[1];

    ^~~~~~

    ../src/RCSwitchNode.cpp:48:25: error: expected primary-expression before ‘>’ token

    v8::Handle<v8::Value> swtch = info[1];

    ^

    ../src/RCSwitchNode.cpp:48:27: error: ‘swtch’ was not declared in this scope

    v8::Handle<v8::Value> swtch = info[1];

    ^~~~~

    ../src/RCSwitchNode.cpp:48:27: note: suggested alternative: ‘rcswitch’

    v8::Handle<v8::Value> swtch = info[1];

    ^~~~~

    rcswitch

    ../src/RCSwitchNode.cpp:62:9: error: ‘Handle’ is not a member of ‘v8’

    v8::Handle<v8::Value> famly = info[0];

    ^~~~~~

    ../src/RCSwitchNode.cpp:62:25: error: expected primary-expression before ‘>’ token

    v8::Handle<v8::Value> famly = info[0];

    ^

    ../src/RCSwitchNode.cpp:62:27: error: ‘famly’ was not declared in this scope

    v8::Handle<v8::Value> famly = info[0];

    ^~~~~

    ../src/RCSwitchNode.cpp:63:9: error: ‘Handle’ is not a member of ‘v8’

    v8::Handle<v8::Value> group = info[1];

    ^~~~~~

    ../src/RCSwitchNode.cpp:63:25: error: expected primary-expression before ‘>’ token

    v8::Handle<v8::Value> group = info[1];

    ^

    ../src/RCSwitchNode.cpp:63:27: error: ‘group’ was not declared in this scope

    v8::Handle<v8::Value> group = info[1];

    ^~~~~

    ../src/RCSwitchNode.cpp:63:27: note: suggested alternative: ‘strdup’

    v8::Handle<v8::Value> group = info[1];

    ^~~~~

    strdup

    ../src/RCSwitchNode.cpp:64:9: error: ‘Handle’ is not a member of ‘v8’

    v8::Handle<v8::Value> devce = info[2];

    ^~~~~~

    ../src/RCSwitchNode.cpp:64:25: error: expected primary-expression before ‘>’ token

    v8::Handle<v8::Value> devce = info[2];

    ^

    ../src/RCSwitchNode.cpp:64:27: error: ‘devce’ was not declared in this scope

    v8::Handle<v8::Value> devce = info[2];

    ^~~~~

    ../src/RCSwitchNode.cpp:64:27: note: suggested alternative: ‘dev_t’

    v8::Handle<v8::Value> devce = info[2];

    ^~~~~

    dev_t

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::New(const Nan::FunctionCallbackInfo<v8::Value>&)’:

    ../src/RCSwitchNode.cpp:88:59: error: no matching function for call to ‘v8::Function::NewInstance(const int&, v8::Local<v8::Value> [0])’

    info.GetReturnValue().Set(cons->NewInstance(argc, argv));

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:4281:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’

    V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(

    ^~~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:4281:44: note: candidate expects 3 arguments, 2 provided

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:4284:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’

    V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(

    ^~~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:4284:44: note: candidate expects 1 argument, 2 provided

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::Send(const Nan::FunctionCallbackInfo<v8::Value>&)’:

    ../src/RCSwitchNode.cpp:121:44: error: no matching function for call to ‘v8::Value::Uint32Value()’

    obj->rcswitch.send(code->Uint32Value(), bLength->Uint32Value());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’

    V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(

    ^~~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided

    ../src/RCSwitchNode.cpp:121:68: error: no matching function for call to ‘v8::Value::Uint32Value()’

    obj->rcswitch.send(code->Uint32Value(), bLength->Uint32Value());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2707:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’

    V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(

    ^~~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::EnableTransmit(const Nan::FunctionCallbackInfo<v8::Value>&)’:

    ../src/RCSwitchNode.cpp:140:52: error: no matching function for call to ‘v8::Value::Int32Value()’

    obj->rcswitch.enableTransmit(pinNr->Int32Value());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’

    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;

    ^~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::SetPulseLength(const Nan::FunctionCallbackInfo<v8::Value>&)’:

    ../src/RCSwitchNode.cpp:163:54: error: no matching function for call to ‘v8::Value::Int32Value()’

    obj->rcswitch.setPulseLength(pLength->Int32Value());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’

    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;

    ^~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::SetRepeatTransmit(const Nan::FunctionCallbackInfo<v8::Value>&)’:

    ../src/RCSwitchNode.cpp:177:57: error: no matching function for call to ‘v8::Value::Int32Value()’

    obj->rcswitch.setRepeatTransmit(nRepeat->Int32Value());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’

    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;

    ^~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided

    ../src/RCSwitchNode.cpp: In static member function ‘static void RCSwitchNode::SetProtocol(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&)’:

    ../src/RCSwitchNode.cpp:197:49: error: no matching function for call to ‘v8::Value::Int32Value()’

    obj->rcswitch.setProtocol(value->Int32Value());

    ^

    In file included from /home/homebridge/.cache/node-gyp/12.18.1/include/node/node.h:67,

    from ../../nan/nan.h:56,

    from ../src/RCSwitchNode.h:4,

    from ../src/RCSwitchNode.cpp:1:

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’

    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;

    ^~~~~~~~~~

    /home/homebridge/.cache/node-gyp/12.18.1/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided

    make: *** [rcswitch-gpiomem.target.mk:113: Release/obj.target/rcswitch-gpiomem/src/RCSwitchNode.o] Fehler 1

    make: Verzeichnis „/usr/local/lib/node_modules/homebridge-rcswitch-gpiomem/node_modules/rcswitch-gpiomem/build“ wird verlassen

    gyp ERR! build error

    gyp ERR! stack Error: `make` failed with exit code: 2

    gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)

    gyp ERR! stack at ChildProcess.emit (events.js:315:20)

    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

    gyp ERR! System Linux 4.19.118-v7+

    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

    gyp ERR! cwd /usr/local/lib/node_modules/homebridge-rcswitch-gpiomem/node_modules/rcswitch-gpiomem

    gyp ERR! node -v v12.18.1

    gyp ERR! node-gyp -v v5.1.0

    gyp ERR! not ok

    npm ERR! code ELIFECYCLE

    npm ERR! errno 1

    npm ERR! [email protected] install: `node-gyp rebuild`

    npm ERR! Exit status 1

    npm ERR!

    npm ERR! Failed at the [email protected] install script.

    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.



    npm ERR! A complete log of this run can be found in:

    npm ERR! /home/homebridge/.npm/_logs/2020-06-19T14_39_48_172Z-debug.log



    Command failed. Please review log for details.



    den code habe ich für mein plugin benutzt:



    {

        "bridge": {

            "name": "Homebridge",

            "username": "CC:22:3D:E3:CE:31",

            "port": 51826,

            "pin": "031-45-154"

    },

        "description": "Home Smart Home",

        "platforms": [

    {

                "platform": "config",

                "name": "Config",

                "port": 8080,

                "auth": "form",

                "theme": "red",

                "restart": "sudo -n systemctl restart homebridge",

                "temp": "/sys/class/thermal/thermal_zone0/temp",

                "sudo": true,

                "log": {

                    "method": "custom",

                    "command": "journalctl -o cat -n 500 -f -u homebridge"

    }

    }

    ],

        "accessories": [

    {

                "accessory": "RCSwitch",

                "name": "Licht",

                "onCode": 4433,

                "offCode": 4436,

                "pin": 17,

                "protocol": 1,

                "pulseLength": 190,

                "bitLength": 24,

                "repeats": 10

    }

    ]

    }


    was könnte der fehler sein oder ist das plugin falsch? was könnte ich noch machen?