FHEM Forum

FHEM => English Corner => Thema gestartet von: andyclimb am 17 März 2017, 16:30:26

Titel: regexp for state only
Beitrag von: andyclimb 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! 
Titel: Antw:regexp for state only
Beitrag von: andyclimb am 18 März 2017, 16:56:11
I was struggling with this all yesterday. 

pretty easy in the end!


rgr_Residents:home
Titel: Antw:regexp for state only
Beitrag von: Prof. Dr. Peter Henning am 23 März 2017, 07:54:10
Just a suggestion for the future: https://regex101.com/

LG

pah
Titel: Antw:regexp for state only
Beitrag von: Benni am 23 März 2017, 11:56:08
One more option:

https://fhem.de/commandref.html#addStateEvent
Titel: Antw:regexp for state only
Beitrag von: andyclimb am 23 März 2017, 23:40:23
bookmarked.  thanks
Titel: Antw:regexp for state only
Beitrag von: oliv06 am 30 März 2017, 13:46:48
Zitat von: Benni am 23 März 2017, 11:56:08
One more option: https://fhem.de/commandref.html#addStateEvent (https://fhem.de/commandref.html#addStateEvent)
I do not understand how this can work in userReadings ? Could you elaborate please ?
Titel: Antw:regexp for state only
Beitrag von: Benni am 30 März 2017, 15:13:27
Zitat von: oliv06 am 30 März 2017, 13:46:48
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!