What does this Error mean?

This is a Virtual Switch error that just showed up in my logs. Wondering what it means.

dev:52023-12-28 03:09:46.214 PMerrorjava.util.ConcurrentModificationException: null on line 181 (method on)

What were you trying to do at the time? Or what were other apps trying to do with the switch?

If you look at the Used By apps at the bottom of the Device Details page (for the Virtual Switch) can you see what Apps are able to control the switch?

I have a C8 as my main hub. Then a C5 secondary hub. This is a virtual switch on the C5 linked to my main hub. It would be triggered if the door is unlocked, which it probably was at that particular time. What I mean is the C8 told the C5 via this switch that the door had been unlocked.

Everything is still working fine, just kinda wondered what it meant and if I should be checking for something else.

Sounds simple... :wink: Says one who can appreciate the web we can weave at times....

Based on the exception it included in the error (java.util.ConcurrentModificationException), and from my extensive research (the first page Google returned), my suspicion is that two things were trying to read/write something on the Virtual Switch at the same time.

I expect it is ok for now, but it may be worth looking through what uses the switch and thinking through the sequence of events that may be possible to cause two or more automations to use the switch at the same time. I don't have any answers for how to deal with this, but would just recommend looking at it for now.

Yeah, simple except to my pea brain.

I use the C5 just to have a separate instance of Homekit integration. Reason for this is to let certain people have control of only a few devices and not the whole house, which I have on the C8.

The Homekit integration doesn't let me pick a hub mesh device for whatever reason. Thus I need a local device on the C5. So using the Mirror app I mirror that virtual switch to another virtual switch that is solely on the C5. It takes 2 mirrors to make it work in both directions. If the lock is unlocked from the C8 then the mesh switch tells the local switch. If it is unlocked from the C5 then the local switch tells the mesh switch. But other than that, there is no other apps or automations.

But I can see where one mirror triggers the other mirror every time. It has always worked fine, and I just tried it and it still is fine in either direction.

But again no biggy, just never saw that before.

Can you grab a screenshot of the instances of the Device Details page on each hub? If only as a record? The in use by section...

I can but without an explanation of how that all works it wouldn't make much sense. Let me see if I can do a write up that clarifies the situation.

I can understand where there is multiple calls every time the lock gets triggered as I need to maintain the status of the lock in virtual switches as well as have the virtual switches control the lock. ie, when a virtual switch is toggled the lock unlocks. And if the lock is unlocked manually the virtual switch is toggled to display the status. Thus it kinda calls back on itself. And with the mesh to the other hub, there is another set of switches there that have to do the same thing and report back.

It's just that it has always worked as intended, and still does. So maybe for some reason something didn't report back soon enough or too soon and caused the double action.

I'm not gonna worry about it unless it keeps happening. First time in months that it happened, so apparently just a fluke. And there is more than just that one switch doing the same things with other devices happening more often then the door lock.

Yeah, I get the relaxed attitude towards the issue, if it ain't broke (much), don't fix it.... That makes perfect sense to me.

So I'm not wanting to labour the issue, only try and expand your understanding, at least based on my own...

The reason for my curiosity around the Apps in the "Used By" section of the Device Details pages on each HE hub is to look at those that have any interest in reading or writing status updates to the device on each hub in order to tell what may or may not be trying to read/write the status of the device at the same time.

There could be something else going on, but this is all I can offer as something to look into, and have a string suspicion it may at least show up where to look, for others to delve into further.

Here are the screen shots. I can say for certain the Dashboards were not in use as we don't use them anymore. And I'm the only one who has access to them. I really should delete them I guess.

C8 Device:

C5 Device:

1 Like

Which of the two you screenshotted is device id 5? (Look in the URL of the Device Details page, or click on the "error" in the log entry).

Pretty much what @sburke781 said above. Looking at your screen shots my guess is that MirrorMe and HubMesh both tried to update the device at the same time. Nothing to worry about - just information.

1 Like

The one on the C5.

Exactly. But that is the case everytime. Puzzled why it now showed up after all this time of working without an error.

The Mirror me app would not be telling it to turn on till after it was already on as it couldn't know to do so other wise.

Just timing...

Granted it is odd to only show up now, but are these not performing the same function?

The reason I have to use the Mirror me app, or something similiar. Is that you can't use a Mesh device on Homekit. It says that type of device is not compatible. Thus I have to have a local switch for the Homekit and mirror it both ways to the switch on the other hub. It takes 2 mirror app rules to go both ways.

Ah... time to log off for sensible thought.... :wink: (Me that is....)

Yeah, life would have been so much simpler if mesh devices could be used on Homekit. Then I wouldn't have a need for the Mirroring.

Or if I could have 2 instances of Homekit on the main hub. Then I wouldn't need the C5 at all.

It would also be pretty nice if the Mirror Mirrored both ways without having a second Mirror for the opposite direction.

But it is what it is. I am thinking about writing my own Mirror app which might prevent the dupliction. Not sure if it's worth the trouble.

Thanks to all for the comments. I was just mainly curious as to what the error meant.

1 Like

Simpler to to run a HomeKit instance on each hub.

Exactly what I am doing. But the devices are on the main hub and Meshed to the sub hub. And since Mesh devices can't be used on Homekit, it necessitates the use of Mirroring to local devices on the sub hub.

Boy, am I confused now... :upside_down_face: