Insteon Network Traffic Issues?

I decided to go through and re-architect a few things in my system to gain some flexibility. I really wanted to be able to use all the buttons on my Insteon Keypads to trigger scenes and modes in OpenHAB, but I also wanted the buttons to be controlled by OpenHAB to indicate when certain scenes and items were turned on.

I followed the Insteon setup instructions and verified that I can in fact turn all buttons on from OpenHAB and get status from all buttons.

Here are the group items I created:

Switch              HomeMode                    "Arrive Home Scene"                                                         ["Switchable"]
Group:Number:SUM    HomeModeController   
Group:Dimmer        HomeModeItems

And the Items I use in the rules:

Switch      EntryLightKeypadButtonB     "Entry Light Keypad - Home Mode"                (HomeModeController)                        {insteonplm="3D.88.42:F00.00.15#keypadbuttonB,group=0x14"}
Switch      BackDoorKeypadButtonB       "Back Door Keypad - Home Mode"                  (HomeModeController)                        {insteonplm="43.68.C0:F00.00.15#keypadbuttonB,group=0x84"}
Dimmer      TableLamp                   "Table Lamp"                                    (LivingRoom, Lights, 
                                                                                        MovieSceneItems, HomeModeItems,
                                                                                        MorningModeItems)          ["Lighting"]     {insteonplm="2F.47.8A:F00.00.13#dimmer"}
Dimmer      EntryLight                  "Entry Light"                                   (LivingRoom, Lights,
                                                                                        MovieSceneItems, HomeModeItems,
                                                                                        MorningModeItems)           ["Lighting"]    {insteonplm="3D.88.42:F00.00.15#loaddimmer"}

Switch PorchLight “Porch Light” (FrontPorch, Lights,
HomeModeItems) [“Lighting”] {insteonplm=“3D.44.19:F00.00.02#switch”}

I grouped some lights together in scene groups and I created rules like the following:

rule "Home Mode Control"
when
    Item EntryLightKeypadButtonB changed or
    Item BackDoorKeypadButtonB changed
then
    if (EntryLightKeypadButtonB.state == ON)
    {
        if (HomeMode.state != ON)
        {
            HomeMode.sendCommand(ON)
        }
    }
    else
    {
        if (HomeMode.state != OFF)
        {
            HomeMode.sendCommand(OFF)
        }
    }
    
end

and this to update the buttons:

rule "Sync Home Mode Controllers"
when
    Item HomeMode received update
then
    if(homeModeUpdateTimer == null)
    {
        homeModeUpdateTimer = createTimer(now.plusSeconds(2))[|
            HomeModeController.members.filter(item | item.state != HomeMode.state).forEach[controller|
                controller.sendCommand(HomeMode.state.toString())
            ]
            homeModeUpdateTimer = null
        ]
    }
    else
    {
        homeModeUpdateTimer.reschedule(now.plusSeconds(2))
    }
end

And the HomeMode rule itself:

rule "Home Mode"
when
    Item HomeMode received command
then
    if (receivedCommand == ON)
    {
        HomeModeItems.members.forEach[item|
            if (item.acceptedCommandTypes.contains(PercentType))
            {
                if (item.state != HomeModeLevel.state)
                {
                    item.sendCommand(HomeModeLevel.state.toString())
                }
            }
            else
            {
                if (item.state != ON)
                {
                    item.sendCommand(ON)
                }
            }
        ]
    }
    else
    {
        HomeModeItems.members.filter(item|item.state != OFF).forEach[light|
            light.sendCommand(OFF)    
        ]
    }
end

I used this technique in other areas of the house, like the kitchen and it works pretty well. But in this case I push the button on the keypad, the log tells me the button changed to ON, the HomeMode items gets the command ON, each item in the HomeMode group gets the command, but the items don’t actually change. It’s like they just don’t get the message.

When I trigger the scene from the Sitemap on my phone or browser all items come on perfectly every time. It’s only when I use the buttons that the items don’t respond properly. So I’m thinking maybe message collisions with the buttons?

Am I overwhelming the Insteon Network? Is there anything I can do to get around this? Or anything I can do to make this work better? Any suggestions? At this point I’ve messed around with it so much I’m at a loss as to where to go next. It seems to work well in some areas of the house but not others.

Any suggestions are really appreciated since as of now I feel like my only option is to redesign things again and I was really hoping not to have to do that.

Assuming that you are overwhelming the Insteon network, you can do something like I suggested here:

I do not know anything about Insteon so I couldn’t provide any insight into the cause of your problem.

I appreciate that insight. That was going to be the next thing I investigated so I appreciate you giving me that tip. I will try that out. I’m also a little concerned that I was receiving errors communicating with some devices this morning so I might have to investigate power line noise and potentially replacing my PLM modem. But I will investigate this first in the hopes it saves me the money of buying a new modem :slight_smile:

Just an update for anyone who might run into these issues themselves:

It seems as though I was correct, I was overloading the network a bit by trying to send a half a dozen commands or so over the network all at once and some messaging was missed. So I looked into @rlkoshak suggestions and added a delay to the rule, delaying the sending of each message by a short period and it looks to have made things much more stable.

Through experimentation I found that the further the device is from the PLM module the longer the delay should be. The reason for that being that Insteon is a mesh network so if a device is far from the device sending and receiving command there are more hops between the two devices and thus it takes longer for the messages to get from one device to the other and back. On top of which Insteon requires clean up messages after the initial messages and they require bandwidth as well. Adding a delay between commands allows the propagation and clean up of those messages.

Hope this helps someone else. If I can add this somewhere that others will see it let me know.