I've managed to control my Domoticz with voice commands by using Autovoice and tasker and would like to share this for more input.
Cause i still need to find out how i can query Domoticz with json to find the idx of the named device. I still need to convert the name to a idx number within tasker to get this to work.
I assume in this that you already installed Autovoice and Tasker on the android device.
In Autotask go to Profiles and press the plus. Choose State -> Plugin -> Autovoice -> Recognized
In the new screen choose the edit button and tick Event behaviour and Use Regex like this:
In command filter type:
This is the pattern Autovoice is gonna recognize:
Domotica is the trigger for the Domotica command
(?<device>.+) is the device we want to operate
(?<onoff>.+) is the command we want to execute (On or Off)
Click OK and on the next screen the V.
Go back to the main screen and choose New task and type the name of the task.
An empty taskscreen wil open.
Click the Plus to add the task. Use Net ->HTTP get to create the http task to do stuff on Domoticz
Type the servername and port of the Domoticz server (I my case raspberrypi:8080) on server:port
In the path type:
json.htm?type=command¶m=switchlight&idx=%device&switchcmd=%onoff
Like this:
Because i still need to figure out how to query Domoticz to convert names to idx i added one extra task above this specific task to convert a variable.
Click the plus and choose: Variables ->Variable search and replace
At variable type %device
At Search set the name of the device you're calling in the voice command. Like Hall light
At Replace matches type the IDX of the Hall light
If you now start Autovoice (by clicking twice on the home button is most Android devices) and say: Domotica Hall Light On it should work.
Does anybody know how to query Domoticz within Tasker to get rit of the variable too? Then i could make a wiki of it.
Thanks!
Peter
Autovoice, tasker and Domoticz
Moderator: leecollings
-
- Posts: 32
- Joined: Sunday 08 March 2015 13:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.4739
- Contact:
Autovoice, tasker and Domoticz
RaspberryPI
ZWave
RFXtrx433E
ZWave
RFXtrx433E
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Autovoice, tasker and Domoticz
Hi Peter,
Im not to familiar with Tasker, but your solutions sounds good.
However if understand correctly you want Tasker to replace a variable with a idx number, which it needs to get from domoticz by name like Hall or Living?
I have seen a solution (wiki/script examples/lua or python) that does request (device)names and gives the accompaning idx. Within Domoticz context.
But i doubt you can do something like that from Tasker, unless its capable of running python or lua, of which i'm sure it can't.
Grtz,
Stephan
Im not to familiar with Tasker, but your solutions sounds good.
However if understand correctly you want Tasker to replace a variable with a idx number, which it needs to get from domoticz by name like Hall or Living?
I have seen a solution (wiki/script examples/lua or python) that does request (device)names and gives the accompaning idx. Within Domoticz context.
But i doubt you can do something like that from Tasker, unless its capable of running python or lua, of which i'm sure it can't.
Grtz,
Stephan
-
- Posts: 32
- Joined: Sunday 08 March 2015 13:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.4739
- Contact:
Re: Autovoice, tasker and Domoticz
Hi Stephan,
Within tasker you can run JSON scripts with variables. So that's the idea to send a name to a json script which gives back a idx number and to use that again in the task.
Peter
Within tasker you can run JSON scripts with variables. So that's the idea to send a name to a json script which gives back a idx number and to use that again in the task.
Peter
RaspberryPI
ZWave
RFXtrx433E
ZWave
RFXtrx433E
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Autovoice, tasker and Domoticz
Like i said, don't know al about tasker. And if there are json-scripts that can be run within tasker, it cant be that hard to implement.
Maybe i'm mistaken, but i though that json can be seen as a kind of markup language. Haven't seen scripts like programming languages like perl/c#/python which where json scripts.
So if json is also a scripting language, i have to google around a bit and see how that compares to my knowledge of perl/bash/python.
Grtz,
Stephan
Maybe i'm mistaken, but i though that json can be seen as a kind of markup language. Haven't seen scripts like programming languages like perl/c#/python which where json scripts.
So if json is also a scripting language, i have to google around a bit and see how that compares to my knowledge of perl/bash/python.
Grtz,
Stephan
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Autovoice, tasker and Domoticz
Peter,
Have a look at this site (doing simular thing): https://m.reddit.com/r/tasker/comments/ ... api_parse/
Also find some other info about whats possible with tasker (didn't want to buy within 7 days
. However mainly javascript can be run, and json can be parsed.
More info about JavaScript(let) in Tasker:
http://tasker.dinglisch.net/userguide/e ... cript.html
Hope you can figure it out...
Grtz,
Stephan
Have a look at this site (doing simular thing): https://m.reddit.com/r/tasker/comments/ ... api_parse/
Also find some other info about whats possible with tasker (didn't want to buy within 7 days

More info about JavaScript(let) in Tasker:
http://tasker.dinglisch.net/userguide/e ... cript.html
Hope you can figure it out...
Grtz,
Stephan
-
- Posts: 57
- Joined: Thursday 14 August 2014 17:41
- Target OS: Linux
- Domoticz version: beta
- Location: France
- Contact:
Re: Autovoice, tasker and Domoticz
Hi,
I made this with tasker and autovoice, you can see here for source : http://easydomoticz.com/forum/viewtopic ... =961#p8570
Maybe it can help you.... but its in french
I made this with tasker and autovoice, you can see here for source : http://easydomoticz.com/forum/viewtopic ... =961#p8570
Maybe it can help you.... but its in french
- galadril
- Posts: 828
- Joined: Monday 07 September 2015 10:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Contact:
Re: Autovoice, tasker and Domoticz
old topic, but im looking into Tasker integrations with a plugin app
https://www.domoticz.com/forum/viewtopi ... 37&t=32696
https://www.domoticz.com/forum/viewtopi ... 37&t=32696
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
https://play.google.com/store/apps/deta ... ongmonitor
Who is online
Users browsing this forum: No registered users and 1 guest