B4R Library Google home notify

Hello,

here is my next attempt to write a lib for B4R ;)

The Lib based on the following Libraries (you have to install this bevor you can use this lib):

https://github.com/horihiro/esp8266-google-tts
https://github.com/horihiro/esp8266-google-home-notifier
https://github.com/mblythe86/Arduino/tree/master/libraries/ESP8266mDNS

attention: horihiro wrote that we can use Arduino Core for ESP8266 2.5.0 please don't do so this core is still in beta stadium an seems (at the moment) not work together with b4r

i have Testet with the ESP8266 board

regards

Andy


B4X:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public Serial1 As Serial
    Public ghome As ESP8266ghn
    Public wifi As ESP8266WiFi
    Public result As Byte
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
    wifi.Connect2("<yourssid>","<yourpassword>")
    
    result = ghome.notify("Büro","de",30000,"das ist ein test",False)
    If result<>"success" Then
        Log ("Error: ",result)
    End If
    
    Delay(2000)' wait for google home become ready
    
    result=ghome.playmp3("Büro",30000,"http://siam-online.de/bell.mp3",False)
    If result<>"success" Then
        Log ("Error: ",result)
    End If
    Log ("Done.")
End Sub
 

Attachments

  • rESP8266ghn.zip
    2.1 KB · Views: 382
Top