Page 4 of 4

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 7:46
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

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 9:08
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?

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 11:33
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

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 12:39
by zak45
yep, you're right.
but the plugin use default one set by the application.

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 12:50
by kniazio
Why the plugin does not work for me?

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 15:50
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

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 17:25
by kniazio
I do not have authentication set

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 17:37
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.

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 17:41
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

Re: Vocal command for Domoticz

Posted: Sunday 24 February 2019 19:35
by kniazio
In my opinion, this plugin has a problem with connection to domoticz

Re: Vocal command for Domoticz

Posted: Monday 25 February 2019 13:49
by kniazio
I have version 3.7243 Domoticz and Python 3.4
Will it work in this configuration?

Re: Vocal command for Domoticz

Posted: Monday 25 February 2019 18:27
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

Re: Vocal command for Domoticz

Posted: Monday 25 February 2019 21:16
by kniazio
And everything is clear

Re: Vocal command for Domoticz

Posted: Sunday 03 March 2019 12:47
by zak45

Re: Vocal command for Domoticz

Posted: Friday 03 May 2019 1:35
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!

Re: Vocal command for Domoticz

Posted: Friday 03 May 2019 16:14
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