Page 16 sur 22

Re: Domoticz et Freebox

Publié : 17 nov. 2016, 13:56
par manuloup
Oui cette partie spécifique à la V5 est déjà dans le tuto ;)

Re: Domoticz et Freebox

Publié : 17 nov. 2016, 17:56
par chacal62
Par contre j'aimerai recuperer les valeurs de debits entrant,sortant et uptime sur une V5, c'est possible ?
mais quelles valeurs mettre ds les wget ?
merci

Re: Domoticz et Freebox

Publié : 17 nov. 2016, 18:20
par chacal62
itcitc77 a écrit :bonjour
lorsque je lance ./freeboxos_bash_api.sh rien ne se passe avez vous une idée
Faut peut être faire : source ./freeboxos_bash_api.sh ..

Re: Domoticz et Freebox

Publié : 17 nov. 2016, 19:35
par itcitc77
je ne comprend pas ce que tu veux dire

Re: Domoticz et Freebox

Publié : 17 nov. 2016, 20:52
par chacal62
itcitc77 a écrit :je ne comprend pas ce que tu veux dire
la commande c'est : source ./freeboxos_bash_api.sh et pas ./freeboxos_bash_api.sh
J'espere que c'est clair parceque la je ne peux plus rien ....

Re: Domoticz et Freebox

Publié : 18 nov. 2016, 13:26
par chacal62
chacal62 a écrit :Par contre j'aimerai recuperer les valeurs de debits entrant,sortant et uptime sur une V5, c'est possible ?
mais quelles valeurs mettre ds les wget ?
merci
Bon je me répond :

DOWNLOAD=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep WAN | awk '{printf $3}'`
curl -s "http://10.0.0.1:8181/json.htm?type=comm ... OAD%20ko/s

UPLOAD=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep WAN | awk '{printf $5}'`
curl -s "http://10.0.0.1:8181/json.htm?type=comm ... OAD%20ko/s

UPTIME_1=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep Temps | awk '{printf $7}'`
UPTIME_2=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep Temps | awk '{printf $9}'`
UPTIME_3=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep Temps | awk '{printf $11}'`
UPTIME=$UPTIME_1%20'jours,'%20$UPTIME_2%20'heures,'%20$UPTIME_3%20'min'
curl -s "http://10.0.0.1:8181/json.htm?type=comm ... e="$UPTIME

pour la variable , il faut un créer un device text , sinon seul , la variable jour est incrémentée.

Re: Domoticz et Freebox

Publié : 18 nov. 2016, 14:14
par chacal62
Voila mon script complet si ça peut intéresser quelqu'un :

Code : Tout sélectionner

#!/bin/bash
#SERVER
DOMOTICZ_SERVER="10.0.0.1:8181"
#SERVER idx
FREEBOX_UPTIME="162"
FREEBOX_DOWNLOAD="163"
FREEBOX_UPLOAD="166"
#VARIABLES"


DOWNLOAD=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep WAN | awk '{printf $3}'`
curl -s "http://$DOMOTICZ_SERVER/json.htm?type=command&param=udevice&idx=$FREEBOX_DOWNLOAD&svalue="$DOWNLOAD%20ko/s

UPLOAD=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep WAN | awk '{printf $5}'`
curl -s "http://$DOMOTICZ_SERVER/json.htm?type=command&param=udevice&idx=$FREEBOX_UPLOAD&svalue="$UPLOAD%20ko/s

UPTIME_1=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep Temps | awk '{printf $7}'`
UPTIME_2=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep Temps | awk '{printf $9}'`
UPTIME_3=`wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt | grep Temps | awk '{printf $11}'`

UPTIME=$UPTIME_1%20'jours,'%20$UPTIME_2%20'heures,'%20$UPTIME_3%20'min'
curl -s "http://$DOMOTICZ_SERVER/json.htm?type=command&param=udevice&idx=$FREEBOX_UPTIME&svalue="$UPTIME

Re: Domoticz et Freebox

Publié : 27 nov. 2016, 21:34
par damolc
Merci pour ce tuto
Je souhaiterais avoir un dummy on/off pour allumer et éteindre le wifi

Auriez vous une solution ?
Merci

Re: Domoticz et Freebox

Publié : 27 nov. 2016, 23:51
par deennoo
damolc a écrit :Merci pour ce tuto
Je souhaiterais avoir un dummy on/off pour allumer et éteindre le wifi

Auriez vous une solution ?
Merci
Oui, elle est ici : http://dev.freebox.fr/sdk/os/wifi/

Une requette http toute bête a placer en action on et action off.

Re: Domoticz et Freebox

Publié : 03 déc. 2016, 15:28
par damolc
deennoo a écrit :
damolc a écrit :Merci pour ce tuto
Je souhaiterais avoir un dummy on/off pour allumer et éteindre le wifi

Auriez vous une solution ?
Merci
Oui, elle est ici : http://dev.freebox.fr/sdk/os/wifi/

Une requête http toute bête a placer en action on et action off.

Merci de ta réponse mais peux tu me donner plus l éléments :
quelle est la requête http?
ou faut il la mettre : dans un Dummy de domoticz directement ou bien dans le script de la freebox du debut?