New version from Martin

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@325 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2009-01-12 09:21:53 +00:00
parent 5d200d9bb8
commit 5c3e3c7518
3 changed files with 64 additions and 37 deletions

View File

@ -1,6 +1,6 @@
################################################################ ################################################################
# #
# $Id: 99_getstate.pm,v 1.1 2008-12-28 14:43:45 rudolfkoenig Exp $ # $Id: 99_getstate.pm,v 1.2 2009-01-12 09:21:53 rudolfkoenig Exp $
# #
# Copyright notice # Copyright notice
# #

View File

@ -1,17 +1,21 @@
NAME
getstate.pm - Copyright (c)2008 Martin Fischer <m_fischer@gmx.de> getstate.pm - Copyright (c)2008 Martin Fischer <m_fischer@gmx.de>
Description: SYNOPSIS
The module getstate.pm extends FHEM to support a short status output
of a device. It is useful for monitoring the device in e.g. Cacti.
Installation:
Copy the script 99_getstate.pm to FHEM modules directory, e.g.
'cp 99_getstate.pm /usr/local/lib/FHEM'
and restart FHEM.
Usage:
getstate <devspec> getstate <devspec>
DESCRIPTION
The module getstate.pm extends FHEM to support a short status output of
a device. It is useful for monitoring the device in e.g. Cacti.
INSTALLATION
Copy the script 99_getstate.pm to FHEM modules directory, e.g.
'cp 99_getstate.pm /usr/local/lib/FHEM'
and restart FHEM.
EXAMPLES
Output a short string of the "READINGS" for <devspec>. Output a short string of the "READINGS" for <devspec>.
Example for a FS20-Device: Example for a FS20-Device:
@ -30,3 +34,17 @@ Usage:
FHZ> getstate NN.xx.RM.01 FHZ> getstate NN.xx.RM.01
smoke_detect:0 smoke_detect:0
CONTRIB
You can use the example script contrib/fhem-getstate as a "Data Input
Method" for your Cacti graphs.
LEGALESE
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There
is NO WARRANTY, to the extent permitted by law.
AUTHOR
Copyright (C) 2008 Martin Fischer <m_fischer@gmx.de>

View File

@ -1,29 +1,38 @@
#!/bin/bash #!/bin/bash
# #
# fhem-getstate script for reading / writing DigiTemp values # $Id: fhem-getstate,v 1.2 2009-01-12 09:21:53 rudolfkoenig Exp $
# Copyright (C) 2008 Martin Fischer <m_fischer@gmx.de>. All rights reserved.
# #
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> # Copyright notice
# #
# This is free software: you can redistribute it and/or modify # (c) 2008 Copyright: Martin Fischer (m_fischer at gmx dot de)
# All rights reserved
#
# This script free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or # the Free Software Foundation; either version 2 of the License, or
# any later version. # (at your option) any later version.
# #
# This source is distributed in the hope that it will be useful, # The GNU General Public License can be found at
# http://www.gnu.org/copyleft/gpl.html.
# A copy is found in the textfile GPL.txt and important notices to the license
# from the author is found in LICENSE.txt distributed with these scripts.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
#
################################################################
NCAT=`which netcat` NCAT=`which netcat`
HOST="localhost" HOST="localhost"
PORT="7072" PORT="7072"
VERS="$Revision: 1.2 $"
# Functions # Functions
function version { function version {
echo "fhem-getstate, Version 1.0 echo "fhem-getstate, Version$VERS
Copyright (C) 2008 Martin Fischer <m_fischer@gmx.de> Copyright (C) 2008 Martin Fischer <m_fischer@gmx.de>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. This is free software: you are free to change and redistribute it.