From 5383b5c4d96921c356f9fb8cf9c8ef5d04e85366 Mon Sep 17 00:00:00 2001 From: gvzdus Date: Sat, 8 Jul 2023 10:03:12 +0000 Subject: [PATCH] 47_OBIS: Add set data git-svn-id: https://svn.fhem.de/fhem/trunk@27732 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/47_OBIS.pm | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index b7a0a3842..6219125c8 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 47_OBIS: Add unofficial "set data " - bugfix: 93_DbRep: SQL syntax for Postgre maxValue deleteOther Forum:#134170 - bugfix: 93_DbRep: fix check of DbRep_afterproc, DbRep_beforeproc if should exec PERL code diff --git a/fhem/FHEM/47_OBIS.pm b/fhem/FHEM/47_OBIS.pm index a3079b9e4..6bfc0d4d9 100644 --- a/fhem/FHEM/47_OBIS.pm +++ b/fhem/FHEM/47_OBIS.pm @@ -109,6 +109,7 @@ sub OBIS_Initialize($) $hash->{DefFn} = "OBIS_Define"; $hash->{ParseFn} = "OBIS_Parse"; $hash->{GetFn} = "OBIS_Get"; + $hash->{SetFn} = "OBIS_Set"; $hash->{UndefFn} = "OBIS_Undef"; $hash->{AttrFn} = "OBIS_Attr"; $hash->{AttrList}= "do_not_notify:1,0 interval offset_feed offset_energy IODev channels directions alignTime pollingMode:on,off extChannels:on,off,auto unitReadings:on,off ignoreUnknown:on,off valueBracket:first,second,both resetAfterNoDataTime createPreValues:on,off httpAuthorization ". @@ -282,7 +283,10 @@ sub OBIS_Set($@) } } - return; + if ($opt eq "data") { + OBIS_Parse($hash,(pack 'H*', $value)); + } + return undef; } # Update-Routine