Neuigkeiten:

Am Sonntag den 8.12.2024 kann es ab ca. 8:00 Uhr zu kurzzeitigen Einschränkungen / Ausfällen bei den Diensten des FHEM Vereines kommen.
Die Server müssen mal gewartet und dabei neu gestartet werden ;)

Hauptmenü

devicestate icon

Begonnen von kroonen, 29 Mai 2023, 22:45:17

Vorheriges Thema - Nächstes Thema

kroonen

Hi,

I use and EPS32 to send commands and receive them for my Airco. Most things work, only the devstateicon I can't get to work. If the power is on and the state is cool I would get a frost icon, same for the fan.

Below what I have already

fhem> l Zolderkamer_Airco
Internals:
   FUUID      6471137d-f33f-229d-bf07-f8740cdb604478d3
   IODev      mqtt2
   LASTInputDev mqtt2
   MSGCNT     38
   NAME       Zolderkamer_Airco
   NR         156
   STATE      off / status
   TYPE       MQTT2_DEVICE
   eventCount 48
   mqtt2_MSGCNT 38
   mqtt2_TIME 2023-05-29 22:38:29
   READINGS:
     2023-05-29 07:44:43   IODev           mqtt2
     2023-05-29 22:38:29   auto0           00:00
     2023-05-29 22:38:29   auto1           00:00
     2023-05-29 22:38:29   autop           false
     2023-05-29 22:38:29   autor           0.0
     2023-05-29 22:38:29   autot           0.0
     2023-05-29 22:38:29   econo           false
     2023-05-29 22:38:29   fan             A
     2023-05-29 22:38:29   heat            false
     2023-05-29 22:38:29   home            21.0
     2023-05-29 22:38:29   liquid          22.0
     2023-05-29 22:38:29   mode            C
     2023-05-29 22:38:29   online          true
     2023-05-29 22:38:29   outside         12.0
     2023-05-29 22:38:29   power           false
     2023-05-29 22:38:29   powerful        false
     2023-05-29 22:38:20   state           cool
     2023-05-29 22:38:29   swingh          true
     2023-05-29 22:38:29   swingv          true
     2023-05-29 22:38:29   temp            22.0
Attributes:
   IODev      mqtt2
   cmdIcon    cool:frost heat:sani_heating dry:humidity
   devStateIcon off.*:control_standby@gray on:control_standby@orange:off off:control_standby@grey:on true.*cool:frost@blue true.*H:sani_heating@red true.*D:humidity@blue true.*F:vent_ventilation@green true.*A:temp_temperature@red
   eventMap   true:on false:off
   group      Klimaat
   icon       temp_control
   readingList state/aircozolder/status:.* { json2nameValue($EVENT, '', $JSONMAP) }
   room       Zolder
   setList    off:noArg command/aircozolder/power false
on:noArg command/airocozolder/power true
   cool:noArg command/aircozolder/mode cool
   heat:noArg command/aircozolder/mode heat
   dry:noArg command/aircozolder/mode dry
   temp:18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24,5,25,25.5,26,26.5,27,27.5,28,28.5,29,29.5,30 command/aircozolder/temp $EVTPART1
   stateFormat power / status
   webCmd     :temp:cool:heat:dry:off

rudolfkoenig

To show multiple icons (e.g one for on/off, followed by one for cooling/heating) you should create a multi-line STATE internal with stateFormat, as devstateIcon checks each line separately.
This also avoids the need for regexps covering all possible combinations.

Note: Your current stateFormat doesnt seem to be correct, as there is no status reading, only a state one.

Jamo

Hi kroonen,
here is the link to an example in raw format. May be you can translate the text using google translate.
https://forum.fhem.de/index.php?topic=97586.0
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/Conbee III, FB7690, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack, Sonos, ESPresence

kroonen

Solved and got it working. Thnx for the answers

fhem> l Zolderkamer_Airco
Internals:
  FUUID      6471137d-f33f-229d-bf07-f8740cdb604478d3
  IODev      mqtt2
  LASTInputDev mqtt2
  MSGCNT    57
  NAME      Zolderkamer_Airco
  NR        156
  STATE      pw:false
op:C


  TYPE      MQTT2_DEVICE
  eventCount 84
  mqtt2_MSGCNT 57
  mqtt2_TIME 2023-06-01 18:42:12
  READINGS:
    2023-05-30 09:19:22  IODev          mqtt2
    2023-06-01 18:42:12  auto0          00:00
    2023-06-01 18:42:12  auto1          00:00
    2023-06-01 18:42:12  autop          false
    2023-06-01 18:42:12  autor          0.0
    2023-06-01 18:42:12  autot          0.0
    2023-06-01 18:42:12  econo          false
    2023-06-01 18:42:12  fan            A
    2023-06-01 18:42:12  fanrpm          0
    2023-06-01 18:42:12  heat            false
    2023-06-01 18:42:12  home            22.5
    2023-06-01 18:42:12  liquid          19.0
    2023-06-01 18:42:12  mode            C
    2023-06-01 18:42:12  online          true
    2023-06-01 18:42:12  outside        19.5
    2023-06-01 18:42:12  power          false
    2023-06-01 18:42:12  powerful        false
    2023-05-30 22:43:27  state          temp
    2023-06-01 18:42:12  swingh          true
    2023-06-01 18:42:12  swingv          true
    2023-06-01 18:42:12  temp            18.5
Attributes:
  IODev      mqtt2
  cmdIcon    cool:frost heat:sani_heating dry:humidity off:control_standby
  devStateIcon pw.false:control_standby@gray pw.true:control_standby@red op.C:frost@blue op.H:sani_heating@red op.D:humidity@blue op.F:vent_ventilation@green op.A:temp_temperature@red
  group      Klimaat
  icon      temp_control
  readingList state/aircozolder/status:.* { json2nameValue($EVENT, '', $JSONMAP) }
  room      Zolder
  setList    off:noArg command/aircozolder/mode off
on:noArg command/airocozolder/mode on
  cool:noArg command/aircozolder/mode cool
  heat:noArg command/aircozolder/mode heat
  dry:noArg command/aircozolder/mode dry
  temp:18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24,5,25,25.5,26,26.5,27,27.5,28,28.5,29,29.5,30 command/aircozolder/temp $EVTPART1
  sortby    2
  stateFormat pw:[$name:power]
op:[$name:mode]


  webCmd    :temp:cool:heat:dry:off