DimmerItem Type error?

Hi Guys,

I see an odd error on boot up with the below. I do have a proxy defined as this name, but it’s a switch, not a dimmer.

I cant seem to find where this exists - even in rules. Is there a trick to locating or help determine why this occurs?

21:31:23.861 [WARN ] [core.common.registry.AbstractRegistry] - DimmerItem with key 'PS4Scene_Alexa' already exists from provider GenericItemProvider! Failed to add a second with the same UID from provider GenericItemProvider!

Rule:


// Yamaha PS4 Scene via Alexa Dummy Item
rule "PS4 Scene Alexa"
        when
                Item PS4Scene_Alexa received command
        then
            switch (receivedCommand)
                {
                        case ON:           sendCommand(Zone_1_Scene, 'Scene 2')
                        case OFF:          sendCommand(Main_Zone_Power, 'OFF')
                }
end

Items:


Switch PS4Scene_Alexa                              "Proxy for Playing PS4 Via Alexa"                                             [ "Switchable" ]
Switch Spotify_Alexa                               "Proxy for Playing Spotify via Alexa"                                         [ "Switchable" ]
Switch FibaroEye1Motion_Armed                      "Proxy to Disable/Enable Motion Sensor during Movies"
Switch Motion_PartyMode                            "Proxy to Disable/Enable Motion Sensing for All Motion Sensors"               [ "Switchable" ]
Switch Scene_Watch_Vero                            "Proxy for Watching a Vero Movie via Alexa"                                   [ "Switchable" ]
Switch Scene_Leaving_House                         "Proxy for Occupants leaving the House via Alexa" [ "Switchable" ]
Switch Night_time                                  "Night"
String MENU_page
Switch HeaterTimer                                 "Proxy for The Heater"
Switch Vero                                        "Proxy for Vero"

/* This switch will be used in the Entertainment Rule to change Input to FTA */
Switch TVProxyFTA                                  "FTA Switch"
Switch TVStatus                                                             { channel="network:pingdevice:1bad045e:online" }

/* Perform OpenHab2 Operations */

Switch restartoh2                                  "Restarts OpenHab2"
Switch restartserver                               "Restarts UCS-E OH2 Server"
Switch backupserver                                "Backup Server"
Switch restartkodi                                 "Restarts Kodi"

/* Proxies for Motion Detection Around the House */
Switch Motion_Garage                               "Detects Motion in the Garage"
Switch Motion_Carport                              "Detects Motion in the Carport"

/* Proxy for Turning on & off Blue Iris Motion Recording */
Switch BlueIris_Motion_Arm                         "Turns on/off Blue Iris Motion Recording"

Go through all you items files to check you have got the item twice
Also go through you items in paperUI

1 Like

Roger!

case ON:           sendCommand(Zone_1_Scene, 'Scene 2')
case OFF:          sendCommand(Main_Zone_Power, 'OFF')

Also, this is preferable.

case ON:           Zone_1_Scene.sendCommand("Scene 2")
case OFF:          Main_Zone_Power.sendCommand(OFF)

Assuming Main_Zone_Power is a Switch item.

See here for more details.

1 Like

Thanks Mark, my items are dimmer types.

This works fine for the aircon switching it off, but fails when switching it on. Its very odd!


// Aircon  On/Off via Alexa Dummy Item
rule "Aircon Alexa"
        when
                Item Aircon_Alexa received command
        then
            switch (receivedCommand)
                {
                        case ON:           sendCommand(Aircon, "AirconOn")
                        case OFF:          sendCommand(Aircon, "AirconOff")
                }
end

Using the console with this command switches it on just fine… Any thoughts?


openhab> smarthome:send Aircon AirconOn
Command has been sent successfully.
openhab>

How is the Aircon Item defined? Switch or String?

Its a string because im using the broadlink binding with an rm mini

well… your rule should work in this case.
you can try to use the method instead of the action:

// Aircon  On/Off via Alexa Dummy Item
rule "Aircon Alexa"
	when
		Item Aircon_Alexa received command
	then
		switch (receivedCommand)
		{
			case ON:	Aircon.sendCommand(AirconOn)
			case OFF:	Aircon.sendCommand(AirconOff)
		}
end

Ps: what solution did I provide in the previous post? :slight_smile:

Same result :frowning: Switches off using this rule, wont switch on.

well… then you have an issue with the binding and/or the device itself
does it support switching on?
the rule is fine

Yes, i use the same rule using the same brinding for the TV, it switches on just fine.

And as mentioned I can send the command via the Console just fine.

So it has to be the rule?

inject logInfos to see if the case ON is triggered

Not sure I did it right…

17:15:09.326 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Aircon_Alexa' received command 100
17:15:09.329 [INFO ] [smarthome.event.ItemStateChangedEvent] - Aircon_Alexa changed from 0 to 100
17:15:09.779 [INFO ] [eclipse.smarthome.model.script.Aircon] - Case ON


// Aircon  On/Off via Alexa Dummy Item
rule "Aircon Alexa"
        when
                Item Aircon_Alexa received command
        then
            switch (receivedCommand)
                {
                        case ON:           Aircon.sendCommand("AirconOn")
                        case OFF:          Aircon.sendCommand("AirconOff")
                }
logInfo("Aircon", "Case ON")
end

within the case:

// Aircon  On/Off via Alexa Dummy Item
rule "Aircon Alexa"
	when
		Item Aircon_Alexa received command
	then
		switch (receivedCommand)
		{
			case ON:	{
						Aircon.sendCommand(AirconOn)
						logInfo("Aircon_Alexa", "Got ON, sending AirconOn") 
			}
			case OFF:	{
						Aircon.sendCommand(AirconOff)
						logInfo("Aircon_Alexa", "Got OFF, sending AirconOff") 
			}
		}
end

Of course the rule will NOT work…
You are receiving 100 and your rule is looking for ON…

Posting a rule without the relevant items is like shooting yourself (and others) on the leg :slight_smile:

But this is using Alexa, its a dimmer item, apparently it needs to be.

Dimmer Aircon_Alexa "Aircon" [ "Switchable" ] // Dummy Item for Alexa as it doesnt understand Strings

It can be whatever

If your rule is looking for ON/OFF and your Item is getting 100/0 instead… guess what will happen…

change the Aircon_Alexa Item to a Switch

1 Like

Thank you Sir :smiley:

I was told I had to use Dimmer items, but Switches are working, Thanks Angelos. You’re a guru :smiley:

1 Like