Difference between revisions of "MythNotification"
From MythTV Official Wiki
(Created page with "'''MythNotification''' is a simple messaging protocol, added in 0.27 in addition to the MythMessage protocol MythNotification, just like MythMessage listens on UDP port 6948,...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | '''MythNotification''' is a simple messaging protocol, added in 0.27 in addition to the MythMessage protocol | + | '''MythNotification''' is a simple messaging protocol, added in 0.27 in addition to the [[MythMessage]] protocol |
MythNotification, just like MythMessage listens on UDP port 6948, and currently accepts a single simple XML format. | MythNotification, just like MythMessage listens on UDP port 6948, and currently accepts a single simple XML format. | ||
Line 14: | Line 14: | ||
<progress>%progress%</progress> | <progress>%progress%</progress> | ||
<fullscreen>%fullscreen%</fullscreen> | <fullscreen>%fullscreen%</fullscreen> | ||
+ | <error>%error%</error> | ||
+ | <type>%type%</type> | ||
</mythnotification> | </mythnotification> | ||
</pre> | </pre> | ||
Only message_text is required; all other fields are optional. | Only message_text is required; all other fields are optional. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | * Timeout accepts an integer value in seconds before notification disappear. System default is 5s | ||
+ | * Image contains a path to image to include in the notification; a URL, myth:// or absolute path are allowed | ||
+ | * Origin contains the notification's origin value | ||
+ | * Extra contains the notification's extra text value that would be displayed when a progress bar is showing | ||
+ | * Progress Text contains the text displayed in the notification when a progress bar is showing | ||
+ | * Progress contains a floating point value between 0 and 1 indicating the progression. 1 is 100%, 0 is 0% | ||
+ | * Fullscreen contains a boolean value (true of false) indicating if the notification is to be displayed in full screen | ||
+ | * Error contains a boolean value (true or false) indicating if the notification is an error one | ||
+ | * Type contains a string with the notification type. Allowed value: normal, error, warning, check, busy. If Error is defined, this value is ignored | ||
To send the message to a single address, use bcastaddr parameter with that single IP. | To send the message to a single address, use bcastaddr parameter with that single IP. | ||
Line 34: | Line 38: | ||
These notifications can be sent manually, or using [[Mythutil]], the [[Frontend control socket]], and the [[Services API]]. | These notifications can be sent manually, or using [[Mythutil]], the [[Frontend control socket]], and the [[Services API]]. | ||
+ | |||
+ | See also [[MythMessage]] for the older MythMessage protocol | ||
[[Category:Developer Documentation]] | [[Category:Developer Documentation]] |
Latest revision as of 07:04, 14 August 2013
MythNotification is a simple messaging protocol, added in 0.27 in addition to the MythMessage protocol
MythNotification, just like MythMessage listens on UDP port 6948, and currently accepts a single simple XML format.
<mythnotification version="1"> <text>%message_text%</text> <timeout>%timeout%</timeout> <image>%image%</image> <origin>%origin%</origin> <description>%description%</description> <extra>%extra%</extra> <progress_text>%progress_text%</progress_text> <progress>%progress%</progress> <fullscreen>%fullscreen%</fullscreen> <error>%error%</error> <type>%type%</type> </mythnotification>
Only message_text is required; all other fields are optional.
- Timeout accepts an integer value in seconds before notification disappear. System default is 5s
- Image contains a path to image to include in the notification; a URL, myth:// or absolute path are allowed
- Origin contains the notification's origin value
- Extra contains the notification's extra text value that would be displayed when a progress bar is showing
- Progress Text contains the text displayed in the notification when a progress bar is showing
- Progress contains a floating point value between 0 and 1 indicating the progression. 1 is 100%, 0 is 0%
- Fullscreen contains a boolean value (true of false) indicating if the notification is to be displayed in full screen
- Error contains a boolean value (true or false) indicating if the notification is an error one
- Type contains a string with the notification type. Allowed value: normal, error, warning, check, busy. If Error is defined, this value is ignored
To send the message to a single address, use bcastaddr parameter with that single IP.
Notifications can also be sent using the mythutil tool
Example: mythutil --notification --message_text "my message" --origin "mythutil" ----timeout 5 --bcastaddr 192.168.10.11
These notifications can be sent manually, or using Mythutil, the Frontend control socket, and the Services API.
See also MythMessage for the older MythMessage protocol