Page 1 of 1

Hydroquebec plugins (Python script)

Posted: Tuesday 09 May 2017 15:46
by godinperson
Hi,

Here is Quebec, all our electricity comes from Hydro-Québec. Someone made a plugins to access our consumption and other stats. Would I be able to run that in Domoticz?

https://pypi.python.org/pypi/pyhydroquebec/1.1.0

Tried the wiki but it seems the plugin would need to be a single file, I got a whole directory.

Thanks

Re: Hydroquebec plugins (Python script)

Posted: Wednesday 10 May 2017 7:40
by Dnpwwo
@godinperson,

Domotiz does not require everything to be in one file it, just requires that a plugin.py files exists and that by importing that file the required API callbacks are defined. That file can import as many other files as you want.

Re: Hydroquebec plugins (Python script)

Posted: Wednesday 10 May 2017 13:54
by godinperson
Would you be willing to help me test that?

I'm not that good with coding!

Thanks

Re: Hydroquebec plugins (Python script)

Posted: Tuesday 16 May 2017 23:01
by godinperson
bump!

Anyone? Pretty sure it will take couple of minutes to someone who knows how it works.

Thanks

Re: Hydroquebec plugins (Python script)

Posted: Friday 26 May 2017 17:27
by godinperson
No programmer that wants to help, probably a 10 min. job.

Anyone from Quebec that would need that plugin?

Thanks

Re: Hydroquebec plugins (Python script)

Posted: Thursday 15 June 2017 18:08
by Qcvictor
Me too will be interested to get it working!

Re: Hydroquebec plugins (Python script)

Posted: Thursday 06 July 2017 17:16
by godinperson
I might have found someone. Checking with him!

Re: Hydroquebec plugins (Python script)

Posted: Friday 07 July 2017 3:21
by Qcvictor
godinperson wrote:I might have found someone. Checking with him!
Sounds good, let us known !

Re: Hydroquebec plugins (Python script)

Posted: Thursday 12 October 2017 21:24
by zorbac
Hello people,

I have created something as an external script that communicate with Domoticz server. Is not a plugin as intended as I did not know how to do it.

It can be programmed with a CRON job or from Domoticz on your need. I use it as my internet connection is not 24h up, I activate the scipt only on the first time the internet connection is available.
It save to the current day the value of previous day. Is the only limitation I have with it.

https://github.com/jingl3s/domoticz_hydroquebec

Re: Hydroquebec plugins (Python script)

Posted: Saturday 25 November 2017 0:06
by Qcvictor
Hey Zorbac
I'm trying to get it working, where is supposed to be the folder "pyhydroquebec"
When I ran it I get couple error !

Code: Select all

pi@DomoticzTest:~/domoticz_hydroquebec$ ./hydroquebec.py 
2017-11-24 18:05:45,551-  ERROR-main-Erreur d'execution
Traceback (most recent call last):
  File "./hydroquebec.py", line 198, in main
    consommation_veille = _get_hydroquebec_valeur_veille(json_configuration['HYDROQUEBEC'])
  File "./hydroquebec.py", line 39, in _get_hydroquebec_valeur_veille
    output = subprocess.check_output(cmd_hydro)
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 693, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'pyhydroquebec'
pi@DomoticzTest:~/domoticz_hydroquebec$