Hydroquebec plugins (Python script)

Python and python framework

Moderator: leecollings

Post Reply
godinperson
Posts: 26
Joined: Saturday 06 May 2017 0:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Hydroquebec plugins (Python script)

Post 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
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Hydroquebec plugins (Python script)

Post 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.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
godinperson
Posts: 26
Joined: Saturday 06 May 2017 0:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Hydroquebec plugins (Python script)

Post by godinperson »

Would you be willing to help me test that?

I'm not that good with coding!

Thanks
godinperson
Posts: 26
Joined: Saturday 06 May 2017 0:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Hydroquebec plugins (Python script)

Post by godinperson »

bump!

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

Thanks
godinperson
Posts: 26
Joined: Saturday 06 May 2017 0:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Hydroquebec plugins (Python script)

Post by godinperson »

No programmer that wants to help, probably a 10 min. job.

Anyone from Quebec that would need that plugin?

Thanks
Qcvictor
Posts: 22
Joined: Wednesday 08 April 2015 3:13
Target OS: Linux
Domoticz version: Beta
Location: Canada
Contact:

Re: Hydroquebec plugins (Python script)

Post by Qcvictor »

Me too will be interested to get it working!
godinperson
Posts: 26
Joined: Saturday 06 May 2017 0:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Hydroquebec plugins (Python script)

Post by godinperson »

I might have found someone. Checking with him!
Qcvictor
Posts: 22
Joined: Wednesday 08 April 2015 3:13
Target OS: Linux
Domoticz version: Beta
Location: Canada
Contact:

Re: Hydroquebec plugins (Python script)

Post by Qcvictor »

godinperson wrote:I might have found someone. Checking with him!
Sounds good, let us known !
zorbac
Posts: 1
Joined: Thursday 12 October 2017 21:20
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Somewhere in north america
Contact:

Re: Hydroquebec plugins (Python script)

Post 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
Qcvictor
Posts: 22
Joined: Wednesday 08 April 2015 3:13
Target OS: Linux
Domoticz version: Beta
Location: Canada
Contact:

Re: Hydroquebec plugins (Python script)

Post 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$ 
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest