otaviojr / node-red-contrib-smartthings

Allows you to control your devices and get their status using NodeRed
MIT License
32 stars 16 forks source link

Add msg.topic pull to force update from SmartThings #52

Closed Deltachaos closed 3 years ago

Deltachaos commented 3 years ago

As discussed in #1 and in #47 it is sometimes useful to force the refresh of the status from SmartThings instead of just output the current cached status.

This PR adds this functionality while maintaining fully backwards compatibility by adding a new topic for this task.

otaviojr commented 3 years ago

Have you tried the webhook? Is it working?

Because the current state of all devices should be reported as it happens using the webhook.

It's less expensive than pulling the device.

regards, Otávio Ribeiro

Deltachaos commented 3 years ago

I know the webhook and it is working is cases where you can make your installation reachable from the internet. But there are cases where you cannot do this or where you need the current status of a device only so rarely that it doesn't justify the effort to create the webhook.

kavemang commented 3 years ago

Hi guys, I'm having this issue with power outlets which will only report the original cached wattage when I restart my flow, I can't find a way to get the actual updated wattage when I prompt it to update using msg.topic = update with a inject node