In afara de Blynk, ITTT trebuie sa aveti un telefon cu android minim 6, Google app min 6.13, pentru a putea instala si functiona Google Assistant. Trebuie sa folositi acelasi cont atat pentru Blynk, IFTTT si aplicatiile de pe telefon.
Aplicatia mea este similara cu cea de pe YT, cu deosebirea intre modurile de comanda. Eu am nevoie de comenzi de tip PUSH vs modul SWITCH din exemplu.
In principiu toate se leaga, dar eu nu stiu ce anume trebuie inlocuit in appleturile create, astfel incat in loc de comanda āswitchā sa am āpushāā¦
In momentul de fata daca dau comanda din Blynk, prin modul PUSH comand un teleruptor pentru aprinderea respectiv stingerea unui bec. Daca folosesc Google Assistant, rezultatul este de tip SWITCH: la prima comanda vocala (de ex: turn on one) releul este ON ( am scris [ā0ā] in primul applet = prima comanda) iar la a doua comanda vocala (turn off one) releul trece in OFF (am scris [ā1ā] in al doilea applet).
Mai sunt cateva optiuni pentru āMethodā: GET, POST, PUT, HEAD, DELETE, PATCH si OPTION.
Cine are experienta cu IFTTT, il rog sa-mi indice care ar fi optiunile necesare.
nu ma pricep de loc la iftt si google asistant, nu am folosit nici odata. deocamdata pt absolut tot ce am vrut sa construiesc mi era suficient c++ si blynk.
din cate ai explicat si din cate am inteles, problema ta e ca nu functioneaza la fel blynk si google asistant? sau nu inteleg exact care e problema?
nu poti seta in aplicatia blynk butonul respectiv in loc de push pe switch?
astia sunt cu totul altceva. sunt protocoale http, petru a comunica date intre client si server. nu are nici o legatura cu switch sau push. cuta āhttp requestā in google.
Am nimerit si eu tutoriatul acela, si am zis sa-l Ć®ncercā¦ ca prea era frumos.
Ok. ifttt leagÄ mai multe aplicaČii de anumite acČiuni, sau cam asa ceva. Comanda finala data spre ESP, nu este de tip buton, ci comutator. Nu funcČioneazÄ ca si Blynk.
Se dau comenzi similar 0 sau 1, dar prin doua comenzi separate.
In Blynk, butonul este setat push, funcČioneazÄ ok, la primirea comenzii prin ifttt butonul din Blynk se declanČeazÄ ( apare si evidenČiat - on ) si rÄmĆ¢ne asa pana la o alta comanda fie din blynk fie vocal. ( acum nu mai Čtiu sigur daca la apÄsare in Blynk se revenea la starea oprit, verific maine )
Am sa Ć®ncerc maine sa dau o comanda vocala, dar sa declansez doua evenimente, decalate la o secunda, unul on celÄlalt off.
Codul este ok, cu Blynk, se realizeaza o temporizare si reseteaza 1-0 sau 0-1 dupa cum doresc.
Necazul este din IFTTTā¦ sau mai bine zis de la"Webhooks". Comanda [ā0ā] seteaza un pin LOW, iar [ā1ā] = HIGH, orice as scrie in blynk.
Odata primita o comanda prin Webhoks, Blynk nu mai face nimic (atat timp cat este comanda ON). De fapt, in IFTTT se utilizeaza doar URL-ul si tokenul generat de blink. Si bineinteles definit pinul comandat.
#define BLYNK_PRINT Serial
#include "ESP8266WiFi.h"
#include "BlynkSimpleEsp8266.h"
#include <SimpleTimer.h>
SimpleTimer timer;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "aaaa2";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "aaa";
char pass[] = "aaa";
#define outputPin 15
#define inputPin V1
// pin 2= D4(Placa) = V1(Aplicatie)
void setup()
{
// Debug console
Serial.begin(9600);
pinMode( 15, OUTPUT); //2->5 placa
digitalWrite( 15, HIGH);
Blynk.begin(auth, ssid, pass);
}
BLYNK_WRITE(V1) {
if (param.asInt()==1){ // act only on the HIGH and not the LOW of the momentary
digitalWrite(15, !digitalRead(15)); // invert pin state just once
timer.setTimeout(1000L, [](){
digitalWrite(15, !digitalRead(15)); // then invert it back after 1000ms
Blynk.virtualWrite(V1, LOW); // sau HIGH
});
}
}
void loop()
{
Blynk.run();
timer.run();
}
Am rezolvat, postul acesta se poate inchide. A mai fost deschis si in engleza, am primit informatii acolo.
In Webhooks, nu am introdus corect. Am lasat tot pinul digital. Comanda trebuia trimisa prin virtual. De aceea nu tinea conte de cod, de fapt eu nu i-am spus corect ce trebuie sa faca
May I request a conversation in English? If there is something good to learn, we are all missing out on it. If we could contribute, we lose a chance to do so.
@Pavel, for the record, the marking of non-english topics should be indicated somehow on the āsolvedā label too. for example in this case, the romanian subtopic was marked as solved, so other users canāt understand why it is not in english.
@mohan_sundaram as an Englishman I know English is a popular language but in fairness to Blynkers around the world they should be able to use their native language on this site. It might mean they receive less responses to their post but that is their choice.
If you use Google Chrome you can ask for this page to be translated into English.
Personally I only see the Solved category as being required for when a āBug / Issueā post is solved and this is quite rare as there are very few bugs in the Blynk libraries / app.
Most of the āissuesā are quickly moved to the correct category of āHelp with my projectā¦ā category.
Other than prefixing the topic with [Solved] I see no reason to move āHelpā posts to the solved category.
This would mean all foreign language posts stay in their original category.
Prefixing is an option, however I see, and use, the SOLVED category as necessary to indicate the topic has come to some form or closureā¦ whether actual solution or determination of no availed solution, or so off the tracks as now irrelevant to the OP (in which case topic closure is also recommended).
That was the case, however with the recent changes it is not so clearā¦ I use Chrome, so for the most part itās translation accuracy is sufficient (there are funny exceptions) that I can easily follow along and contribute - albeit in English if I donāt take time to manually translate backā¦ which I usually donāt bother with.
One drawback to the segregation of language that I see, its that it is almost like a clique forming processā¦ Those that understand participate, but others who normally would tend to contribute now stay out of itā¦ I do see this as a potential fracture of the unity of a forumā¦ Many hands, light work and all that being reduced to the few with both answers and language skills being the only ones to assist.
iām agree with this. the solved category makes the forum a bit more clean.
also, iām not a big fan of multi language topics, because it reduces a lot the chances for quality answers and the answers are unusable for most members. however, we must agree that, this is the only way for members who do not speak english.
but anyway, i do not think that lots of people will use them, because to use blynk a minimal coding experience is needed, and to have coding experience a minimal english is needed. so, i always assume if someone can code he must know a little bit of english tooā¦ and usually that is enough to ask questions on a forum.