MQTT & scene trigger

I’ve created a scene that opens the details of a certain camera that is triggered via mqtt.
It’s in a topic called BlueIris/Trigger.
The open details works fine, but the delay and close details does nothing.
It also seems that a re-trigger of the same camera does not open it up again.
I don’t have the ability to reset the topic so that’s not an option.

mqtt issue.hrp (98.2 KB)

Delay is in seconds, not milliseconds. Your Delay is 30 ms. The CloseDeviceDetails call is probably running before the page has even finished opening.

Why aren’t you using Idle events?

If I were writing this I would be using the Idle functionality as described in this post to close the page.

To help ensure future scenes are retriggered, you could publish an empty string to that topic in your Scene Actions. Scene triggers are evaluated when the app opens & when values change.

You mean it’s in milliseconds not seconds?
It does not mention this in the designer and the help page returns 404 https://thehomeremote.com/docs/delayaction
Entering 30000 does the trick.
There is already an idle event on mainpage (60), where it does not mention if it’s seconds either.

Is it not possible to fix the mqtt implementation to read a new message even though it’s the same?
Posting an empty string is very workaround-ish and can cause and undesired effect that cancels an event too soon because there were multiple.

I worry that retriggering the scene could lead to more problems (maybe not for you but for others). There are quite a few REST API polling integrations that update devices periodically. Say we are polling a lighting service, we wouldn’t want to retrigger the scene just because the device was updated. In most cases, it’s the change that we are watching. I think it’s very unlikely that resetting the topic on 1 device will cause others to miss the original event. All connected clients should see the change. I believe that is your best course of action here.

I understand your worry, however this is easily mitigated by adding an option to either respond to every message or only a change. :slight_smile:

@bill is your silence a no? :slight_smile:
EDIT: mqtt seems to stop working after a while.
I saw 6 clients and I killed home remote on 2 tablets, 1 was responsive, the other had old camera images from during the day.
After restarting the app on both, 7 clients and it started working again…
I already restart the app every day…

The idle event on mainpage does not seem to work either.
Device details that are opened stay until I manually close them.
Any way to get that working?

I don’t know. I’ll have to think about it. Do like I suggested earlier. Clear the topic in the scene handler. That is not going to prevent the other HR clients from receiving the original message.

The Idle issue I fixed last night in the 3.13.1 release. It’s been submitted to Google Play but it is still pending review.

I’ll make some changes in the next 3.14.0 release to try & fix your MQTT issue.