Page 3 sur 6
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 19:40
par skarab22
Code : Tout sélectionner
airsend:
devices:
Volet Salle à manger 2:
id: 42678
type: 4099
apiKey: XXXXX
channel:
id: 26848
source: 127350016
A priori on à l'air pas mal
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 20:57
par Flying Domotic
Et du coup, leur proposition
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
elle fonctionne ?
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 21:00
par skarab22
Oui, cette commande fonctionne dans le terminal. Du coup je me demande ce qui est passé exactement comme ordre par le plugin.
Il y a moyen de le voir en debug ?
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 21:17
par Flying Domotic
Le log Domoticz indique ce qui est envoyé :
Code : Tout sélectionner
Sending notes method=1, type=9, value=28 to channel Id=26848, source=127350016 (standard)
De mémoire, on peut aussi le voir dans le log du WebService.
Attention, dans le message ci-dessous, j'ai mis à jour la source du message d'origine. Est-ce bien celui qui a été testé (en changeant le bearer) ?
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
S'il fonctionne, qu'est ce que donne :
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":1,\"type\":9,\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Et :
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":1,\"type\":9,\"value\":\"28\"}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 21:37
par skarab22
Merci pour ce retour
Flying Domotic a écrit : 24 janv. 2024, 21:17
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Ca ne marche pas, j'ai également essaye de changer le method et type comme sur ta deuxième commande mais en gardant la source qui marche et ça marche. Je ne sais pas si ça peut t'aider.
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 21:55
par Flying Domotic
Je pige pas trop la réponse ci-dessous :
skarab22 a écrit : 24 janv. 2024, 21:37
Flying Domotic a écrit : 24 janv. 2024, 21:17
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Ce type de commande est générée par le plugin pour informer le service Web qu'on est intéressé par un type de protocole particulier. Ça ne correspond pas aux commandes demandées ...
Pour avancer et bien comprendre, quelles sont les commandes qui marchent, et celles qui ne marchent pas (après avoir mis le bon bearer) ?
Commande 1 :
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Commande 2 :
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Commande 3 :
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":\"28\"}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 21:59
par skarab22
Je rectifie par rapport à mon post précédent :
- les commandes 1 et 2 marchent (je ne regardais pas le bon volet...)
- la 3 ne marche pas : si je comprend bien tu passes la valeur de niveau au format texte ce qui a été infirmé par Devmel.
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 24 janv. 2024, 22:40
par Flying Domotic
Je pige mieux ...
Le plugin envoie les données au format numérique, et pas texte. J'ai changé la trace pour avoir directement le contenu du JSON envoyé. Mettre à jour le plugin et relancer la commande 2 pour être certain de ce qui est poussé par Domoticz.
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 25 janv. 2024, 21:38
par skarab22
Je viens d'essayer ta modification mais ça ne marche pas. En reprenant ton message, je ne vois pas différence entre la commande 1 et la commande 2.
Pour reprendre ce qui marche
Re: [Plugin] AirSend : Intégration des boîtiers AirSend dans DomoticZ
Publié : 25 janv. 2024, 23:22
par Flying Domotic
Oups, la commande 2 n'a pas été copiée correctement ...
Voilà la bonne :
Code : Tout sélectionner
curl -X POST "http://127.0.0.1:33863/airsend/transfer" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"wait\": true, \"channel\": {\"id\":\"26848\",\"source\":\"127350016\"}, \"thingnotes\":{\"notes\":[{\"method\":\"PUT\",\"type\":\"LEVEL\",\"value\":28}]}}" -H "Authorization: Bearer sp://xxxxxxxxx@[ip]?gw=0"
Je suis aussi intéressé par le log de la dernière version du plugin, lorsqu'on change la position du volet depuis Domoticz. La dernière version affiche directement le code JSON envoyé au plugin, plutôt que les valeurs des différentes variables qui servent à le générer.