Hauptmenü

Icons and images logic

Begonnen von Guest, 08 November 2012, 15:34:21

Vorheriges Thema - Nächstes Thema

Guest

Originally posted by: <email address deleted>

Hi everyone,

I struggle a little bit on how to use icons with FHEMWEB and FLOORPLAN.

An easy example is the toggle feature with a switch.
When I define an EnOcean switch, and add the eventMap A0:off AI:on, it
generates automatically the webcmd on and off, plus an icon that display
the state and the link to toggle.
It's a useful feature, but I don't really understand what settings allow
that.

I would like to get that in order to apply it on other types of devices.
To clarify my questions :
How to set an icon that correspond to a state?
How to add functions like toggle?
For example, I am currently trying to have the icon icoTemp, close to the
temperature in floorplan mode (not in normal mode where the attr icon does
the deal).
Also, I wish to have the plot associated displayed when I click on it.
I already tried define plot_temp weblink htmlCode { 'href="http://192.168.1.1:8083/fhem?detail=plot">src="/usr/share/fhem/FHEM/default/icoTemp.png">' }, but no image is
displayed (I checked the icon path):

I don't necessary need a solution to the example above, but more a way to
use icons in general.

Thanks in advance,

Bernard



--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> How to set an icon that correspond to a state?

FHEMWEB searches for icons in this order: name.state name.rstate name
model.state model type.state type.rstate type state rstate
rstate is the "real" state, state the (possibly) eventMap translated one.


> How to add functions like toggle?

The list of commands together with the eventMap ones must contain on and off.
Note: toggle is implemented here in FHEMWEB by sending on and off.


> src="/usr/share/fhem/FHEM/default/icoTemp.png"

FHEMWEB returns images only for the URL http://host:port/fhem/icons/[.]

. must be in the directory .../fhem/www/images/default or
.../fhem/www/images/