Hauptmenü

Einige Fragen zu FHEM

Begonnen von Arsène, 12 Februar 2015, 10:39:15

Vorheriges Thema - Nächstes Thema

Arsène

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

Mitch

FHEM im Proxmox Container

Arsène

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?

marvin78

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.


Arsène

#4
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

marvin78

#5
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.

Arsène


Wuppi68

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
FHEM unter Proxmox als VM

Arsène

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)

Arsène

#9
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

Wuppi68

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
FHEM unter Proxmox als VM

Arsène

#11
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?