Autor Thema: regexp for state only  (Gelesen 546 mal)

Offline andyclimb

  • Full Member
  • ***
  • Beiträge: 141
regexp for state only
« am: 17 März 2017, 16:30:26 »
I'm really struggling with this..  like over 1hr...

I'd like a regexp to match the state and only the state of the RESIDENTS module.  specifically when it goes to 'home' and 'gone'

I've tried every combination i can think of... and nothing works...
rgr_Residents:state:home set mqtt_livingroom_couchlight on

I think I'm going mad! 
AM

Offline andyclimb

  • Full Member
  • ***
  • Beiträge: 141
Antw:regexp for state only
« Antwort #1 am: 18 März 2017, 16:56:11 »
I was struggling with this all yesterday. 

pretty easy in the end!

rgr_Residents:home
AM

Offline Prof. Dr. Peter Henning

  • Developer
  • Hero Member
  • ****
  • Beiträge: 4736
Antw:regexp for state only
« Antwort #2 am: 23 März 2017, 07:54:10 »
Just a suggestion for the future: https://regex101.com/

LG

pah

Offline Benni

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1592
  • FHEMinist
Antw:regexp for state only
« Antwort #3 am: 23 März 2017, 11:56:08 »
FHEM (FL 9.9) (configDB+DbLog) auf Debian Wheezy.
Jede Menge HM mit 2x HMUART (WeMos+esp-link) über VCCU.
UniRoll an CUL868. Sebury F2-2 RFID über ESPEasy
Module: 98_rssFeed und 98_QRCode

Offline andyclimb

  • Full Member
  • ***
  • Beiträge: 141
Antw:regexp for state only
« Antwort #4 am: 23 März 2017, 23:40:23 »
bookmarked.  thanks
AM

Offline oliv06

  • Developer
  • Full Member
  • ****
  • Beiträge: 157
    • Play with Free : FHEM
Antw:regexp for state only
« Antwort #5 am: 30 März 2017, 13:46:48 »
One more option: https://fhem.de/commandref.html#addStateEvent
I do not understand how this can work in userReadings ? Could you elaborate please ?

Offline Benni

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1592
  • FHEMinist
Antw:regexp for state only
« Antwort #6 am: 30 März 2017, 15:13:27 »
I do not understand how this can work in userReadings ? Could you elaborate please ?

This option is only to prefix the event generated for the reading "state" with "state: ".
By default the event for the state-reading comes with no prefix.

This is not for userReadings!
« Letzte Änderung: 03 April 2017, 13:50:14 von Benni »
FHEM (FL 9.9) (configDB+DbLog) auf Debian Wheezy.
Jede Menge HM mit 2x HMUART (WeMos+esp-link) über VCCU.
UniRoll an CUL868. Sebury F2-2 RFID über ESPEasy
Module: 98_rssFeed und 98_QRCode

 

decade-submarginal