Closed Patrick1610 closed 5 years ago
Native Homey Logic is not yet supported so way to go for now is card A80.
What is the exact post request?
If T30 then A80
If the json body is {remaining_duration: 50}
the correct JSONpath expression would be $.remaining_duration
Thanks for thinking with me!
I have now set it up like this, but the Better Logic value does not change at all with this setting either.
Also, when I run a test notification with just "5", the value does not change
I thought, the {remaining_duration} tag from tautulli is a placeholder and just becomes the number of minutes. With the started notification, I only see "Star Wars|, not "{Movie_title: Star Wars}".
{5}
is not a valid JSON formatted body and can't be parsed successful with my app unfortunately.
You could do a last try with JSONpath $[0]
. That could extract a number from within straight brackets like [5]
.
Alright! I also see I can manually edit the JSON Body from within Tautulli.
Does that give me more possibilities? Can I make a JSON body that works, with the {remaining_duration} tag in it?
EDIT: added screenshots
Here is a screenshot of a standard JSON body that is used on a movie start event.
Try:
{
"remaining_duration": {remaining_duration}
}
Thanks! I added that on the automatic 'Watched notification', and nothing happened. But.. When I sent the following as a test notification, it does work:
{ "remaining_duration": 5 }
So I guess the problem is with the output of the {remaining_duration} tag? Or could I try something else?
Also, is there any difference in using GET or POST for my usage? Currently I use POST (don't know why, but it works.. 👍 )
I got it! The following command works!
{ "remaining_duration": "{remaining_duration}" }
Thanks for helping, you're the best! Now the lights wil dim slowly on during the movie credits 👍
Great! Have fun!
Hi,
I want to integrate Tautulli with Homey and control my lights by doing the following. On a certain watched percentage, I let Tautulli sent a POST (WatchedPlex) to Homey, this works fine. I let Tautulli sent the following JSON data with the post:
{remaining_duration} | The remaining duration (in minutes) of the stream.
I want Homey to save the remaining time as a variable (logic of better logic) so I can use that duration for my lights. I think this should be done with the A80 card. What should I fill in?
Thanks in advance!