diff --git a/CHANGED b/CHANGED index 286b1e946..3b2c6a84a 100644 --- a/CHANGED +++ b/CHANGED @@ -1,6 +1,7 @@ # 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. - - update: 98_DOIFtools.pm: new attribute DOIFtoolsEventOnDeleted generates + - update: 73_NUKIBridge/74_NUKIDevice 0.6.0 Support for API v1.5 + - update: 98_DOIFtools.pm: new attribute DOIFtoolsEventOnDeleted generates events for stat_ Readings before deletion remove add... button in DOIFtools event monitor - changed: 00_SIGNALduino.pm: version 3.3.1 @@ -9,7 +10,7 @@ improve send queue: Send not before response of previous warnings and some errors fixed compatibel with last changes from IT module - -changed: 14_SD_WS.pm: new sensor bresser temeo supported + -changed: 14_SD_WS.pm: new sensor bresser temeo supported - new: 98_QRCode.pm: Creating QRCodes for various purposes. QRCodes ar generated by a web service. - bugfix: 98_DOIFtools.pm: fixed Error: >name< has no TYPE, but following diff --git a/FHEM/73_NUKIBridge.pm b/FHEM/73_NUKIBridge.pm index a7982e802..0ef325827 100644 --- a/FHEM/73_NUKIBridge.pm +++ b/FHEM/73_NUKIBridge.pm @@ -46,7 +46,8 @@ use JSON; use HttpUtils; -my $version = "0.4.7"; +my $version = "0.6.0"; +my $bridgeapi = "1.5"; @@ -135,6 +136,7 @@ sub NUKIBridge_Define($$) { $hash->{PORT} = $port; $hash->{TOKEN} = $token; $hash->{VERSION} = $version; + $hash->{BRIDGEAPI} = $bridgeapi; $hash->{helper}{aliveCount} = 0; @@ -245,6 +247,11 @@ sub NUKIBridge_Set($@) { NUKIBridge_CallBlocking($hash,"clearlog",undef) if( !IsDisabled($name) ); + } elsif($cmd eq 'factoryReset') { + return "usage: clearLog" if( @args != 0 ); + + NUKIBridge_CallBlocking($hash,"factoryReset",undef) if( !IsDisabled($name) ); + } elsif($cmd eq 'callbackRemove') { return "usage: callbackRemove" if( @args != 1 ); my $id = "id=" . join( " ", @args ); @@ -259,7 +266,7 @@ sub NUKIBridge_Set($@) { } else { my $list = ""; $list .= "info:noArg autocreate:noArg callbackRemove:0,1,2 "; - $list .= "clearLog:noArg fwUpdate:noArg reboot:noArg" if( ReadingsVal($name,'bridgeType','Software') eq 'Hardware' ); + $list .= "clearLog:noArg fwUpdate:noArg reboot:noArg factoryReset:noArg" if( ReadingsVal($name,'bridgeType','Software') eq 'Hardware' ); return "Unknown argument $cmd, choose one of $list"; } } @@ -439,7 +446,7 @@ sub NUKIBridge_Distribution($$$) { # zum testen da ich kein Nuki Smartlock habe #$json = '[{"nukiId": 1,"name": "Home","lastKnownState": {"state": 1,"stateName": "locked","batteryCritical": false,"timestamp": "2016-10-03T06:49:00+00:00"}},{"nukiId": 2,"name": "Grandma","lastKnownState": {"state": 3,"stateName": "unlocked","batteryCritical": false,"timestamp": "2016-10-03T06:49:00+00:00"}}]' if( $param->{endpoint} eq "list" ); - #$json= '{"bridgeType":2,"ids":{"serverId":142667440},"versions":{"appVersion":"0.2.14"},"uptime":1527,"currentTime":"2017-01-17T04:55:58Z","serverConnected":true,"scanResults":[{"nukiId": 1,"name": "Home","rssi": -87,"paired": true},{"nukiId": 2,"name": "Grandma","rssi": -93,"paired": false}]}'; + #$json= '{"bridgeType":2,"ids":{"serverId":142667440},"versions":{"appVersion":"0.2.14"},"uptime":1527,"currentTime":"2017-01-17T04:55:58Z","serverConnected":true,"scanResults":[{"nukiId": 1,"name": "Home","rssi": -87,"paired": true},{"nukiId": 2,"name": "Grandma","rssi": -93,"paired": false}]}' if( $param->{endpoint} eq "info" ); NUKIBridge_ResponseProcessing($hash,$json,$param->{endpoint}); @@ -809,10 +816,11 @@ sub NUKIBridge_CallBlocking($$$) {

diff --git a/FHEM/74_NUKIDevice.pm b/FHEM/74_NUKIDevice.pm index bc70e4db9..52fec3633 100644 --- a/FHEM/74_NUKIDevice.pm +++ b/FHEM/74_NUKIDevice.pm @@ -33,7 +33,7 @@ use warnings; use JSON; -my $version = "0.4.7"; +my $version = "0.6.0"; @@ -305,10 +305,14 @@ sub NUKIDevice_Set($$@) { } elsif( $cmd eq 'locknGoWithUnlatch' ) { $lockAction = $cmd; + + } elsif( $cmd eq 'unpair' ) { + NUKIDevice_ReadFromNUKIBridge($hash,"$cmd",undef,$hash->{NUKIID} ) if( !IsDisabled($name) ); + return undef; } else { - my $list = "statusRequest:noArg unlock:noArg lock:noArg unlatch:noArg locknGo:noArg locknGoWithUnlatch:noArg"; + my $list = "statusRequest:noArg unlock:noArg lock:noArg unlatch:noArg locknGo:noArg locknGoWithUnlatch:noArg unpair:noArg"; return "Unknown argument $cmd, choose one of $list"; } @@ -601,6 +605,9 @@ sub NUKIDevice_CGI() {