From a50d922fe79a36c2d7f8bdc5e23ef17175609b57 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Tue, 7 Jul 2015 08:09:49 +0000 Subject: [PATCH] 32_yowsup.pm: added nickname attribute (by JoWiemann) git-svn-id: https://svn.fhem.de/fhem/trunk@8911 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/32_yowsup.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/32_yowsup.pm b/fhem/FHEM/32_yowsup.pm index 09cd34901..87d14480b 100644 --- a/fhem/FHEM/32_yowsup.pm +++ b/fhem/FHEM/32_yowsup.pm @@ -25,7 +25,7 @@ yowsup_Initialize($) #$hash->{GetFn} = "yowsup_Get"; $hash->{AttrFn} = "yowsup_Attr"; $hash->{AttrList} = "disable:1 "; - $hash->{AttrList} .= "acceptFrom cmd home ". $readingFnAttributes; + $hash->{AttrList} .= "acceptFrom cmd home nickname ". $readingFnAttributes; } ##################################### @@ -181,6 +181,7 @@ yowsup_Connect($) InternalTimer(gettimeofday()+20, "yowsup_Connect", $hash, 0); } } + sub yowsup_Disconnect($) { @@ -334,6 +335,9 @@ yowsup_Parse($$) if( $hash->{WAITING_FOR_LOGIN} ) { yowsup_Write( $hash, '/L' ); yowsup_Write( $hash, '/presence available' ); + + yowsup_Write( $hash, "/presence name '". AttrVal($name, 'nickname', "") ."'" ) if(defined(AttrVal($name, 'nickname', undef))); + #yowsup_Write( $hash, '/ping' ); delete $hash->{WAITING_FOR_LOGIN}; @@ -555,6 +559,9 @@ yowsup_Attr($$$) PWD -> set to $PWD
anything else -> use as $HOME +
  • nickname
    + nickname that will be send as sender
  • +
  • accept_from
    comma separated list of contacts (numbers) from which messages will be accepted