Vocal command for Domoticz

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

Made according to the Wiki.
Here are the mistakes

Code: Select all

 2019-02-24 07:42:28.764 (DomVoice) Initialized version 1.0.0, author 'zak45'
2019-02-24 07:42:28.789 (DomVoice) lang file : /home/domoticz/plugins/EZJarviz/en_en.lng
2019-02-24 07:42:28.799 (DomVoice) Język załadowany dla: en
2019-02-24 07:42:28.799 Error: (DomVoice) 'onStart' failed 'AttributeError':''module' object has no attribute 'Connection''.
2019-02-24 07:42:28.799 Error: (DomVoice) ----> Line 205 in /home/domoticz/plugins/EZJarviz/plugin.py, function onStart 
The configuration page in the Wiki differs from the configuration page of the plugin.
I wrote about it earlier
Attachments
my config.jpg
my config.jpg (127.13 KiB) Viewed 1828 times
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

The jarvis @ home panel has a login and password.
Do you not need to enter a login and password somewhere in the plugin configuration?
Attachments
jarvis.jpg
jarvis.jpg (153.59 KiB) Viewed 1826 times
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

log during domoticz start

Code: Select all

2019-02-24 11:24:39.347  Error: (DomVoice) Traceback (most recent call last):
  File "/usr/lib/python3.4/urllib/request.py", line 1174, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.4/http/client.py", line 1090, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.4/http/client.py", line 1086, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.4/http/client.py", line 924, in _send_output
    self.send(msg)
  File "/usr/lib/python3.4/http/client.py", line 859, in send
    self.connect()
  File "/usr/lib/python3.4/http/client.py", line 836, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python3.4/socket.py", line 509, in create_connection
    raise err
  File "/usr/lib/python3.4/socket.py", line 500, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/domoticz/plugins/EZJarviz/plugin.py", line 832, in exeDomoticz
    html=urllib.request.urlopen('http://' +str(Parameters['Address'])+':'+str(Pa                                                                                        rameters['Port']) + '/json.htm?'+ params, timeout=2)
  File "/usr/lib/python3.4/urllib/request.py", line 153, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 455, in open
    response = self._open(req, data)
  File "/usr/lib/python3.4/urllib/request.py", line 473, in _open
    '_open', req)
  File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 1202, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.4/urllib/request.py", line 1176, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

2019-02-24 11:24:39.348  Error: (DomVoice) __Error sending command to Domoticz :                                                                                         type=command&param=getuservariables__
2019-02-24 11:24:39.348  Error: (DomVoice) __Erreur to execute get user variable                                                                                        s__
2019-02-24 11:24:39.348  (DomVoice) lang file : /home/domoticz/plugins/EZJarviz/                                                                                        en_en.lng
2019-02-24 11:24:39.368  (DomVoice) Język załadowany dla: en
2019-02-24 11:24:39.369  Error: (DomVoice) 'onStart' failed 'AttributeError':''m                                                                                        odule' object has no attribute 'Connection''.
2019-02-24 11:24:39.369  Error: (DomVoice) ----> Line 205 in /home/domoticz/plug                                                                                        ins/EZJarviz/plugin.py, function onStart
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Vocal command for Domoticz

Post by zak45 »

yep, you're right.
but the plugin use default one set by the application.
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

Why the plugin does not work for me?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Vocal command for Domoticz

Post by zak45 »

kniazio wrote: Sunday 24 February 2019 12:50 Why the plugin does not work for me?
Domoticz need to be set to no need for authentication when run in local network
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

I do not have authentication set
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Vocal command for Domoticz

Post by zak45 »

this is your error:

urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

Connection is not possible to Domoticz by using Ip address/port set in the configuration.
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

I do not have any authorization in Domoticz.
I do not know why the plugin does not connect with Domoticz
Other applications connect to the domotic without a problem both on the local network and WAN
the plugin is located in domoticz :)
I tried to enter domoticz address as 127.0.0.1. It also does not work
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

In my opinion, this plugin has a problem with connection to domoticz
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

I have version 3.7243 Domoticz and Python 3.4
Will it work in this configuration?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Vocal command for Domoticz

Post by zak45 »

kniazio wrote: Monday 25 February 2019 13:49 I have version 3.7243 Domoticz and Python 3.4
Will it work in this configuration?
Nope.. need Domoticz version > 4.1x
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Vocal command for Domoticz

Post by kniazio »

And everything is clear
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Vocal command for Domoticz

Post by zak45 »

kubrik
Posts: 47
Joined: Wednesday 30 November 2016 15:07
Target OS: Linux
Domoticz version: 2020.2
Location: Italy
Contact:

Re: Vocal command for Domoticz

Post by kubrik »

zak45 wrote: Friday 04 January 2019 16:48
welby wrote: Friday 04 January 2019 3:57 How do i make it just read the data from the sensor and not everything that it receives?
this should do the trick for Domoticz:
[url]http://192.168.1.xx:xxxx/json.htm?type=devices&rid=<YOUR IDX>[/url]
<YOUR IDX> = Domoticz device IDX

and this for jarvis

SetVariable: Data to value: system.jsonParse(system.httpGetResult().at("/result/0/Data").asText()
Hi @zak45,
thank you for your work, it's really interesting...and i'm playing with it.
I've a question...
i get the "Data" value with system.jsonParse(system.httpGetResult()).at("/result/0/Data").asText() as "19.9 C, 61 %".
Are there other functions i can use to get, for example, only "19.9" and/or "61" ?
Where is a list of functions that can be used?

Thanks!
Ubuntu 20.04 on ACEPC AK1 (previously RPi3b+)
Z-Stick Gen5, RFXtrx433E, Philips HUE Bridge, Yeelight, ESP8266 NodeMCU, Broadlink RM
dZvents, bash, php, Node-RED
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Vocal command for Domoticz

Post by zak45 »

kubrik wrote: Friday 03 May 2019 1:35 Hi @zak45,
thank you for your work, it's really interesting...and i'm playing with it.
I've a question...
i get the "Data" value with system.jsonParse(system.httpGetResult()).at("/result/0/Data").asText() as "19.9 C, 61 %".
Are there other functions i can use to get, for example, only "19.9" and/or "61" ?
Where is a list of functions that can be used?

Thanks!
Hi,
I got the informations from there :
https://docs.oracle.com/javase/6/docs/a ... od_summary
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest