Hi
I am trying to send a popup notification from VeraLite to a XBMC Frodo PC but its not working, please see here
Does anyone know how to do this?
Many thanks
Hi
I am trying to send a popup notification from VeraLite to a XBMC Frodo PC but its not working, please see here
Does anyone know how to do this?
Many thanks
If I enter this URL in to Google Chrome browser I do get a pop up appearing in XBMC OK:
http://192.168.1.5:81/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Motion%20Detected%22,%22message%22:%22Front%20Door%22},%22id%22:1}
However I am unsure what to put in to the Vera scene - Luup tab.
I tried just adding
luup.inet.wget("http://192.168.1.5:81/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Motion%20Detected%22,%22message%22:%22Front%20Door%22},%22id%22:1}")
But I get a Lua error.
Thanks
Hey @cw-kid
I’m still running Eden, will try to upgrade to Frodo to see if I can help (…or install it on one of my test machines)
I believe you might be missing the:
header application/json
… in your wget statement. I’m not entirely sure where it goes in the statement. Looking around, it looks something like this:
wget -q -Oc:\users\kay\jsonrpc.log --header='Content-Type: application/json' --post-data="{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.Scan\", \"id\":1}" http://xbmc:xbmc@192.168.10.120:8050/jsonrpc
Seems to be working OK now, I built a new Linux Ubuntu XBMC PC and using the code below it sends a popup notification to XBMC.
luup.inet.wget("http://192.168.0.7:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Motion%20Detected%22,%22message%22:%22Front%20Door%22},%22id%22:1}")
Thanks
More information about this in this article on my blog
This also works on Plex Home Theatre if you change the port to 3005 ;D
If it can pop up an image from the camera or better yet a live feed of the camera, then we would be cooking!
[quote=“andyvirus, post:6, topic:173956”]This also works on Plex Home Theatre if you change the port to 3005 ;D
If it can pop up an image from the camera or better yet a live feed of the camera, then we would be cooking![/quote]
Have you got your IP cameras visible in XBMC UI ? If so how do I do that ?
Thanks
I will appreciate if some one can help and tell me how will it be the code if you want to transmit same message to two or more xbmc like two different apple TV
Thanks
[quote=“petequintanilla, post:8, topic:173956”]I will appreciate if some one can help and tell me how will it be the code if you want to transmit same message to two or more xbmc like two different apple TV
Thanks[/quote]
Thanks i noticed i was making a mistake, the correct way of doing it is
luup.inet.wget("http://192.168.11.104:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Front%20Door%20Open%22,%22message%22:%22%20%22},%22id%22:1}")
luup.inet.wget("http://192.168.11.107:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Front%20Door%20Open%22,%22message%22:%22%20%22},%22id%22:1}")
[quote=“cw-kid, post:7, topic:173956”][quote=“andyvirus, post:6, topic:173956”]This also works on Plex Home Theatre if you change the port to 3005 ;D
If it can pop up an image from the camera or better yet a live feed of the camera, then we would be cooking![/quote]
Have you got your IP cameras visible in XBMC UI ? If so how do I do that ?
Thanks[/quote]
No i just have the notification that something happened such as “garage door open”. I would love to have a feed pop up or an image but i don’t think that is possible currently.
I’ve managed to get a image to pop up in XBMC using this guide
But I cannot trigger it via vera with Json on the new XBMC Gotham v13
EDIT got it working with the following code for those interested…
luup.inet.wget("http://192.168.0.5:81/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Addons.ExecuteAddon%22,%22params%22:{%22addonid%22:%22script.doorbell%22}}")
Anyone got an image to pop up in Plex yet? I am just starting to look at this again and I am hoping someone has done this as i can’t find the solution for Plex.
I had hoped that this would work. Ill bet it does on XBMC (maybe someone with XBMC can test to make sure my syntax is correct) but it does not in Plex. I still get the text just not the image so i wonder if the Plex API does not allow for it.
So while this may not work for Plex this may help the XBMC folks if it works as an alternative to having to launch a script on the xvmc host itself.
From the JSON-RPC API:
5.5.4 GUI.ShowNotification
Shows a GUI notification
Permissions:
ControlGUI
Parameters:
string title
string message
[ mixed image = “” ]
[ integer displaytime = 5000 ]
Returns: string
http://wiki.xbmc.org/?title=JSON-RPC_API/v6#GUI.ShowNotification
Any news on this one?
Yeah, i think the only image you can use is the defined images for XBMC not custom ones. I stopped looking at it at that point so i still only have a text pop up. I don’t think there is a way using the webAPI of Plex/XBMC to use a URL.
The best solution is
you add the add on and then send the url to activate it
Anyway, the photo looks like SO SOLID!!!you know it must be maybe 10% transparent with smother edges maybe
and a little space from the bottom
Thanx anyway
I am using it
Is anyone able to tell me the syntax to insert a variable into the message? Basically I have a scene to pause XBMC when I get a phone call, so I want to push a notification to XBMC with the phone number (which is an available variable called Number).
Something like:
[code]local CallerID = luup.variable_get(“urn:hek:device:FritzBox:1”, “Number”, 24)
luup.inet.wget(“http://192.168.1.23:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22”) & CallerID & (“%22,%22message%22:%20Calling%22},%22id%22:1}”)
[/code]
That doesn’t work of course, but hopefully you get what I’m trying to do
Here’s the original for comparison:
luup.inet.wget("http://192.168.11.104:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Front%20Door%20Open%22,%22message%22:%22%20%22},%22id%22:1}")
Don’t know if this helps you?
I use Windows7 CallerID on my file server and it sends CallerID popups to XBMC using this code:
http://192.168.1.10:8080/jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"RING","message":"[name],[number]([line])","image":"[image]","displaytime":[time]},"id":1}
[quote=“cw-kid, post:17, topic:173956”]Don’t know if this helps you?
I use Windows7 CallerID on my file server and it sends CallerID popups to XBMC using this code:
http://192.168.1.10:8080/jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"RING","message":"[name],[number]([line])","image":"[image]","displaytime":[time]},"id":1}
I guess the values such as [name] etc are variables there, but the format I assume is specific to the app you’re using. I’m just not sure in what format lua wants the variable. My example above would work in VBA (about all I can code in :D), but I just need to work out the lua equivalent
I achieve this with the excellent Yatse https://play.google.com/store/apps/developer?id=Tolriq&hl=en App for Android. Sends my SMS messages with caller ID to Kodi and pauses video when someone calls my mobile and displays their caller ID card.
Best Home Automation shopping experience. Shop at Ezlo!
© 2024 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules