Re: [Plugin Tiers][Sujet Principal] Dash Button Amazon
Publié : 04 sept. 2019, 11:36
Personne n'a de solution ?
Envoyé de mon ONEPLUS A5010 en utilisant Tapatalk
Envoyé de mon ONEPLUS A5010 en utilisant Tapatalk
Forum sur Jeedom
https://www.jeedom.com/forum/
Code : Tout sélectionner
Début de l'installation
Reading package lists...
Building dependency tree...
Reading state information...
libpcap-dev is already the newest version (1.8.1-3).
0 upgraded, 0 newly installed, 0 to remove and 173 not upgraded.
--2019-09-12 03:44:59-- https://raw.githubusercontent.com/lunarok/jeedom_nodejs/master/nodejs.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.192.133, 151.101.0.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1491 (1.5K) [text/plain]
Saving to: 'dependencies.sh'
0K . 100% 16.0M=0s
2019-09-12 03:44:59 (16.0 MB/s) - 'dependencies.sh' saved [1491/1491]
dependencies.sh: 3: [: dashbutton: unexpected operator
Version actuelle : 12
Hit:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://ftp.debian.org/debian stretch InRelease
Hit:3 http://www.deb-multimedia.org stretch InRelease
Hit:4 http://ftp.debian.org/debian stretch-updates InRelease
Hit:5 http://ftp.debian.org/debian stretch-backports InRelease
Hit:6 https://deb.nodesource.com/node_12.x stretch InRelease
Hit:7 http://ftp.debian.org/debian stretch-proposed-updates InRelease
Hit:8 http://ftp.debian.org/debian stretch Release
Hit:9 http://repo.jeedom.com/odroid stable InRelease
Hit:10 https://oph.mdrjr.net/meveric all InRelease
Hit:11 https://oph.mdrjr.net/meveric stretch InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (9.20161125).
0 upgraded, 0 newly installed, 0 to remove and 173 not upgraded.
Ok, version suffisante
> socketwatcher@0.3.0 install /var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher
> node-gyp rebuild
make: Entering directory '/var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher/build'
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
../socket_watcher.cpp: In static member function 'static void SocketWatcher::Initialize(v8::Local<v8::Object>)':
../socket_watcher.cpp:29:36: error: no matching function for call to 'v8::FunctionTemplate::GetFunction()'
constructor.Reset(t->GetFunction());
^
In file included from /var/www/.cache/node-gyp/12.10.0/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^~~~~~~~~~~
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate expects 1 argument, 0 provided
../socket_watcher.cpp:30:75: error: no matching function for call to 'v8::FunctionTemplate::GetFunction()'
exports->Set(Nan::New("SocketWatcher").ToLocalChecked(), t->GetFunction());
^
In file included from /var/www/.cache/node-gyp/12.10.0/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^~~~~~~~~~~
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate expects 1 argument, 0 provided
../socket_watcher.cpp: In static member function 'static void SocketWatcher::Callback(uv_poll_t*, int, int)':
../socket_watcher.cpp:77:60: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(watcher->handle(), callback, argc, argv);
^
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../../nan/nan.h:1024:46: note: declared here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../socket_watcher.cpp: In static member function 'static void SocketWatcher::Set(const Nan::FunctionCallbackInfo<v8::Value>&)':
../socket_watcher.cpp:116:32: error: no matching function for call to 'v8::Value::Int32Value()'
int fd = info[0]->Int32Value();
^
In file included from /var/www/.cache/node-gyp/12.10.0/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:2582: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;
^~~~~~~~~~
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:2582:40: note: candidate expects 1 argument, 0 provided
socketwatcher.target.mk:109: recipe for target 'Release/obj.target/socketwatcher/socket_watcher.o' failed
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory '/var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 3.14.79-94
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! socketwatcher@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the socketwatcher@0.3.0 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! /var/www/.npm/_logs/2019-09-12T03_45_57_328Z-debug.log
Fin de l'installation
Code : Tout sélectionner
Error: The module '/var/www/html/plugins/dashbutton/resources/node_modules/pcap/build/Release/pcap_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
Ben tu as de la chance : la discussion du moment vient du fait que ce plugin n'a plus évolué et que les mises à jour de node.js pour les autres plugin rendent le plugin Dash inopérant me semble-t-il...HollyFredD a écrit : ↑22 sept. 2019, 10:28J'utilise le plugin "Dash Button" et ça fonctionne très bien.
Code : Tout sélectionner
sudo apt-get install tcpdump arp-scan aircrack-ng
cd ~
git clone https://github.com/maxisme/amazon-bash.git
cd amazon-bash
Code : Tout sélectionner
sudo -i
cd /home/<user>/amazon-bash
while :; do arp-scan --localnet -O ieee-oui.txt | grep 'Amazon'; done
Code : Tout sélectionner
192.168.1.133 ac:63:be:2f:23 Amazon Technologies Inc.
Code : Tout sélectionner
nano amazon-bash.sh
nano amazon-bash-wifi
Code : Tout sélectionner
MAC="ac:63:be:2f:23"
Code : Tout sélectionner
function onClick {
#code to be ran on click
curl -s "http://#IP_JEEDOM#/core/api/jeeApi.php?apikey=#APIKEY#&type=scenario&id=#ID#&action=#ACTION#"
}
Code : Tout sélectionner
nano amazonbash.service
[Unit]
Description=Amazon Bash service
After=network.target multi-user.target
[Service]
Type=simple
User=root
ExecStart=<CHEMIN ABSOLU VERS VOTRE SCRIPT AMAZON BASH>/amazon-bash.sh &
[Install]
WantedBy=multi-user.target
Code : Tout sélectionner
sudo cp amazonbash.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable amazonbash.service
Code : Tout sélectionner
Début de l'installation
Reading package lists...
Building dependency tree...
Reading state information...
libpcap-dev is already the newest version (1.8.1-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--2019-09-26 21:04:50-- https://raw.githubusercontent.com/lunarok/jeedom_nodejs/master/nodejs.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.136.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.136.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1491 (1.5K) [text/plain]
Saving to: 'dependencies.sh'
0K . 100% 31.5M=0s
2019-09-26 21:04:50 (31.5 MB/s) - 'dependencies.sh' saved [1491/1491]
dependencies.sh: 3: [: dashbutton: unexpected operator
dependencies.sh: 8: dependencies.sh: cannot create /tmp/${2}_dep: Permission denied
dependencies.sh: 15: dependencies.sh: cannot create /tmp/${2}_dep: Permission denied
Version actuelle : 12
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://mirror.csclub.uwaterloo.ca/debian stretch InRelease
Hit:3 http://mirror.csclub.uwaterloo.ca/debian stretch-updates InRelease
Hit:4 http://mirror.csclub.uwaterloo.ca/debian stretch Release
Hit:5 https://deb.nodesource.com/node_12.x stretch InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (9.20161125).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Ok, version suffisante
dependencies.sh: 54: dependencies.sh: cannot create /tmp/${2}_dep: Permission denied
dependencies.sh: 58: dependencies.sh: cannot create /tmp/${2}_dep: Permission denied
> socketwatcher@0.3.0 install /var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher
> node-gyp rebuild
make: Entering directory '/var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher/build'
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
../socket_watcher.cpp: In static member function 'static void SocketWatcher::Initialize(v8::Local<v8::Object>)':
../socket_watcher.cpp:29:36: error: no matching function for call to 'v8::FunctionTemplate::GetFunction()'
constructor.Reset(t->GetFunction());
^
In file included from /var/www/.cache/node-gyp/12.10.0/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^~~~~~~~~~~
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate expects 1 argument, 0 provided
../socket_watcher.cpp:30:75: error: no matching function for call to 'v8::FunctionTemplate::GetFunction()'
exports->Set(Nan::New("SocketWatcher").ToLocalChecked(), t->GetFunction());
^
In file included from /var/www/.cache/node-gyp/12.10.0/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^~~~~~~~~~~
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:5961:46: note: candidate expects 1 argument, 0 provided
../socket_watcher.cpp: In static member function 'static void SocketWatcher::Callback(uv_poll_t*, int, int)':
../socket_watcher.cpp:77:60: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(watcher->handle(), callback, argc, argv);
^
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../../nan/nan.h:1024:46: note: declared here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../socket_watcher.cpp: In static member function 'static void SocketWatcher::Set(const Nan::FunctionCallbackInfo<v8::Value>&)':
../socket_watcher.cpp:116:32: error: no matching function for call to 'v8::Value::Int32Value()'
int fd = info[0]->Int32Value();
^
In file included from /var/www/.cache/node-gyp/12.10.0/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:2582: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;
^~~~~~~~~~
/var/www/.cache/node-gyp/12.10.0/include/node/v8.h:2582:40: note: candidate expects 1 argument, 0 provided
socketwatcher.target.mk:109: recipe for target 'Release/obj.target/socketwatcher/socket_watcher.o' failed
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory '/var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.9.0-11-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/html/plugins/dashbutton/resources/node_modules/socketwatcher
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! socketwatcher@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the socketwatcher@0.3.0 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! /var/www/.npm/_logs/2019-09-27T01_05_00_416Z-debug.log
Fin de l'installation
Salut,TeHeR a écrit :Hello,
J'ai dû changer les piles de l'un de mes boutons. Malheureusement, impossible de le ré-activer. Il clignote (sur appui long) ou reste toujours bleu (appui court)...
Je ne peux donc pas aller plus loin... (j'avais bien l'adresse MAC sauvegardée ou suivre l'une des méthodes proposées par @flodus).
Quelqu'un a passé cette étape ?