Kodi Community Forum

Full Version: Popping up a message in XBMC remotely... a little help please....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I have done some research, and can not find exactly what I am looking for.

I am trying to pop up a window in XBMC remotely, with custom text passed to it. When the system is up and running, with the surround sound in the back of the house, it can be difficult to hear someone at the door at the front of the house.

I have the house automated with Home Seer, and it is capable of running scripts based on events ect. My doorbell is hooked to Home Seer, and can log when someone comes to the door, flash a light ect. I would also like to have a message pop up on XBMC when this happens.

Ideally I would like to pass "Someone is at the front door" as well as show a remote picture from the door camera in the dialog as well. (Just a still image that is captured whenever the doorbell is pressed). I can easily save the image to a network location with the same name to be used each time... something like Someoneatthedoor.jpg.

I also receive Caller ID with Home Seer, and would like to be able to pass this as a pop up as well when the phone rings.

This is the closest I could get with my research and digging through the online help documentation:

Code:
htt p://192.168.1.96:8088/xbmcCmds/xbmcHttp?command=ExecBuiltIn;Notification(Information!,This is a test notification)
I based the above on what I found in the debug log after passing an event with XBMC Notifier v1.0.1:
23:33:01 T:5268 M:1916645376 DEBUG: HttpApi Start command: ExecBuiltIn paras: ExecBuiltIn; Notification(Information!,This is a test notification)

Using that program pops up a 200 x 100 or so dialog box in the lower right corner with that text.

This is of course the debug log, and does not show the correct syntax of what was sent to XBMC.

How can I have a window or dialog pop up with custom text?
the proper way to figure this out is to use the wiki. You'll see you need to use the http api to execute a builtin :

http://wiki.xbmc.org/?title=WebServerHTT...e_Commands
http://wiki.xbmc.org/?title=List_of_Built_In_Functions

but... you're close with what you've put together, so I'll just tell you

instead of ExecBuiltIn;Notification() you want ExecBuiltIn(Notification())
I looked through the Wiki, and that is where I was able to get the "ExecBuiltIn" command.

With your help, I tried your alterations, and came up with this:

Code:
http://192.168.1.96:9777/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(testing,testing123))
Which is now working perfectly, so thank you!

I just did a test, and it passes the info, as well as a capture of the door cam. It is really tiny though to try to determine who is at the door. It could be a friend, or a vacuum salesman by looking at the thumbnail Big Grin

I do not see a set of parameters for the X,Y positioning, nor the size of the window.... Searching through all text in the xml's also failed to turn up any XML's containing "notification"..... Is there any way to change the size and positioning of this dialog window, or is that internal to the core code?

Here is a screen cap of what I have so far, when someone approaches the door, the motion sensor sends a Signal to Home Seer, it then relays the info to XBMC. All in all, there is about a 1 second delay, which is totally acceptable.

Image
JohnWPB Wrote:Is there any way to change the size and positioning of this dialog window, or is that internal to the core code?
One of the real developers may wish to correct me if I'm mistaken, but I believe this is skin-specific. Look in the DialogKaiToast.xml file for <control type="image" id="400">
JohnWPB Wrote:Here is a screen cap of what I have so far, when someone approaches the door, the motion sensor sends a Signal to Home Seer, it then relays the info to XBMC. All in all, there is about a 1 second delay, which is totally acceptable.

You could try the EventClients otherwise, they are able to send Notifications. The wrappings is available in C/C++ Python and Java.

look on linuxbranch svn in tools/EventClients/examples/PROGRAMMINGLAUNGUAGE/
And there should be a example_notification in these.

They are very responsive and the gui message should popup way faster than a second on the home network.

Cheers,
Tobias
Man that is killer. I like it. Talk about getting creative with your TV.
canyonquest Wrote:One of the real developers may wish to correct me if I'm mistaken, but I believe this is skin-specific. Look in the DialogKaiToast.xml file for <control type="image" id="400">

You my friend are NOT mistaken! Thank you, thank you thank you!!! I would have never figured out where to look for that! I would not begin to think that the image description would have been named "avatar".

It is working perfectly now! The below screen capture is what it now actually looks like. I didn't run outside to trip the motion sensor, I just fired the command manually Smile At night, the motion sensor also trips a light above the door, so whoever is there will still be visible.

Image

In case anyone else stumbling across this post wants to know how it is done, here are the changes to the DialogKaiToast.XML:

PHP Code:
<control type="group">
            <
control type="image">
                <
posx>-20</posx>
                <
posy>-100</posy>
                <
width>440</width>
                <
height>160</height>
                <
colordiffuse>DDFFFFFF</colordiffuse>
                <
texture>black-back.png</texture>
                <
bordertexture border="3">NoCover_1.png</bordertexture>
                <
bordersize>4</bordersize>
            </
control>
            <
control type="image" id="400">
                <
description>avatar</description>
                <
posx>-20</posx>
                <
posy>-90</posy>
                <
width>220</width>
                <
height>140</height>
                <
aspectratio>keep</aspectratio>
                <
texture>DefaultFileBig.png</texture>
            </
control>
            <
control type="label" id="401">
                <
description>Line 1 Label</description>
                <
posx>230</posx>
                <
posy>-40</posy>
                <
width>330</width>
                <
height>18</height>
                <
font>font22</font>
                <
textcolor>green</textcolor>
                <
align>left</align>
                <
aligny>center</aligny>
            </
control>
            <
control type="label" id="402">
                <
description>Line 2 Label</description>
                <
posx>215</posx>
                <
posy>-20</posy>
                <
width>330</width>
                <
height>20</height>
                <
font>font10</font>
                <
align>left</align>
                <
aligny>center</aligny>
            </
control>
        </
control
genius, pure genius... great idea, sorry for not adding anything relivant to your thread, just wanted to say kudos!
Hehehe thanks for the kudos... Yea, with the remote messaging to XBMC, some really cool stuff can be done for sure!
What's the correct parameter for setting an image in the notification dialogue?

I've tried using:
command=ExecBuiltIn(Notification(title,message,60000,c:/image.jpg))
command=ExecBuiltIn(Notification(title,message,60000,c:\image.jpg))
command=ExecBuiltIn(Notification(title,message,60000,(c:\image.jpg)))
command=ExecBuiltIn(Notification(title,message,60000,http://imageurl/image.jpg))

I can't find any information regarding this, if anyone can enlighten me... (I'm using the MediaStream skin).

Thanks

Seri
I'm having a strange issue and I was hoping someone could point out something I'm missing. I'm sending commands from a control processor directly to the xbox with a "GET" command. All my other http commands seem to work this way but this doesn't. the string I'm sending is

GET /xbmcCmds/xbmcHttp?command=ExecBuiltIn(XBMC.Notification(Alert!,Water Leak in Basement,[,20,]))

but it doesn't work. If I send

192.168.1.201/xbmcCmds/xbmcHttp?command=ExecBuiltIn(XBMC.Notification(Alert!,Water Leak in Basement,[,20,]))

from a web browser it works fine, but for some reason a direct connection from my control processor doesn't. Any ideas?
salnajjar Wrote:What's the correct parameter for setting an image in the notification dialogue?

This is the line I am using:
Code:
http://192.168.1.96:9777/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(ATTENTION,Someone is at the front door,6000,C:\FrontDoor.jpg))
smcnally75 Wrote:I'm sending commands from a control processor directly to the xbox with a "GET" command. All my other http commands seem to work this way but this doesn't.

I have no idea how the get command works, but it could be doing just that "getting" the page, and not actually loading it?
JohnWPB, it might be a matter of escaping it, plus, I noticed your syntax seems a little off.

I just used wget from my remote linux server to my windows XBMC box, with the precise command:
Code:
wget http://192.168.1.105/xbmcCmds/xbmcHttp?command=ExecBuiltIn\(Notification\(Alert\!,Water\ Leak\ in\ Basement,20000\)\)
This worked fine and was most definately a 'get' request.
JohnWPB Wrote:This is the line I am using:
Code:
http://192.168.1.96:9777/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(ATTENTION,Someone is at the front door,6000,C:\FrontDoor.jpg))


I have no idea how the get command works, but it could be doing just that "getting" the page, and not actually loading it?

The GET command is basically a way to retrieve a webpage by way of command line. It does work for all of the other HTTP commands I've used so far so I'm confused as to why this one isn't working. I did just notice that you have no brackets in your command though so I will try that.
salnajjar Wrote:JohnWPB, it might be a matter of escaping it, plus, I noticed your syntax seems a little off.

I just used wget from my remote linux server to my windows XBMC box, with the precise command:
Code:
wget http://192.168.1.105/xbmcCmds/xbmcHttp?command=ExecBuiltIn\(Notification\(Alert\!,Water\ Leak\ in\ Basement,20000\)\)
This worked fine and was most definately a 'get' request.

That's interesting. What's the reason for all the back slashes? I'll try it tonight.
Pages: 1 2 3