tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
301 stars 50 forks source link

[Question] Not all mangle rules are seen #232

Closed dvoijen closed 2 years ago

dvoijen commented 2 years ago

I use a "mark routing" mangle rule, this is not shown.

tomaae commented 2 years ago

Only jump and dynamic mangle rules are skipped. So most likely unique id conflict. Did you looked into your HA log?

dvoijen commented 2 years ago

Tomaae, no no duplicate but i think i know what the issue is. I have 2 mangle rules that are the almost same. The only difference is the acrion and the comment. Knipsel See the att. The next att is what i see in HA: Knipsel2

tomaae commented 2 years ago

not necessery. if you dont see any message in ha log, I will need to see debugs

dvoijen commented 2 years ago

As soon as i change one of them and set as destination 0.0.0.0/0 it works, it sees them both. If i than set the other also to 0.0.0.0/0 as destination both are gone again (greyed out).

tomaae commented 2 years ago

then you certainly have duplicate warning in HA log

dvoijen commented 2 years ago

Yes only 1: 2022-08-13 22:49:39.370 ERROR (SyncWorker_3) [custom_components.mikrotik_router.mikrotik_controller] Mikrotik duplicate Mangle rule mark-routing,any:any, entity will be unavailable. But that was a test rule i deleted this moring.

dvoijen commented 2 years ago

Tomaae, you are right..... sorry!!! When i set them to the same i indeed see this error. Now i have distinguished them by setting one of the with a destination of 0.0.0.0/0 and the other blank, works for me.

tomaae commented 2 years ago

yes, sometimes its necessery to add dummy rules to it to make them unique