BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

[Solved] Blynk IFTTT si Google Assistant

romanian
#1

Salutare!

Am gasit un tutorial pe YT, si am reusit sa comand aprinderea luminilor cu ajutorul lui Google Assistant. Aici este linkul: https://www.youtube.com/watch?v=5SvRolROPxA

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.

Toate cele bune!

0 Likes

#2

salut!

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.

0 Likes

#3

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.

0 Likes

#4

Salut,

Am gasit aici o discutie similara:

vad ca tot in codul pentru blynk a facut modificari…

Am sa testez acest cod si sper sa fie ceea ce doresc :slight_smile:

0 Likes

#5

da, cred ca e ceva asemanator… merita incercat.
vezi, pe termen lung tot la programare ajungi :slight_smile:

de aia am recomandat sa investezi timp si efort sa inveti coding. te ajuta in toate proiectele.

0 Likes

#6

Din pacate, nu functioneaza.

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.

0 Likes

#7

Acesta este codul:

 #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();
    }
0 Likes

#8

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 :blush:

1 Like

#9

no, ma bucur ca ai reusit! felicitari!

0 Likes

#10

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.

0 Likes

#11

@mohan_sundaram, this was a specific romanian language topic, per International Sub-Topics

this is why the language is not english.

@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.

thanks!

0 Likes

#12

@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.

1 Like

#13

the problem is, that once a topic is marked as “solved”, currently there is no indicator that initially it was a non-english language topic.

and as per forum rules, the official language is english in this forum, @mohan_sundaram request is valid…

0 Likes

#14

hey, not russian, romanian :slight_smile:

0 Likes

#15

I have moved the thread back to Romanian section and just added [Solved] to the title thread.

2 Likes

#16

aham. ok, so we will keep this practice until a better solution is implemented. :wink:
i also added a tag, that is persistent even if marked as “solved”

1 Like

#17

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.

0 Likes

#18

I write similar post here (in english):

1 Like

#19

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.

0 Likes

#20

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.

0 Likes