Alarme com telegrambot audio

Sub flow para utilizar nas lógicas de alarme para receber mensagens de voz informando, é necessário passar um paylodad em texto contendo a mensagem.

As bibliotecas node-red-contrib-telegrambot e node-red-node-watson são necessária para a utilização do bloco.

É preciso ter um botfather do Telegram configurado e também os serviços de text to speech ativos.

[{"id":"77e7577c.748948","type":"subflow","name":"FunAlarmSpeech","info":"","category":"","in":[{"x":240,"y":140,"wires":[{"id":"10fbd0f7.d82e2f"}]}],"out":[],"env":[],"color":"#DDAA99"},{"id":"17bb1028.00018","type":"watson-text-to-speech","z":"77e7577c.748948","name":"TTS","lang":"pt-BR","langhidden":"pt-BR","langcustom":"NoCustomisationSetting","langcustomhidden":"","voice":"pt-BR_IsabelaVoice","voicehidden":"","format":"audio/ogg; codecs=opus","password":"S@fetycontrol12345","apikey":"k_UdWSYMzj4cHVlhyWXe6DheQFU3VQrSdZ9B7b1VUqEG","payload-response":false,"service-endpoint":"https://api.us-south.text-to-speech.watson.cloud.ibm.com/instances/de9de7b8-b603-48f8-bb0d-af170a639bd2","x":570,"y":140,"wires":[["df2af7af.823b48"]]},{"id":"df2af7af.823b48","type":"function","z":"77e7577c.748948","name":"STV","func":"\nmsg.payload = {\n    chatId: 1244968529, \n    type:'voice', \n    content: msg.speech}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":690,"y":140,"wires":[["1088cdb1.2213b2"]]},{"id":"1088cdb1.2213b2","type":"telegram sender","z":"77e7577c.748948","name":"","bot":"8446c654.68b568","x":850,"y":140,"wires":[[]]},{"id":"10fbd0f7.d82e2f","type":"trigger","z":"77e7577c.748948","name":"","op1":"","op2":"0","op1type":"pay","op2type":"str","duration":"0","extend":false,"units":"ms","reset":"reset","bytopic":"all","topic":"topic","outputs":1,"x":410,"y":140,"wires":[["17bb1028.00018"]]},{"id":"8446c654.68b568","type":"telegram bot","z":"","botname":"iotbot","usernames":"Tiago.lara","chatids":"1244968529","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false}]

Flow Info

Created 5 years, 5 months ago
Rating: not yet rated

Actions

Rate:

Node Types

Core
  • function (x1)
  • trigger (x1)
Other

Tags

  • telegrambot
  • ibm
  • watson
  • iot
  • texttospeech
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option