FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: Arsène am 12 Februar 2015, 10:39:15

Titel: Einige Fragen zu FHEM
Beitrag von: Arsène am 12 Februar 2015, 10:39:15
Hallo,

First I don't know if I have to post on the English Corner or if I can post in the good category. If it's realy important thank you to inform me and I'll do the necessary :)

So I'm beginning with FHEM and I have a few questions about it :
- If I want to recuperate only the graph to put them on an other webpage without all the interface of FHEM (for people can see the graph but can't access to all the data). Is that possible? If yes how can I do that?

This only what I want to know for the time being ^^

Grüße

Arsène
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Mitch am 12 Februar 2015, 10:44:12
can't see any question?
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Arsène am 12 Februar 2015, 13:38:22
Sorry if I have bad formulated my question :
Can I recuperate the graphs from FHEM and show them in a webpage who's not from FHEM ? If so how can I do this?
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: marvin78 am 12 Februar 2015, 14:07:19
Yes that is possible. You can get the URL for an iframe or other methods to embed elements by using Firebug or another developer tool in your browser. It looks like this:

FHEMSERVER:PORT/fhem/SVG_showLog?dev=DEVICE&logdev=logdb&gplotfile=GPLOTFILE&logfile=HISTORY&pos=

for DBLog.

Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Arsène am 12 Februar 2015, 14:27:56
Ok, thanks a lot! I'll try it when my ADSL line may wish work again (bit complicated for make some tests..)

But I've heard about DBLog and Filelog, what are the differences between them and what can I do with them? (sorry if my question is realy idiot I'm a truly newbie on FHEM)

I juste have to put the URL of the iframe on my page to show it. Sounds good ^^

Here's my second question :

- Is it complicated to recuperate all the datas from FHEM to put them in a MySQL DB? Cause I think it'll be more easy if I want to use them to design my graphs and custom them
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: marvin78 am 12 Februar 2015, 14:30:10
Have a look at the dbLog-Module in the commandref. All Modules are explained there, even FileLog.

FileLog stores all Device-Events in (a) File(s) and with dbLog you can use a MySQL or SQLite DB for logging.
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Arsène am 12 Februar 2015, 14:31:09
Ok I'll do it
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Wuppi68 am 12 Februar 2015, 14:31:49
no problem ...

you can use the module dblog to out the logs into a database

in the wiki you can find the howto and in the commandref there's a good decsription in english
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Arsène am 12 Februar 2015, 14:35:38
Thank you I'll try when my ADSL line will work again..

For the moment I'm gonna read the doc on the howto

(and sorry for the inconvenience)
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Arsène am 12 Februar 2015, 16:23:41
I haven't my ADSL line anymore but I have read a bit of the howto, told me if I'm wrong :

- I connect me on my FHEM
- I add the module DbLog with this command on FHEM's field :
                         
                                               define myDbLog DbLog /etc/fhem/db.conf .*:.*

And I don't know what to do with <regexp>..? I've put .*:.* like on the exemple but don't realy understand the meaning of this characters

When I did it I have to install the modules DBI and DBD so I tape :

                                          cpan -i DBI
                                          cpan -i DBD

Am I right?

Thank you in advance
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Wuppi68 am 12 Februar 2015, 19:38:57
Zitat von: Arsène am 12 Februar 2015, 16:23:41
I haven't my ADSL line anymore but I have read a bit of the howto, told me if I'm wrong :

- I connect me on my FHEM
- I add the module DbLog with this command on FHEM's field :
                         
                                               define myDbLog DbLog /etc/fhem/db.conf .*:.*

And I don't know what to do with <regexp>..? I've put .*:.* like on the exemple but don't realy understand the meaning of this characters

When I did it I have to install the modules DBI and DBD so I tape :

                                          cpan -i DBI
                                          cpan -i DBD

Am I right?

Thank you in advance
.* is in perl the same as the well known * - nothing more

you missed the following part:

you have to adapt your db.conf to your local configuration
create the database on the server
Titel: Antw:Einige Fragen zu FHEM
Beitrag von: Arsène am 13 Februar 2015, 08:25:24
Okay,

I've to write it :
#
# database configuration file
#
#
## for MySQL
################################################################
#%dbconfig= (
#   connection => "mysql:database=fhem;host=db;port=3306",
#   user => "fhemuser",
#   password => "fhempassword",
#);
################################################################
#

On my db.conf ? (the specified port is the one with whom I connect on FHEM or 3306 must I leave?)

And so where can I do this please?