code.py
def sendMsgTo3B1(msg, lang, requests):
    """
    ask google home to announce
    node-red is working on 3Bp1
    """
    host = secrets['raspi_announcement']
    # lang = 'en-US'  # only ja for now.
    myData = {'message': msg, 'language': lang}
    print('[debug sendMsgTo3B1()] posting:', msg)
    res = requests.post(host, data=myData)
    print('[debug sendMsgTo3B1()] response.status_code:', res.status_code)

    return 'sending message done!'

    ask google home to announce
    node-red is working on 3Bp1
    
ask google home to announce
node-red is working on 3Bp1
ask google home to announce node - red is working on 3Bp1
def sendMsgTo3B1(msg, lang, requests):
    host = secrets['raspi_announcement']
    myData = {'message': msg, 'language': lang}
    print('[debug sendMsgTo3B1()] posting:', msg)
    res = requests.post(host, data=myData)
    print('[debug sendMsgTo3B1()] response.status_code:', res.status_code)
    return 'sending message done!'
def sendMsgTo3B1 ( msg , lang , requests ) : host = secrets [ 'raspi_announcement' ] myData = { 'message' : msg , 'language' : lang } print ( '[debug sendMsgTo3B1()] posting:' , msg ) res = requests . post ( host , data = myData ) print ( '[debug sendMsgTo3B1()] response.status_code:' , res . status_code ) return 'sending message done!'
ask google home to announce
node-red is working on 3Bp1
ask google home to announce node - red is working on 3Bp1
"""
    ask google home to announce
    node-red is working on 3Bp1
    """ # lang = 'en-US'  # only ja for now.
msg
lang
requests