[Solved] Blynk IFTTT si Google Assistant

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!

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.

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.

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:

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.

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.

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

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

no, ma bucur ca ai reusit! felicitari!

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.

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

@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

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ā€¦

hey, not russian, romanian :slight_smile:

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

2 Likes

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

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.

I write similar post here (in english):

1 Like

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.