Python Plugin : EZJarviz Voice command plugin

Python and python framework

Moderator: leecollings

Post Reply
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

Maybe time to share this one.

This is a Domoticz plugin for Jarvis@Home android application.

Features provided by the plugin are:

Voice command : activate your devices by your voice.
TTS : Text To Speech, let Domoticz speak to you.
Notification system : TTS and/or android notification.
Geofence : activate your devices when enter/leave Home.
Geolocalisation : send to Domoticz your localisation.

still some works to finalize it, but already usable.

Wiki : https://www.domoticz.com/wiki/Plugins/EZJarviz.html

enjoy.
Martial
Posts: 31
Joined: Saturday 11 March 2017 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by Martial »

Hello zak45,

I have to try this quickly!
Thank
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

Hi Martial,
feel free to provide feedback.
rgds
kniazio
Posts: 202
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by kniazio »

Code: Select all

 2019-03-09 19:38:48.870 Error: (DomoVoice) 'onStart' failed 'KeyError'.
2019-03-09 19:38:48.870 Error: (DomoVoice) ----> Line 194 in '/home/pi/domoticz/plugins/EZJarviz/plugin.py', function onStart
2019-03-09 19:38:48.870 Error: (DomoVoice) ----> Line 1395 in '/home/pi/domoticz/plugins/EZJarviz/plugin.py', function grpDomoticz 
the plugin creates a configuration on your phone
at the end of the configuration, reports an error
You can hear a message on the phone about a configuration error

I do not have any DomoVoice switches in Switches
Attachments
switches.jpg
switches.jpg (153.6 KiB) Viewed 2009 times
log.jpg
log.jpg (232.98 KiB) Viewed 2009 times
jarvis.jpg
jarvis.jpg (129.21 KiB) Viewed 2009 times
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

@kniazio

can you put debug mode on, reload the plugin and post the log ?
thanks

edit:
have been able to reproduce the case:
2019-03-09 22:11:39.345 Status: (DomoticZVoiceZ) Initialized version 1.0.0, author 'zak45'
2019-03-09 22:11:39.347 Status: (DomoticZVoiceZ) Entering work loop.
2019-03-09 22:11:39.391 Error: (DomoticZVoiceZ) 'onStart' failed 'KeyError'.
2019-03-09 22:11:39.391 Error: (DomoticZVoiceZ) ----> Line 194 in '/home/usr/domoticz/plugins/EZJarviz/plugin.py', function onStart
2019-03-09 22:11:39.391 Error: (DomoticZVoiceZ) ----> Line 1395 in '/home/usr/domoticz/plugins/EZJarviz/plugin.py', function grpDomoticz
2019-03-09 22:11:49.386 (DomoticZVoiceZ - 192.168.1.21:8181-M) Updating device from 1:'On' to have values 0:'Off'.
2019-03-09 22:11:49.397 (DomoticZVoiceZ) __we update 0:'Off' (DomoticZVoiceZ - 192.168.1.21:8181-M)__

this happen when yo do not have any scene/group device...
let's try to manually create these two scenes :
InHome & OutHome

re-edit :)
new version uploaded to manage the case & additional feature included
just download and replace plugin.py & Jarviz.py
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

new Web admin page in progress...

can be found here :
..\Domoticz\www\templates\EZJarviz.html

you need to enable custom page in Domoticz settings
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

and some additional API command.. see wiki !
kniazio
Posts: 202
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by kniazio »

Thanks a lot
All devices in switches appeared
What this Custom page is for
Now you only have to learn how to handle it :)
Attachments
web.jpg
web.jpg (99.98 KiB) Viewed 1981 times
dev.jpg
dev.jpg (210.86 KiB) Viewed 1981 times
kniazio
Posts: 202
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by kniazio »

It would be nice to have step by step instructions on how to add Switch to Jarvis
Attachments
addswitch.jpg
addswitch.jpg (206.94 KiB) Viewed 1978 times
kniazio
Posts: 202
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by kniazio »

How to load Polish into Jarvis?
I uploaded the en_pl.lng file and changed its name to en_en.lng. Jarvis still speaks to me in English. Only when uploading the configuration to the phone he speaks Polish
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

kniazio wrote: Sunday 10 March 2019 6:50 Thanks a lot
All devices in switches appeared
What this Custom page is for
Now you only have to learn how to handle it :)
yep, will use it for different admin task e.g. jarvis password change --> need to be put in right format into uservariables etc...
but you can also see the outputs (txt & err) of the second running process, no need to browse plugin folder with scp or other sftp.
if you click on one *.txt file, this should open another tab with the content ;-)
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

kniazio wrote: Sunday 10 March 2019 7:33 It would be nice to have step by step instructions on how to add Switch to Jarvis
all should be on the wiki.
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

kniazio wrote: Sunday 10 March 2019 8:27 How to load Polish into Jarvis?
I uploaded the en_pl.lng file and changed its name to en_en.lng. Jarvis still speaks to me in English. Only when uploading the configuration to the phone he speaks Polish
what I see on your screenshot : Domoticz = english --> EZJarviz = english
so ...
and let me know if the wiki looks not clear, you really need to read it.
kniazio
Posts: 202
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by kniazio »

I can not add my own switch to Jarvis.
I want to issue commands in Polish.
I'm Polish
https://www.domoticz.com/forum/download ... p?id=19368
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

kniazio wrote: Sunday 10 March 2019 15:59 I can not add my own switch to Jarvis.
I want to issue commands in Polish.
I'm Polish
https://www.domoticz.com/forum/download ... p?id=19368
Hummm .. maybe some misunderstanding:

"I can not add my own switch to Jarvis." : not enough information provided to be able to help you but.. if you speak about this device specifically
https://www.domoticz.com/forum/download ... p?id=19368
, this one is a push On button no ?? this type is not yet managed....workaround should be easy to implement.

"I want to issue commands in Polish.I'm Polish"
--> this should work for Polish language, so what's your problem here ???
kniazio
Posts: 202
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by kniazio »

I have a switch called "Kuchnia"
I turn it on in my kitchen.
What do you need to do to be able to control this switch with Jarvis?
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

kniazio wrote: Sunday 10 March 2019 20:15 I have a switch called "Kuchnia"
I turn it on in my kitchen.
What do you need to do to be able to control this switch with Jarvis?
you can try by changing its type : put it as on/off and set a off after 2 sec. should do the trick.
let's try.
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

Now with a Web Admin Page for plugin management:
https://www.domoticz.com/forum/viewtopi ... 65&t=27513
zak45
Posts: 954
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : EZJarviz Voice command plugin

Post by zak45 »

Now with On-Line Editor for language file :
Capture.JPG
Capture.JPG (196.35 KiB) Viewed 1582 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest