Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 1

HC3 - TTS on Alexa?


Pablo_Supreme

Question

Hi,

I bought for myself a HC3. It's working good for this what I need it.

Unfortunately I came across a problem that I cannot solve by myself - how to use Alexas Text-To-Speach function on HC3. On this side

Please login or register to see this link.

I found a great tutorial how to do it on HC2. On HC3 the LUA changed and I'm lost.

Does somebody did this on HC3? Or is somebody able to translate the HC2 Lua to HC3 Lua?

 

Thanks in advance for help.

Cheers

Pawel

Edited by Pablo_Supreme
one sentence was missing
Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Hallo Pablo, i have a working QA for HC3. It´s run with the webserver and php-skript from this Homepage:

Please login or register to see this link.

 

Gruß Sven

Please login or register to see this attachment.

  • Thanks 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi @SvenG.

    thanks for this - now I just need to make it work with my configuration ?

     

    and I did:

    • from the tutorial on iqhaus.de (link above) the php-script - it's running
    • Import the QA into my HC3
    • I got a generic virtual device with the name "SpeakME_reserve"
    • changed the IP address on tab "variables" to the one I have the php-script running
    • on tab "edit&preview" => "edit" in line 23 I changed the code "local url = "http://".. ipAddress .. "/alexa_tts/alexa.php?device_name=reserve&text_tts=" .. params" to the one where my php-script is running and changed the device name. Now it looks like this for my Alexa in the Bedroom "local url = "http://".. ipAddress .. "/alexa.php?device_name=schlafzimmer&text_tts=" .. params"
    • changed in line 49 the text (just to test if I'm right) to "mein eigener Text"

     

    and it works ? - thanks a lot - You are the best ?

     

    Cheers

    Pawel

    Edited by Pablo_Supreme
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @SvenG.

    Did You manage to use a Variable as Text? e.g. I put the temperature of the bedroom temperature sensor as variable "temp_bedroom". Can I get Alexa to say "The temperature in the bedroom is ... (temp_bedroom)"?

    Link to comment
    Share on other sites

    • 0

    hallo Pablo_Supreme my english is very bad...u can tell me the quetions in german?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi @SvenG.

    kann ich natürlich machen (wohne auch in Deutschland). Ich habe das auf Englisch gemacht damit auch andere davon profitieren.

     

    Meine Frage war - gibt es eine Möglichkeit das ein variabler Text ausgegeben wird? z.B. das ich irgendwie die Temperatur von meinem Temperatursensor im Schlafzimmer ablese und wenn Die über einen bestimmten Wert kommt das Alexa sagt "Die Temperatur im Schlafzimmer ist gerade ... (globalVariable) - schließe die fenster".

    Link to comment
    Share on other sites

    • 0

    Please login or register to see this code.

    Das oben schreibst du in ein Lua-Skript...bei mir ist das in einer Szene für die Kaffeemaschine

     

    du kannst natürlich in die Variable "local push_text =" übergeben was du möchtest

     

    wäre natürlich klasse, wenn du für andere eine Anleitung machen könntest und das viele nutzen können

    Edited by SvenG.
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • W dniu 30.06.2021 o 12:26, Pablo_Supreme napisał:

    from the tutorial on iqhaus.de (link above) the php-script - it's running

    Seit heute morgen geht bei mir der Script nicht - wenn ich die alexa.php Seite aufrufen will dann bekomme ich eine Ansicht als ob ich das Script auf GitHub sehen würde und leider nicht die Liste aller Alexas bei mir - hat jemand eine Idee was passiert ist? Oder haben das alle jetzt so?

    Ich dachte es liegt vielleicht an meinem WebServer aber das ist nicht das Problem da ich das auf 3 verschiedenen getestet habe schon heute und auf allen bekomme ich dasselbe.

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    @Pablo_Supreme I implemented the same on my HC3 some minutes ago and it works perfect.

    In the iQhaus tutorial they said that the cookies.txt needs to be downloaded again every few weeks and replaced on your PHP server.

    Already tried?

    Edited by Kiamer
    Link to comment
    Share on other sites

    • 0

    Or login your dekstop machine to the 

    Please login or register to see this link.

     website, if it is in the same local IP range.

     

     

    I made the TTS part into a global variable.


    So i only need to add 2 lines in the action part of any scene where i want alexa to speak,

     

    fibaro.setGlobalVariable('globalTest', 'Opening%20left%20shade')
    fibaro.callUI(224, 'onReleased', 'btnSpeak')

     

    Anyway it is a work in progres :) (in the QA there are 2 variable's - for now only the IP entry is used)

    Please login or register to see this attachment.

     

    Ah, and 2 lines of simple php ofcourse. Change the path of the script.

     

     

    Please login or register to see this code.

     

    Edited by ppeterr
    Link to comment
    Share on other sites

    • 0

    salut

     

    Please login or register to see this code.

     

     

    Please login or register to see this attachment.

     

    Link to comment
    Share on other sites

    • 0

    @971jmd

     

    Well, not sure what php code/file your using there. But did you specify the device ?

     

     

    Edited by ppeterr
    Link to comment
    Share on other sites

    • 0

    But did you specify the device ?   
    that is to say

     

    le fichier :

    Please login or register to see this link.

     


    thank you in advance for your help

     

    Edited by 971jmd
    Link to comment
    Share on other sites

    • 0
    23 minutes ago, 971jmd said:

    But did you specify the device ?   
    that is to say

     

    le fichier :

    Please login or register to see this link.

     


    thank you in advance for your help

     

     

    Well i dont know anything about what they are talking about there, and French is not my best.

     

     

    But, is there another script to go along with the PHP ? 

    Maybe you mistyped your credentials there. Since it seems it doesnt recover any of your devices.

    Link to comment
    Share on other sites

    • 0

    Well, you might want to take a look at a solution made by a user here on the forum.

     

    Pretty simple, and it gives the same result. (i am not using it, but tested it)

     

     

    • Like 1
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...