dommarion a écrit:Bonjour jlv58,
J'ai aussi mis en route l'application smartlife avec le bridge Tuya, et j'arrive à commander mes lumières avec mon smartphone en 4G donc hors réseau domestique.
Bon weekend
dommarion
showbees a écrit:Bonjour,
Je suis en train d'essayer le plug-in tuya, pour le moment sans succès.
Je pense que n'ayant pas de passerelle, cela bloque sur la première partie : avoir un token.
J'ai regardé un peu ce qui était disponible mais j'avoue être un peu perdu.
Quelle serait le bon choix?
Actuellement une box edomus+ avec le dongle zigate.
Périphériques :
Zwave
Zigbee via le dongle
Tuya WIFI(uniquement via l'app tuya pour le moment)
Le but de la passerelle tuya serait uniquement l'intégration dans l'edomus.
Merci,
Bonne journée,
Showbees
"<?xml version="1.0" encoding="utf8" ?><root><code>40001900</code><msg>No space permission</msg><success>0</success><t>1716107737105</t>% [...]",
showbees a écrit:Concernant la partie 2 : oui c'est fait j'ai accès a la plateforme(j'arrive aussi a envoyer des commandes via la plateforme. Dans le plug in, je vois bien la liste des périphériques.
Ils se créent, mais ne marchent pas. Si je créé la passerelle via le plug in( en mettant un nom fictif ou pas de nom ) elle se crée mais ne marche pas et j'ai une notification par après
- Code : Tout sélectionner
"<?xml version="1.0" encoding="utf8" ?><root><code>40001900</code><msg>No space permission</msg><success>0</success><t>1716107737105</t>% [...]",
Je ne vois jamais de token. Showbees
&action={"commands":[ {"code": "switch_led","value": true },{"code": "work_mode","value": "colour"},{"code": "colour_data","value": "013e038403e8"}]}
[
{
"code": "switch_led",
"value": true
},
{
"code": "work_mode",
"value": "colour"
},
{
"code": "paint_colour_data",
"value": "AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="
}
]
&action={"commands":[ {"code": "switch_led","value": true}, {"code":"work_mode","value": "colour"}, { "code": "paint_colour_data","value": "AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g=" }]}
showbees a écrit:==> 2.Via IoT plateforme, j'arrive a lui envoyer des patterns tels que
- Code : Tout sélectionner
[
{
"code": "switch_led",
"value": true
},
{
"code": "work_mode",
"value": "colour"
},
{
"code": "paint_colour_data",
"value": "AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="
}
]il s'éteint mais la valeur variateur reste "marche" et si je demande ensuite via eedomus une couleur pleine il remet bien la bonne couleur ==> une idée?
- Code : Tout sélectionner
&action={"commands":[ {"code": "switch_led","value": true}, {"code":"work_mode","value": "colour"}, { "code": "paint_colour_data","value": "AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g=" }]}
&action={"commands":[{"code":"work_mode","value":"colour"},{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}],"commands":[{"code":"switch_led","value":true}]}
http://localhost/script/?exec=Tuya_direct.php&device=bf265435d7f05fbbb3dwqm&eedomus_controller_module_id=3274702&action={"commands": [{"code":"work_mode","value":"colour"},{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}]}&debug=1
array(8) {
[0]=>
string(24) "sign_method: HMAC-SHA256"
[1]=>
string(31) "client_id: g3ag7xw7n4ratsu8hnku"
[2]=>
string(16) "t: 1716134455000"
[3]=>
string(10) "mode: cors"
[4]=>
string(30) "Content-Type: application/json"
[5]=>
string(70) "sign: A380FDBB7E72E02C73255A8342F5B596FBAA42F996C32C0D3DCBB639880BA2F0"
[6]=>
string(46) "access_token: b9d950fa0daa7ae8bb422f9144d6a177"
[7]=>
string(39) "nonce: 1fb4488ad88ed246c8a432b5e24161c0"
}
retour de requête:{"result":{"active_time":1707579289,"bind_space_id":"174658257","category":"dd","create_time":1707579289,"custom_name":"","icon":"smart/icon/ay1541056239985fDGjj/79b5195d421431d3d74da94cc3c1b672.png","id":"bf265435d7f05fbbb3dwqm","ip":"109.129.29.206","is_online":true,"lat":"50.6548","local_key":"5NM}jByQ27W:pY|^","lon":"5.6483","model":"6232000100","name":"Battletron Light Bar","product_id":"stmkcsykq3kheboa","product_name":"Battletron Light Bar","sub":false,"time_zone":"+01:00","update_time":1709318423,"uuid":"7a2fac0b0fc1ec6c"},"success":true,"t":1716134457339,"tid":"faa7013915f811ef91a1a273a55a00fc"}
array(21) {
["url"]=>
string(66) "https://openapi.tuyaeu.com/v2.0/cloud/thing/bf265435d7f05fbbb3dwqm"
["content_type"]=>
string(30) "application/json;charset=UTF-8"
["http_code"]=>
int(200)
["header_size"]=>
int(618)
["request_size"]=>
int(399)
["filetime"]=>
int(-1)
["ssl_verify_result"]=>
int(0)
["redirect_count"]=>
int(0)
["total_time"]=>
float(0.348341)
["namelookup_time"]=>
float(0.00017)
["connect_time"]=>
float(0.038534)
["pretransfer_time"]=>
float(0.27717)
["size_upload"]=>
float(0)
["size_download"]=>
float(611)
["speed_download"]=>
float(1755)
["speed_upload"]=>
float(0)
["download_content_length"]=>
float(611)
["upload_content_length"]=>
float(-1)
["starttransfer_time"]=>
float(0.348163)
["redirect_time"]=>
float(0)
["header"]=>
string(618) "HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 611
Connection: keep-alive
Date: Sun, 19 May 2024 16:00:57 GMT
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers:
Access-Control-Allow-Headers: access_token,Content-Type
Access-Control-Allow-Methods: POST
Access-Control-Allow-Methods: OPTIONS
Access-Control-Allow-Methods: GET
Access-Control-Allow-Methods: DELETE
Access-Control-Allow-Methods: PUT
Access-Control-Allow-Origin: https://iot.tuya.com,https://platform.tuya.com
Gateway-Info: highway
Server: Sec
Strict-Transport-Security: max-age=31536000
"
}
header_received:array(8) {
[0]=>
string(24) "sign_method: HMAC-SHA256"
[1]=>
string(31) "client_id: g3ag7xw7n4ratsu8hnku"
[2]=>
string(16) "t: 1716134457339"
[3]=>
string(10) "mode: cors"
[4]=>
string(30) "Content-Type: application/json"
[5]=>
string(70) "sign: 4CE9A4BC2E3E7B52A4142822F022482EB12AA455B0E0E9DF39D6F5A11ED9DEA2"
[6]=>
string(46) "access_token: b9d950fa0daa7ae8bb422f9144d6a177"
[7]=>
string(39) "nonce: faa7013915f811ef91a1a273a55a00fc"
}
retour de requête:{"result":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"},{"code":"colour_data","value":"009e03e803e8"},{"code":"countdown","value":0},{"code":"light_pixel","value":16},{"code":"dreamlight_scene_mode","value":"ATcKWlpgAABkADNYABhkAQBFAONeAKww"},{"code":"dreamlightmic_music_data","value":"AQAAA2QyAAAAZAAAZAB4ZADwZAA8ZAC0ZAEsZAAAAAAAAA=="},{"code":"lightpixel_number_set","value":16},{"code":"paint_colour_data","value":"AAEAFAAAngPoA+g="}],"success":true,"t":1716134457689,"tid":"fadca57b15f811efa19236780218d147"}
array(21) {
["url"]=>
string(76) "https://openapi.tuyaeu.com/v1.0/iot-03/devices/bf265435d7f05fbbb3dwqm/status"
["content_type"]=>
string(30) "application/json;charset=UTF-8"
["http_code"]=>
int(200)
["header_size"]=>
int(618)
["request_size"]=>
int(409)
["filetime"]=>
int(-1)
["ssl_verify_result"]=>
int(0)
["redirect_count"]=>
int(0)
["total_time"]=>
float(0.302761)
["namelookup_time"]=>
float(0.000162)
["connect_time"]=>
float(0.040077)
["pretransfer_time"]=>
float(0.233482)
["size_upload"]=>
float(0)
["size_download"]=>
float(541)
["speed_download"]=>
float(1791)
["speed_upload"]=>
float(0)
["download_content_length"]=>
float(541)
["upload_content_length"]=>
float(-1)
["starttransfer_time"]=>
float(0.302585)
["redirect_time"]=>
float(0)
["header"]=>
string(618) "HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 541
Connection: keep-alive
Date: Sun, 19 May 2024 16:00:57 GMT
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers:
Access-Control-Allow-Headers: access_token,Content-Type
Access-Control-Allow-Methods: POST
Access-Control-Allow-Methods: OPTIONS
Access-Control-Allow-Methods: GET
Access-Control-Allow-Methods: DELETE
Access-Control-Allow-Methods: PUT
Access-Control-Allow-Origin: https://iot.tuya.com,https://platform.tuya.com
Gateway-Info: highway
Server: Sec
Strict-Transport-Security: max-age=31536000
"
}
header_received:<?xml version="1.0" encoding="utf8" ?><root><result><n0><code>switch_led</code><value>1</value></n0><n1><code>work_mode</code><value>colour</value></n1><n2><code>colour_data</code><value>009e03e803e8</value></n2><n3><code>countdown</code><value>0</value></n3><n4><code>light_pixel</code><value>16</value></n4><n5><code>dreamlight_scene_mode</code><value>ATcKWlpgAABkADNYABhkAQBFAONeAKww</value></n5><n6><code>dreamlightmic_music_data</code><value>AQAAA2QyAAAAZAAAZAB4ZADwZAA8ZAC0ZAEsZAAAAAAAAA==</value></n6><n7><code>lightpixel_number_set</code><value>16</value></n7><n8><code>paint_colour_data</code><value>AAEAFAAAngPoA+g=</value></n8></result><success>1</success><t>1716134457689</t><tid>fadca57b15f811efa19236780218d147</tid></root>
&action={"commands":[{"code":"switch_led","value":true}]}
&action={"commands":[{"code":"switch_led","value":false}]}
&action={"commands":[{"code":"work_mode","value":"colour"},{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}],"commands":[{"code":"switch_led","value":true}]}
<?xml version="1.0" encoding="utf8" ?><root><result><n0><code>switch_led</code><value>1</value></n0><n1><code>work_mode</code><value>colour</value></n1><n2><code>colour_data</code><value>009e03e803e8</value></n2><n3><code>countdown</code><value>0</value></n3><n4><code>light_pixel</code><value>16</value></n4><n5><code>dreamlight_scene_mode</code><value>ATcKWlpgAABkADNYABhkAQBFAONeAKww</value></n5><n6><code>dreamlightmic_music_data</code><value>AQAAA2QyAAAAZAAAZAB4ZADwZAA8ZAC0ZAEsZAAAAAAAAA==</value></n6><n7><code>lightpixel_number_set</code><value>16</value></n7><n8><code>paint_colour_data</code><value>AAEAFAAAngPoA+g=</value></n8></result><success>1</success><t>1716134457689</t><tid>fadca57b15f811efa19236780218d147</tid></root>
&action={"commands":[{"code":"work_mode","value":"colour"},{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}],"commands":[{"code":"switch_led","value":true}]}
&action={"commands":[ {"code": "switch_led","value": true },{"code": "work_mode","value": "colour"},{"code": "colour_data","value": "AAEAFAAAuAPoA+g="}]}
&action={"commands":[ {"code": "switch_led","value": true },{"code": "work_mode","value": "colour"},{"code": "colour_data","value": "aaeafaaa0a00"}]}
showbees a écrit:Re-Re Hello,
1. Je ne suis pas certain de comprendre la première partie sur l'url...
Je suis passé par le bouton "tester" présent sur le périphérique de la passerelle(que je n'ai pas) et reconstruit l'url sur base de ce que je voyais dans les valeurs du périphérique température de la LED en rajoutant
le "&debug=1" à la fin...
Ce n'est pas cela qu'il fallait faire?
&action={"commands":[{"code":"work_mode","value":"colour"},{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}],"commands":[{"code":"switch_led","value":true}]}
&action={"commands":[{"code":"switch_led","value":true}]}
&action={"commands":[{"code":"switch_led","value":false}]}
&action={"commands":[{"code":"work_mode","value":"colour"},{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}],"commands":[{"code":"switch_led","value":true}]}
&action={"commands":[{"code":"switch_led","value":true}],"commands":[{"code":"work_mode","value":"colour"},{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}]}
&action={"commands":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"}],"commands":[{"code":"paint_colour_data","value":"AAMAFAAAKAPkA+gAwQPkA9wA/wMcA5oACwOWA+g="}]}
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 14 invité(s)