Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting package in 2 parts #8

Open
jibaku opened this issue Mar 22, 2018 · 16 comments
Open

Splitting package in 2 parts #8

jibaku opened this issue Mar 22, 2018 · 16 comments

Comments

@jibaku
Copy link
Contributor

jibaku commented Mar 22, 2018

Hello,

I will in a few months move to a place with an linky counter. And I planning on using the API to fetch my data. I was thinking if it would help for maintenant to split domoticz_linky
into 2 packages with for example the linky part available on PyPI ?

And do you know about ENEDIS test accounts, to be able to use the API without having it.?

@empierre
Copy link
Owner

Salut,

I don't understand your point, there are two "programs" here, one that capture the data, and the other that generate the sql, sadly my python skills are a bit low... so the other is nodejs.

If you know how to make the sql from the python I'll be more than happy !

BTW on another repo there is the gazpar, but sql still to be generated

@jibaku
Copy link
Contributor Author

jibaku commented Mar 27, 2018

The idea is to maybe create a linky package that can be used in domoticz_linky or in any other python program that would like to fetch data.

It should be quite easy to create the SQL from python or even to connect to SQLITE/MySQL/PostgreSQL to run the generated SQL.

@jibaku
Copy link
Contributor Author

jibaku commented Mar 27, 2018

Il would also allow to use the same code in empierre/jeedom_linky

@empierre
Copy link
Owner

"create the SQL from python" This is where I'm still not very good with python, so I used nodeJS (and I could have been much better in Perl ;-)

The nodejs part is full of unused procs, I'm currently rewriting and simplifying it for Gaspar. The Gaspar data fetch will be more robust, so maybe I'll update back linky afterward to have a single json format.

A few days ago @guillaumezin proposed the correction for daily values for Domoticz, transformation is not that easy... but right now it is still compatible with the Jeedom project.

@LudovicRousseau
Copy link
Contributor

I use domoticz_linky to fetch data and store them in an InfluxDB database instead of Domoticz. See https://github.com/LudovicRousseau/domoticz_linky/tree/influxdb

So I made modifications in domoticz_linky (#14) to make the code more flexible.

Putting the fetching data code in its own package would be great.

@empierre
Copy link
Owner

empierre commented Oct 2, 2018

@LudovicRousseau if you hgave the knowledge it would be welcome as I am not a python dev, only hacking and learning it

@empierre empierre closed this as completed Oct 2, 2018
@empierre empierre reopened this Oct 2, 2018
@LudovicRousseau
Copy link
Contributor

I just discovered the pyLinky project at https://github.com/Pirionfr/pyLinky

It looks like a lot of people are working on the same problem but with different solutions :-)
Maybe we should aggregate all the projects to share some common code?

@LudovicRousseau
Copy link
Contributor

I updated pyLinky to suite my needs https://github.com/LudovicRousseau/pyLinky

I now have a simpler Python script https://github.com/LudovicRousseau/domoticz_linky/blob/influxdb/linky_influxdb.py

@empierre
Copy link
Owner

empierre commented Dec 8, 2018

@LudovicRousseau can be a good idea, with the risk they put a captcha and we're locked out...

@LudovicRousseau
Copy link
Contributor

@empierre Who is "they"?

@empierre
Copy link
Owner

empierre commented Dec 9, 2018

this is Enedis...

@LudovicRousseau
Copy link
Contributor

I don't get the relation between a pyLinky module and the fact that Enedis adds a captcha.

The idea to have a module is that any Python project can use the module without reinventing the wheel.

@empierre
Copy link
Owner

sure, but the effort we do will be someday stucked by a captcha

@LudovicRousseau
Copy link
Contributor

Maybe.
No problem if you do not want to use the pyLinky module. You can close this issue.

@empierre
Copy link
Owner

I'm interrested, hoping we'll last a bit more ;-)

@guillaumezin
Copy link
Contributor

I could be interested too for https://github.com/guillaumezin/DomoticzLinky but not sure how it will integrate, my plugin is tightly coupled to Domoticz plugin API, because as soon as you use external Python libraries, it often fails (the way it is compiled, Domoticz seems to break OpenSSL implementation, as soon as you use an Python API that relies on SSL inside a plugin, it fails miserably, that's the case for requests module for instance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants