Rule to disable item

i am a Beginner in Openhab and have a problem with my Somfy Bridge:
the somfy bridge alway shows “communication error”.
But after disabling it for 1h the item is online again.
My idea is to create a rule that disables the somfy bridge for 1 or 2 hours (at night) a enables it again so that the bridge stays online.
Is this a good idea?
If yes, can someone help me with the script for that rule?

Thanks for your answers!

It’s important to use the correct terminology because Thing and Item have specific meanings in OH.

A Bridge (also a term with specific meaning in OH) is a Thing, not an Item.

Getting the terms right not only makes sure we understand what you are asking but it will help you search the forum. There are more than 50 results when searching for “disable thing” on this forum. You have two choices, either do it through the REST API using HTTP calls or through the Exec binding and issuing commands to the Karaf console. In either case it’s going to require some work.

As for Items, no, there is no way to disable an Item. It either is there or it isn’t.

With JavaScript Scripting add-on you‘d be able to do

things.getThing(String uid).setEnabled(true); // or false

Wow. I have the exact same issue and was looking to do the exact same thing but hit the exact same roadblock.

I will use the exact same solution.