notice [confirm [value]|list [<keyword>]|reset [yes]|view <id> [noheader|[de|en]]]
notice
' a list of all messages is displayed.
Are messages available in different languages, they are ordered by language.
fhem> notice
==> Language: de
ID Published Expired Confirmed Description
advice-20130128-002 actually never not needed kurze beschreibung
update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
==> Language: en
ID Published Expired Confirmed Description
advice-20130128-001 actually never no short description
advice-20130128-002 actually never not needed short description
update-20130128-001 actually never no short description
update-20130128-002 31.01.2013 01.02.2013 no short description
By entering 'notice list <keyword>
' the output of the list contains only
available messages that starts with '<keyword>
'.
fhem> notice list update
==> Language: de
ID Published Expired Confirmed Description
update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
==> Language: en
ID Published Expired Confirmed Description
update-20130128-001 actually never no short description
update-20130128-002 31.01.2013 01.02.2013 no short description
To display a single message, enter the command 'notice view <id>
' where id
is the Identifier of the message. You can use the optional parameter noheader
or the language codes de
or en
to display the message
without the header informations or in your prefered language if available.
fhem> notice view advice-20130128-002 de
ID : advice-20130128-002
From : M. Fischer
Date : 28.01.2013
Expire : 0
Title : kurze beschreibung
### Start of Text
test-advice
dies ist ein test
001
### End of Text
If it is necessary to confirm a message, this is be done by entering 'notice confirm <id> [value]
'.
The optional argument value
will also be stored with the confirmation.
fhem> notice confirm update-20130128-001 foo:bar
update-20130128-001 confirmed on 2013-01-29 20:58:57: foo:bar
Sometimes it is necessary to reset all confirmations. This is be done by entering
'notice reset
'.
fhem> notice reset
This command delete all confirmations.
If you really want to do this, call 'notice reset yes'
notice [condition <id>|get <keyword> <value>|position <id>]
condition
supplies the determined
value(s) of the embedded test(s) as a key:value pair. If more than one pair returned, they they are seperated by |
.
It is possible to define your own rules for a condition, like !empty
or >>5
and so on. An example
of a condition is shown in the below example message file.
Example:
fhem> notice condition update-20130127-001
configfile:./fhem.cfg|sendStatistics:never:!empty
The argument get
, followed by a keyword
and a number from 0 to 8, returns a
comma seperated list of message ids.
The possible outputs are:
0 returns a list of all messages.
1 returns a list of unconfirmed messages.
2 returns a list of messages that are not expired.
3 returns a list of messages that are not expired and unconfirmed.
4 returns a list of published messages.
5 returns a list of unconfirmed and published messages.
6 returns a list of published messages that are not expired.
7 returns a list of published, unconfirmed and not expired messages.
8 returns a list of confirmed messages.
fhem> notice get all 2
advice-20130128-001,advice-20130128-002,update-20130128-001,update-20130128-002
The argument position
followed by an <id>
returns the view position of a message if defined.
fhem> notice position update-20130128-001
before
Example of a message file:
# FROM: M. Fischer
# DATE: 28.01.2013
# CONFIRM: 1
# PUBLISH: 31.01.2013
# EXPIRE: 01.02.2013
# KEY_1: sendStatistics
# VAL_1: AttrVal("global","sendStatistics",undef);
# CON_1: !empty
# KEY_2: configfile
# VAL_2: AttrVal("global","configfile",undef);
# POSITION: top
# TITLE_DE: kurze beschreibung
# NOTICE_DE
Hinweis:
dies ist ein test
# TITLE_EN: short description
# NOTICE_EN
Advice:
this is a test
The keywords 'FROM, DATE, CONFIRM, PUBLISH, EXPIRE, TITLE_DE, TITLE_EN, NOTICE_DE, NOTICE_EN
' are fixed.
It is possible to add any key:value string to these files. Also it is possible to set only one or both keywords of
'TITLE_DE, TITLE_EN
' and 'NOTICE_DE, NOTICE_EN
'.