mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
new module 35_SWAP_0000002200000008 for panstamp indoor multi sensor board with tft
git-svn-id: https://svn.fhem.de/fhem/trunk@5654 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ebe4367e5c
commit
a00c30a6a2
@ -1,6 +1,8 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
- SVN
|
- SVN
|
||||||
|
- feature: new module 35_SWAP_0000002200000008 for panstamp
|
||||||
|
indoor multi sensor board with tft
|
||||||
- added: new module 36_EC3000.pm (justme1968)
|
- added: new module 36_EC3000.pm (justme1968)
|
||||||
- feature: IT: added support for set-extensions (justme1968)
|
- feature: IT: added support for set-extensions (justme1968)
|
||||||
- added: new modules 10_Itach_IR and 88_Itach_IRDevice to
|
- added: new modules 10_Itach_IR and 88_Itach_IRDevice to
|
||||||
|
117
fhem/FHEM/35_SWAP_0000002200000008.pm
Executable file
117
fhem/FHEM/35_SWAP_0000002200000008.pm
Executable file
@ -0,0 +1,117 @@
|
|||||||
|
|
||||||
|
# $Id$
|
||||||
|
package main;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use constant { REG_DESIRED => '0D',
|
||||||
|
REG_TEXT => '0E', };
|
||||||
|
|
||||||
|
sub
|
||||||
|
SWAP_0000002200000008_Initialize($)
|
||||||
|
{
|
||||||
|
my ($hash) = @_;
|
||||||
|
|
||||||
|
require "$attr{global}{modpath}/FHEM/34_SWAP.pm";
|
||||||
|
|
||||||
|
$hash->{SWAP_SetFn} = "SWAP_0000002200000008_Set";
|
||||||
|
$hash->{SWAP_SetList} = { desired => 1,
|
||||||
|
text => undef, };
|
||||||
|
#$hash->{SWAP_GetFn} = "SWAP_0000002200000008_Get";
|
||||||
|
#$hash->{SWAP_GetList} = { };
|
||||||
|
#$hash->{SWAP_ParseFn} = "SWAP_0000002200000008_Parse";
|
||||||
|
|
||||||
|
my $ret = SWAP_Initialize($hash);
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
SWAP_0000002200000008_Parse($$$$)
|
||||||
|
{
|
||||||
|
my ($hash, $reg, $func, $data) = @_;
|
||||||
|
my $name = $hash->{NAME};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
SWAP_0000002200000008_Set($@)
|
||||||
|
{
|
||||||
|
my ($hash, $name, $cmd, $arg, $arg2, $arg3) = @_;
|
||||||
|
|
||||||
|
if( $cmd eq "desired" ) {
|
||||||
|
$arg += 50;
|
||||||
|
$arg *= 10;
|
||||||
|
my $value = sprintf( "%04X", int($arg) );
|
||||||
|
return( "regSet", REG_DESIRED, $value );
|
||||||
|
} elsif( $cmd eq "text" ) {
|
||||||
|
my $text = "000000000000000000000000000000000000000000000000";
|
||||||
|
$arg .= " ". $arg2 if( defined($arg2) );
|
||||||
|
$arg .= " ". $arg3 if( defined($arg3) );
|
||||||
|
for( my $i = 0; $i < length($arg); ++$i) {
|
||||||
|
last if( $i >= 18 );
|
||||||
|
substr( $text, 2*$i, 2, sprintf( "%02X", ord(substr($arg, $i, 1) ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return( "regSet", REG_TEXT, "FFFE" . "02" . $text );
|
||||||
|
}
|
||||||
|
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
SWAP_0000002200000008_Get($@)
|
||||||
|
{
|
||||||
|
my ($hash, $name, $cmd, @a) = @_;
|
||||||
|
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
=begin html
|
||||||
|
|
||||||
|
<a name="SWAP_0000002200000008"></a>
|
||||||
|
<h3>SWAP_0000002200000008</h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<tr><td>
|
||||||
|
Module for the justme version of the panstamp indoor multi sensor board (sketch product code 0000002200000008).
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<a name="SWAP_0000002200000008_Define"></a>
|
||||||
|
<b>Define</b>
|
||||||
|
<ul>
|
||||||
|
<code>define <name> SWAP_0000002200000008 <ID> 0000002200000008</code> <br>
|
||||||
|
<br>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="SWAP_0000002200000008_Set"></a>
|
||||||
|
<b>Set </b>
|
||||||
|
all SWAP set commands and:
|
||||||
|
<ul>
|
||||||
|
<li>desired <value><br>
|
||||||
|
sets the desired temperature to <value></li>
|
||||||
|
<li>text <text><br>
|
||||||
|
displays text</li>
|
||||||
|
</ul><br>
|
||||||
|
|
||||||
|
<a name="SWAP_0000002200000008_Get"></a>
|
||||||
|
<b>Get</b>
|
||||||
|
all SWAP get commands and:
|
||||||
|
<ul>
|
||||||
|
</ul><br>
|
||||||
|
|
||||||
|
<a name="SWAP_0000002200000008_Attr"></a>
|
||||||
|
<b>Attributes</b>
|
||||||
|
<ul>
|
||||||
|
<li>ProductCode<br>
|
||||||
|
must be 0000002200000008</li><br>
|
||||||
|
</ul><br>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
=end html
|
||||||
|
=cut
|
@ -108,6 +108,7 @@ FHEM/32_speedtest.pm justme1968 http://forum.fhem.de Sonstiges
|
|||||||
FHEM/34_panStamp.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
FHEM/34_panStamp.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
||||||
FHEM/34_SWAP.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
FHEM/34_SWAP.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
||||||
FHEM/35_SWAP_0000002200000003.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
FHEM/35_SWAP_0000002200000003.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
||||||
|
FHEM/35_SWAP_0000002200000008.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
||||||
FHEM/36_EC3000.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
FHEM/36_EC3000.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
||||||
FHEM/36_JeeLink.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
FHEM/36_JeeLink.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
||||||
FHEM/36_PCA301.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
FHEM/36_PCA301.pm justme1968 http://forum.fhem.de Sonstige Systeme
|
||||||
|
Loading…
x
Reference in New Issue
Block a user