DuoFernDevice/module.php
/**
     * Handles registered messages
     * Will be called when receiving a registered msg
     *
     * @param int $TimeStamp
     * @param int $SenderID
     * @param string $Message
     * @param array $Data
     */
Handles registered messages
Will be called when receiving a registered msg


Handles registered messages Will be called when receiving a registered msg
public function MessageSink($TimeStamp, $SenderID, $Message, $Data)
    {
        switch ($Message) {
            case IPS_KERNELSTARTED :
                $this->ApplyChanges();
                break;
            case FM_CONNECT :
                $this->SendUpdateChildrenData();
                break;
            case IM_CHANGESETTINGS :
                foreach ($Data as $changedPropertyJson) {
                    $changedProperty = json_decode($changedPropertyJson, true);
                    if (is_array($changedProperty) && array_key_exists("duoFernCode", $changedProperty)) {
                        $this->VersionBuffer = null; 
                        break;
                    }
                }
                break;
        }
    }
public function MessageSink ( $ TimeStamp , $ SenderID , $ Message , $ Data ) { switch ( $ Message ) { case IPS_KERNELSTARTED : $ this -> ApplyChanges ( ) ; break ; case FM_CONNECT : $ this -> SendUpdateChildrenData ( ) ; break ; case IM_CHANGESETTINGS : foreach ( $ Data as $ changedPropertyJson ) { $ changedProperty = json_decode ( $ changedPropertyJson , true ) ; if ( is_array ( $ changedProperty ) && array_key_exists ( " duoFernCode " , $ changedProperty ) ) { $ this -> VersionBuffer = null ; break ; } } break ; } }
Handles registered messages
 Will be called when receiving a registered msg
Handles registered messages Will be called when receiving a registered msg
// check changed properties // if property duoFernCode is changed // reset version buffer