[SOLVED] Strange Issue with MagicHome led light item (ItemStatePredictedEvent wrong)

Hello, after a power outage, i have some strange issue with 2 MagicHome Led items.
I can turn them OFF, but not ON

Here’s is the log

2018-10-02 19:06:31.392 [INFO ] [home.model.script.rule SONOFF BRIDGE] - OFF
2018-10-02 19:06:31.402 [INFO ] [home.model.script.rule SONOFF BRIDGE] - -> Wifiled_2.sendCommand(ON)
2018-10-02 19:06:31.414 [ome.event.ItemCommandEvent] - Item ‘Wifiled_2’ received command ON
2018-10-02 19:06:31.434 [nt.ItemStatePredictedEvent] - Wifiled_2 predicted to become OFF

As you can see the “predicted” state is wrong, and the light wont turn ON and the item state won’t change to ON.

here are the definitions and the rules triggering the change (and the loginfo above)

Thing	wifiled:wifiled:2	"WifiLed_2" 	@ 	""	[ ip="192.168.1.221",	 port=5577,	 pollingPeriod=3000,	 protocol="LD382A",	 driver="CLASSIC",	 fadeDurationInMs=1000,	 fadeSteps=100 ]
Switch Wifiled_2 "WifiLed 2" (Light,gWifiled) {channel="wifiled:wifiled:2:power"}
...
logInfo("rule SONOFF BRIDGE", Wifiled_2.state.toString())
		if (Wifiled_2.state == ON)
			{
			logInfo("rule SONOFF BRIDGE", "-> Wifiled_2.sendCommand(OFF)")
			Wifiled_2.sendCommand(OFF)
			}
        	else
			{
			logInfo("rule SONOFF BRIDGE", "-> Wifiled_2.sendCommand(ON)")
			Wifiled_2.sendCommand(ON)
			}
...

Can you post the complete rule, please?

Here is the complete rule.
It’s quiet long because it is the rule for all RF Code incoming on my Sonoff BRIDGE

But, I made another test whith a sitemap switch (so no rules now) and it does the same thing
I’ll post more log this evening

Aymeric

rule "SONOFF BRIDGE"
when
    Item SONOFF_BRIDGE_RfReceive changed
then
if (SONOFF_BRIDGE_RfReceive.state == NULL)

    {
    logInfo("rule SONOFF BRIDGE", "Item is null, cancelling...")
    return;
    }
    var rfData = SONOFF_BRIDGE_RfReceive.state.toString
    logInfo("rule SONOFF BRIDGE", "Code RF recu: " + rfData)
        switch (rfData) {

        case "0332DE"  :
        {
        logInfo("rule SONOFF BRIDGE", "-> Courrier Reçu")
        // Reset Dernier Code Re�u
    		rfData=""
    		SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
    		}

            case "066661",
	    case "4A5014":
               {
		if (SONOFF_LAMPE_TABLE.state == ON)
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_TABLE.sendCommand(OFF)")
			SONOFF_LAMPE_TABLE.sendCommand(OFF)
			}
        	else
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_TABLE.sendCommand(ON)")
			SONOFF_LAMPE_TABLE.sendCommand(ON)
			}

		// Reset Dernier Code Re�u
		rfData=""
		SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		}
            case "066662",
	    case "DC8572",
	    case "4A5018":
		{
   	if (SONOFF_LAMPE_SALON.state == ON)
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_SALON.sendCommand(OFF)")
			SONOFF_LAMPE_SALON.sendCommand(OFF)
			}
        	else
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_SALON.sendCommand(ON)")
			SONOFF_LAMPE_SALON.sendCommand(ON)
			}
		// Reset Dernier Code Re�u
		rfData=""
		SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		}
           case "066668",
           case "A59E78",
	   case "DC8574",
	   case "4A5012":
               {
		if (SONOFF_LAMPE_TV.state == ON)
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_TV.sendCommand(OFF)")
			SONOFF_LAMPE_TV.sendCommand(OFF)
			Wifiled_1.sendCommand(OFF)
			}
        	else
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_TV.sendCommand(ON)")
			SONOFF_LAMPE_TV.sendCommand(ON)
			Wifiled_1.sendCommand(ON)
			}

		// Reset Dernier Code Re�u
		rfData=""
		SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		}
           case "B0DE44":
               {
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_TABLE.sendCommand(OFF)")
			SONOFF_LAMPE_TABLE.sendCommand(OFF)
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_TV.sendCommand(OFF)")
			SONOFF_LAMPE_TV.sendCommand(OFF)
			Wifiled_1.sendCommand(OFF)
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_SALON.sendCommand(OFF)")
			SONOFF_LAMPE_SALON.sendCommand(OFF)


		// Reset Dernier Code Re�u
		rfData=""
		SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		Samsung_TV_IR_Remote.sendCommand("SAMSUNG_POWER_OFF")
		}


		case "065171" :
 {
		if (SONOFF_LAMPE_CHAMBRE.state == ON)
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_CHAMBRE.sendCommand(OFF)")
			SONOFF_LAMPE_CHAMBRE.sendCommand(OFF)
			}
        	else
			{
			logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_CHAMBRE.sendCommand(ON)")
			SONOFF_LAMPE_CHAMBRE.sendCommand(ON)
			}

		// Reset Dernier Code Re�u
		rfData=""
		SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		}


	   case "061AE1":
               {
		logInfo("rule SONOFF BRIDGE", Wifiled_2.state.toString())
		if (Wifiled_2.state == ON)
			{
			logInfo("rule SONOFF BRIDGE", "-> Wifiled_2.sendCommand(OFF)")
			Wifiled_2.sendCommand(OFF)
			}
        	else
			{
			logInfo("rule SONOFF BRIDGE", "-> Wifiled_2.sendCommand(ON)")
			// SONOFF_LAMPE_RGB_1_Color_RGBCW.sendCommand("000000FFFF")
			Wifiled_2.sendCommand(ON)
			}

		// Reset Dernier Code Re�u
		rfData=""
		SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		}

		// case "061AE1":
        //        {
		// logInfo("rule SONOFF BRIDGE", SONOFF_LAMPE_RGB_1.state.toString())
		// if (SONOFF_LAMPE_RGB_1.state == ON)
		// 	{
		// 	logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_RGB_1.sendCommand(OFF)")
		// 	SONOFF_LAMPE_RGB_1.sendCommand(OFF)
		// 	}
        // 	else
		// 	{
		// 	logInfo("rule SONOFF BRIDGE", "-> SONOFF_LAMPE_RGB_1.sendCommand(ON)")
		// 	SONOFF_LAMPE_RGB_1_Color_RGBCW.sendCommand("000000FFFF")
		// 	SONOFF_LAMPE_RGB_1.sendCommand(ON)
		// 	}

		// // Reset Dernier Code Re�u
		// rfData=""
		// SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		// }



		////////////////// WIFILED
		case "000F01",case "000F02",case "000F03",case "000F04",case "000F05",
		case "000F06",case "000F07",case "000F08",case "000F09",case "000F0A",
		case "000F0B",case "000F0C",case "000F0D",case "000F0E",case "000F0F",
		case "000F10",case "000F11",case "000F12",case "000F13",case "000F14",case "000F15" :
		{
			Telecommande_LED1.sendCommand(rfData)
			
			rfData=""
			SONOFF_BRIDGE_RfReceive.postUpdate(rfData)
		}
		
		

    	}


end

Just for information, i removed and restored every config files related to the wifi led, and it worked after that
(.things, .sitemap, .items, .rules files)

Please mark the thread as solved, thanks.