Google home message to serial print
Posted: Fri Jun 07, 2019 9:43 am
Hi everybody!
As you can see Iam new here and this offcourse induces some questions.
Iam currently trying to get ESPbasic to print serial commands to its TX pin if google home sends it a particular message. This is the code Iam using to do this:
It works fine when I send a message: http://<MY-IP>/msg?saywhat=Stop%20neato
or http://<MY-IP>/msg?saywhat=Start%20neato
But, everytime I send the command it prints a number which seems to be the line number of the first Wait before it prints Clean stop.
Does somebody know what Iam missing here?
Thanks!
As you can see Iam new here and this offcourse induces some questions.
Iam currently trying to get ESPbasic to print serial commands to its TX pin if google home sends it a particular message. This is the code Iam using to do this:
Code: Select all
msgbranch [mybranch]
wait
[mybranch]
command = msgget("saywhat")
if command = "Start neato" then
SERIALPRINTLN "Clean House"
end if
if command = "Stop neato" then
SERIALPRINTLN "Clean Stop"
end if
wait
It works fine when I send a message: http://<MY-IP>/msg?saywhat=Stop%20neato
or http://<MY-IP>/msg?saywhat=Start%20neato
But, everytime I send the command it prints a number which seems to be the line number of the first Wait before it prints Clean stop.
Does somebody know what Iam missing here?
Thanks!