Force a refresh of Insteon device state

@djf_jeff, how are you triggering the Insteon scenes? Through your hub? From within openhab or through the insteon app? Do you have a hub and a PLM modem (that would open up some other avenues)?

I looked in the source code but I did not see where I limited the polling to a minimum rate. It also looks like I prepared for a per-device polling frequency, but there is no way to set it yet, and nothing has been tested.

@Bernd_Pfrommer mainly from Keypad (which are link to my Hub) and OpenHab. I don’t have an extra PLM apart from my Hub.

I am thinking of buying a standalone USB PLM and get rid of my old Hub. It was looking like a good idea to have a networked PLM but in the end, it seems to cause me more issue than it solve.

If you trigger from the keypad, and have an item associated with the keypad, then openhab should learn about it. Can you not just update the state of the items then within openhab, instead of waiting for the binding to come around with a poll and update it? Apologies, I have not used openhab in a while (at least not the scripting part), so I don’t remember anymore if this can be done from an openhab script or not.

@Bernd_Pfrommer you don’t have to apologize, I am just starting out with OpenHab, so I need to learn quite a bi myself. I will try that to see if I can arrange something.

Thanks!

If you know which items are in the scene then you could assume they got the command and just do a “postUpdate” on each item in the scene. That would mean you’re assuming every device received the command and responded. That’s usually a good assumption but I’ve noticed times when my devices don’t respond as expected. Mostly when you try to send multiple commands back to back quickly.

But for the most part devices respond pretty well.

You could do something like this:

rule "Update Scene Items"
when Item SceneTrigger changed
then
    if (SceneTrigger.state == ON) {
        SceneItem1.postUpdate(sceneLevel)
        SceneItem2.postUpdate(sceneLevel)
        .
        .
        .
    } else {
        SceneItem1.postUpdate(OFF)
        SceneItem2.postUpdate(OFF)
    }
end

That shouldwork. The only thing to watch out for is if you have a button that turns the scene off but turns another scene on and effect those lights you account for that as well. Generally trying to synchronize all those devices in the OH system can be kind of tricky. Insteon is a tough protocol to work with in some regards.

P.S. - postUpdate is different than sendCommand. postUpdate will update the item but not send out the command to the device. SendCommand does both.

Did this ever happen? The hub should know the state of all the devices, so if there was a way to just poll the hub and not the individual devices, wouldn’t that work? Or am I missing something?