MrMackey 26 Posted May 2, 2023 Share Posted May 2, 2023 @LukeI could even with the help of chatgpt unfortunately not create a template condition in Home Assistant with which I successfully pass only the requests from a particular device. Can you help me there? Link to comment Share on other sites More sharing options...
Spaceboy 2494 Posted May 2, 2023 Share Posted May 2, 2023 why wouldnt you just do it all in Home Assistant? Automation 1 1 Link to comment Share on other sites More sharing options...
MrMackey 26 Posted May 6, 2023 Share Posted May 6, 2023 At the moment I do it exactly like this but, If you change profile on Emby, or turn off, and turn back on later, HomeAssistant keeps the "Idle" state and no longer detects the switch to Play, Stop, etc.... The only way to get the correct state is to restart the HA Core. Therefore I would rather do it with webhooks. Link to comment Share on other sites More sharing options...
seanbuff 840 Posted May 7, 2023 Share Posted May 7, 2023 2 hours ago, MrMackey said: HomeAssistant keeps the "Idle" state and no longer detects the switch to Play, Stop, etc.... That doesn't sound right. Previous HA versions had this problem but that should no longer be an issue with current HA release. When was the last time you tried this tied to your "Emby" media player entity? 1 Link to comment Share on other sites More sharing options...
MrMackey 26 Posted May 7, 2023 Share Posted May 7, 2023 Thanks for the information, I use the Home Asistant entity all the time. The last time it occurred was about 3-4 weeks ago. It would be great if the bug was fixed, I'll keep an eye on it and see if it happens again with the current version. Link to comment Share on other sites More sharing options...
Spaceboy 2494 Posted May 7, 2023 Share Posted May 7, 2023 ive been using this for around a year i think. never had a problem yet Link to comment Share on other sites More sharing options...
MrMackey 26 Posted May 7, 2023 Share Posted May 7, 2023 I was just able to reproduce the problem again, maybe someone else can confirm it. When I restart Home Assistant while my server with Emby is offline and then I start the Emby server and watch a movie, the "Emby" media player entity does not work. Only when I restart Home Assistant again while my server with Emby is on, it works. Home Assistant version is 2023.5.2 Link to comment Share on other sites More sharing options...
seanbuff 840 Posted May 7, 2023 Share Posted May 7, 2023 48 minutes ago, MrMackey said: When I restart Home Assistant while my server with Emby is offline Maybe because my servers are never really offline is the reason I haven't experienced this problem. Sounds like the Emby integration on the HA side needs a more resilient heartbeat check (which is unofficially developed by a third party) - probably best asking the question in the HA forums. 1 Link to comment Share on other sites More sharing options...
MrMackey 26 Posted May 8, 2023 Share Posted May 8, 2023 (edited) To come back to my question how to search in Home assistant In a condition for the device name in the webhook I found after hours with chat gtp a solution In this case nvidia-shield-living-room is my device name: {{ trigger.data['data'] is match('.*nvidia-shield-living-room.*') }} As I understand it, the code only looks for the word "nvidia-shield-living-room". Unfortunately I didn't manage to filter it so far that really the DeviceName has to be like that. Edited May 8, 2023 by MrMackey Link to comment Share on other sites More sharing options...
Luke 37096 Posted May 8, 2023 Author Share Posted May 8, 2023 45 minutes ago, MrMackey said: To come back to my question how to search in Home assistant In a condition for the device name in the webhook I found after hours with chat gtp a solution In this case nvidia-shield-living-room is my device name: {{ trigger.data['data'] is match('.*nvidia-shield-living-room.*') }} As I understand it, the code only looks for the word "nvidia-shield-living-room". Unfortunately I didn't manage to filter it so far that really the DeviceName has to be like that. Are you sure the device name has dashes like that? Link to comment Share on other sites More sharing options...
MrMackey 26 Posted May 8, 2023 Share Posted May 8, 2023 Yes I called it that. In the webhook it is also like this: "DeviceName":"nvidia-shield-living-room" 1 Link to comment Share on other sites More sharing options...
MrMackey 26 Posted May 10, 2023 Share Posted May 10, 2023 After I had a little time to experiment again. I think this solution does exactly what I wanted to achieve. {{ 'DeviceName":"nvidia-shield-living-room' in trigger.data['data'].decode('utf-8') }} 1 Link to comment Share on other sites More sharing options...
svyaznoy362 11 Posted May 19, 2023 Share Posted May 19, 2023 (edited) 30.03.2023 в 21:32, svyaznoy362 сказал: Перед обновлением { "Title": "Новая Подземка на Emby Server", что он использовал сюжетную линию фильма «<a href=\"/film/18511/\" class=\"all\">На последней дыхании</a>» ( 1960).</li><li>Первоначально пару главных героев должны были играть <a href=\"/name/4913/\" class=\"all\">Стинг</a> и <a href=\ " /name/15595/\" class=\"all\">Шарлотта Рэмплинг</a>. Отказ звезд вынудил <a href=\"/name/24505/\" class=\"all\">Люка Бессона</a> взять на эти роли <a href=\"/name/86847/\" class=\ "all\">Изабель Аджани</a> и <a href=\"/name/3347/\" class=\"all\">Кристофера Ламберта</a>.</li><li> Сценарий фильма был плод «коллективного творчества» пяти друзей <a href=\"/name/24505/\" class=\"all\">Люка Бессона</a>, включая самого режиссера. Прикосновение к исполнению главной роли — Фреда.Образец, созданный <a href=\"/name/3347/\" class=\"all\">Ламбертом</a>, совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков. На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма. На художественной картине ткани, как представляется, это не происходит, но некоторые сюжетные линии естественным образом меняются или недостаточно раскрываются.</li></ul>", Прикосновение к исполнению главной роли — роль Фреда. Образец, созданный <a href=\" /name/3347/\" class=\"all\">Ламбертом</a>,На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма. На художественной картине ткани, как представляется, это не происходит, но некоторые сюжетные линии естественным образом меняются или недостаточно раскрываются.</li></ul>", Прикосновение к исполнению главной роли — роль Фреда. Образец, созданный <a href=\" /name/3347/\" class=\"all\">Ламбертом</a>, совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков.На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма. На художественной картине ткани, как видно, это не происходит, но некоторые сюжетные линии естественно изменёнными или недостаточно раскрываемыми.</li></ul>", совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков. На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма.На художественной картине ткани, как видно, это не происходит, но некоторые сюжетные линии естественно изменёнными или недостаточно раскрываемыми.</li></ul>", совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков. На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма . непроисходит, но некоторые сюжетные линии обычно изменёнными или недостаточно раскрытыми.</li></ul>", «Дата»: «2023-03-27T09:16:47.1341078Z», «Событие»: «library.new», «Элемент»: { «Имя»:«Подземка», «OriginalTitle»: «Метро», «Идентификатор сервера»: «e9ef940b2d214a18991f98683144c466», «Id»: «680866», «DateCreated»: «2023-03-27T09:13:59.5180000Z», «Контейнер»: «mkv», "SortName": "Подземка", "PremiereDate" : "1985-04-10T00:00:00.0000000Z", "Внешние URL": [ { "Имя": "IMDb", "Url": "https://www .imdb.com/title/tt0090095" }, { "Имя": "КинопоискРу", "Url": "https://www.kinopoisk.ru/film/14305/" }, { "Имя": "TheMovieDb", "Url": "https://www.themoviedb.org/movie/10656" }, { "Name": "TheTVDB", "Url": "https://thetvdb.com/dereferrer/movie/4524" }, { "Name": "Trakt", "Url": "https://trakt. tv/search/tmdb/10656?id_type=movie" } ], "CriticRating" : 56, "Путь": "/volume1/GDRIVE/362/Film/3D/MKV/Subway.1985 (kp-14305) (14.4G ).mkv", "r", что он использовал сюжетную линию фильма «<a href=\"/film/18511/\" class=\"all\">На последней Официальной дыхании</a>» (1960).</li><li>изначально пару главных героев должны были играть <a href=\"/name/4913/\" class=\"all\">Стинг</a> и <a href=\ "/name/15595/\" class=\ "all\">Шарлотта Рэмплинг</a>.Отказ звезд вынудил <a href=\"/name/24505/\" class=\"all\">Люка Бессона</a> взять на эти роли <a href=\"/name/86847/\" class=\ "all\">Изабель Аджани</a> и <a href=\"/name/3347/\" class=\"all\">Кристофера Ламберта</a>.</li><li>Сценарий фильма был «плодколлективного творчества» пяти друзей <a href=\"/name/24505/\" class=\"all\"> Люка Бессона</a>, включая самого режиссера. Прикосновение к исполнению главной роли — Фреда. Образец, созданный <a href=\"/name/3347/\" class=\"all\">Ламбертом</a>, совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков.На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма. На художественной картине ткани, как представляется, это не происходит, но некоторые сюжетные линии естественным образом меняются или недостаточно раскрываются.</li></ul>", Прикосновение к исполнению главной роли — роль Фреда. Образец, созданный <a href=\" /name/3347/\" class=\"all\">Ламбертом</a>, совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков.На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма. На художественной картине ткани, как представляется, это не происходит, но некоторые сюжетные линии естественным образом меняются или недостаточно раскрываются.</li></ul>", Прикосновение к исполнению главной роли — роль Фреда. Образец, созданный <a href=\" /name/3347/\" class=\"all\">Ламбертом</a>, совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков.На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма. На художественной картине ткани, как видно, это не происходит, но некоторые сюжетные линии естественно изменёнными или недостаточно раскрываемыми.</li></ul>", совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков. На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма.На художественной картине ткани, как видно, это не происходит, но некоторые сюжетные линии естественно изменёнными или недостаточно раскрываемыми.</li></ul>", совместл в себе черты «Маленького Принца и Безумного Макса», отсюда и мотивация его поступков. На память о будущем главного героя блондинистую панк-прическу и одержимость музыкой.</li><li>Полный хронометраж фильма был на 40 минут больше, но продюсеры задумали укоротить для проката время показа фильма . непроисходит, но некоторые сюжетные линии закономерно изменёнными или недостаточно выявленными.</li></ul>", «Тэглайны»: [ «Андерграундная история, в которой переплетаются жизни» ], «Жанры»:[ «триллер» ], «Рейтинг отзывов»: 6.5, «RunTimeTicks»: 61404800000, «Размер»: 15419566433, «Имя файла»: «Метро. 1985 (kp-14305) (14.4G).mkv", "Битрейт": 20089069, "ProductionYear": 1985, "RemoteTrailers": [ { "Url": "https://www.youtube.com/watch?v =PdOigVX4b7I" } ], "ProviderIds": { "КинопоискРу": "14305", "Imdb": "tt0090095", "Tmdb": "10656", "Tvdb": "4524" }, "IsFolder": { "Имя": "Гомон", "Идентификатор": 408207 }, { "Имя": "Les Films du Loup", "Id": 602833 }, { "Имя": "TSF Productions", "Id": 680897 }, { "Name": "TF1 Films Production", "Id": 402271 } ], "GenreItems": [ { "Имя": "триллер", "Id": 729 } ], «TagItems»: [], «PrimaryImageAspectRatio»: 0,6666666666666666, «ImageTags»: { «Primary»: «7ea89f4a7b46cc0d18b746e8a34e6abf» }, «BackdropImageTags»: [ «aed4a721529e72345ee0d545b06 7762f» ], «MediaType»: «Видео», «Ширина» : 1920, «Высота»: 816 }, « Сервер»: { «Имя»: «Xpenology362», «Идентификатор»: «e9ef940b2d214a18991f98683144c466», «Версия»: «4.8.0.26» } } Опять тоже самое с версией 4.8.0.34 , не могу сделать фото You made changes, had to edit the script, now the problem is solved Edited May 19, 2023 by svyaznoy362 1 Link to comment Share on other sites More sharing options...
Luke 37096 Posted August 31, 2023 Author Share Posted August 31, 2023 @roaku @BillOatman @rechigo @GrimReaper @ryzilla @Loefamily @johnnycash @adminExitium For those hoping to use WebHooks with Discord, I've pushed an update to the plugin catalog for the WebHooks plugin to allow you to configure the request content type, which you can now set to either application/json or multipart form data. This should make it a little more Discord-friendly. The update is targeting the 4.8 beta server so you'll need that to test it. Please try it out and report your experience. Thanks. 1 1 Link to comment Share on other sites More sharing options...
vaise 307 Posted August 31, 2023 Share Posted August 31, 2023 (edited) Anything special instructions here - as I just added my known working webhook and it fails the test. I only started using the custom discord plugin a few days ago too..... Edited August 31, 2023 by vaise Link to comment Share on other sites More sharing options...
Luke 37096 Posted August 31, 2023 Author Share Posted August 31, 2023 8 minutes ago, vaise said: Anything special instructions here - as I just added my known working webhook and it fails the test. I only started using the custom discord plugin a few days ago too..... If you're using the dedicated plugin then you probably don't need to have webhooks sending data to discord as well. Webhook users have requested the ability to use plain application/json requests instead of multi-part requests, so that's what I added and put an option in the dialog. Link to comment Share on other sites More sharing options...
vaise 307 Posted August 31, 2023 Share Posted August 31, 2023 3 minutes ago, Luke said: If you're using the dedicated plugin then you probably don't need to have webhooks sending data to discord as well. Webhook users have requested the ability to use plain application/json requests instead of multi-part requests, so that's what I added and put an option in the dialog. No worries. I was just testing it out, I’d prefer to use stock emby stuff where possible and if this is working, I will remove the discord plugin. But the webhooks update is failing the test. I’m pasting in the same url that works on discord plug-in and copied straight from discord server. Link to comment Share on other sites More sharing options...
Luke 37096 Posted August 31, 2023 Author Share Posted August 31, 2023 18 minutes ago, vaise said: No worries. I was just testing it out, I’d prefer to use stock emby stuff where possible and if this is working, I will remove the discord plugin. But the webhooks update is failing the test. I’m pasting in the same url that works on discord plug-in and copied straight from discord server. I don't even know if that's supposed to be possible or not. The discord plugin doesn't send the same thing that webhooks sends, so maybe they need different urls. Or maybe you have to do some work on the discord side to interpret the data. The format of the Emby webhook json is our owns, so I would imagine you'd have to tell Discord how to understand it. Link to comment Share on other sites More sharing options...
vaise 307 Posted August 31, 2023 Share Posted August 31, 2023 4 minutes ago, Luke said: I don't even know if that's supposed to be possible or not. The discord plugin doesn't send the same thing that webhooks sends, so maybe they need different urls. Or maybe you have to do some work on the discord side to interpret the data. The format of the Emby webhook json is our owns, so I would imagine you'd have to tell Discord how to understand it. Ok, if that’s it then the discord plugin is def required then. All others apps are just a copy/past in from discord and just work (every app that sends a message). I don’t have the skills to do anything with discord. Link to comment Share on other sites More sharing options...
Luke 37096 Posted August 31, 2023 Author Share Posted August 31, 2023 7 minutes ago, vaise said: Ok, if that’s it then the discord plugin is def required then. All others apps are just a copy/past in from discord and just work (every app that sends a message). I don’t have the skills to do anything with discord. They probably built something tailored for discord. The emby webhooks is generalized. The receiver needs to know how to work with the data. Link to comment Share on other sites More sharing options...
dual-o 19 Posted September 25, 2023 Share Posted September 25, 2023 On 11/28/2022 at 7:41 PM, Luke said: OK yes in some cases it still may get sent sooner than it should. We'll look into it. Thanks. Hello @Luke, I played with webhooks last week and the issue with too early webhook sending / missing informations is still preset in the current stable. Have you planned an update with version 4.8? Thanks in advance Link to comment Share on other sites More sharing options...
Luke 37096 Posted September 25, 2023 Author Share Posted September 25, 2023 3 hours ago, dual-o said: Hello @Luke, I played with webhooks last week and the issue with too early webhook sending / missing informations is still preset in the current stable. Have you planned an update with version 4.8? Thanks in advance Hi, this should be improved in the 4.8 release. Thanks. 1 Link to comment Share on other sites More sharing options...
mbfubu456 4 Posted September 28, 2023 Share Posted September 28, 2023 Hi @Luke I am new to Emby but I love it, great work! In order to get notifications of new item added to a specific library, I use webhook with Notifiarr/Discord and I do get notifications but not only for the library folder (say “Movies 4K”) I specified in the webhook settings but from all my library folders (for example “Series”, “Series 4K”, “Movies SD” etc.). In the webhook settings, I check the “Library/New Media Added” box and I specifically limit the library events to a specific folder but no joy. Is it a known issue that will be addressed in a future update? If not, could you take a look at it please? Thank you! (Sorry if I needed to create a new topic but it seems logical to post this here) Link to comment Share on other sites More sharing options...
Luke 37096 Posted September 28, 2023 Author Share Posted September 28, 2023 18 minutes ago, mbfubu456 said: Hi @Luke I am new to Emby but I love it, great work! In order to get notifications of new item added to a specific library, I use webhook with Notifiarr/Discord and I do get notifications but not only for the library folder (say “Movies 4K”) I specified in the webhook settings but from all my library folders (for example “Series”, “Series 4K”, “Movies SD” etc.). In the webhook settings, I check the “Library/New Media Added” box and I specifically limit the library events to a specific folder but no joy. Is it a known issue that will be addressed in a future update? If not, could you take a look at it please? Thank you! (Sorry if I needed to create a new topic but it seems logical to post this here) HI, yes this is resolved in the upcoming 4.8 server release. Workaround in the meantime is to not use the library filter. Link to comment Share on other sites More sharing options...
mbfubu456 4 Posted September 28, 2023 Share Posted September 28, 2023 Thanks a lot for the reply! Can't wait for 4.8 to be released. Cheers 2 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now