Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
3a1812be
Commit
3a1812be
authored
Mar 02, 2016
by
davide
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added dmled and dmled4 auto-configuration
parent
fda243e2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
1 deletion
+113
-1
DMLed.py
domotika/boards/modules/DMLed.py
+56
-0
DMLed4.py
domotika/boards/modules/DMLed4.py
+56
-0
ikapserver.py
domotika/ikapserver.py
+1
-1
No files found.
domotika/boards/modules/DMLed.py
0 → 100644
View file @
3a1812be
###########################################################################
# Copyright (c) 2011-2014 Unixmedia S.r.l. <info@unixmedia.it>
# Copyright (c) 2011-2014 Franco (nextime) Lanza <franco@unixmedia.it>
#
# Domotika System Controller Daemon "domotikad" [http://trac.unixmedia.it]
#
# This file is part of domotikad.
#
# domotikad is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from
domotika.boards
import
iboards
from
domotika.boards.boardtype
import
BaseBoard
,
ANABoard
,
INPBoard
,
OUTBoard
from
zope.interface
import
implements
from
twisted.plugin
import
IPlugin
try
:
import
hashlib
md5
=
hashlib
md5
.
new
=
hashlib
.
md5
sha1
=
hashlib
.
sha1
except
:
import
md5
import
sha1
class
DMBoard
(
INPBoard
,
ANABoard
,
OUTBoard
,
BaseBoard
):
hasAnalogs
=
False
hasOutputs
=
False
hasInputs
=
True
hasRelays
=
False
hasAmperometers
=
False
fwtype
=
'rgbled'
numInp
=
3
class
Board
(
object
):
implements
(
IPlugin
,
iboards
.
IDMBoards
)
def
getBoard
(
self
,
host
,
port
,
pwd
,
lang
):
return
DMBoard
(
self
.
core
,
host
,
port
,
pwd
,
lang
)
board
=
Board
()
domotika/boards/modules/DMLed4.py
0 → 100644
View file @
3a1812be
###########################################################################
# Copyright (c) 2011-2014 Unixmedia S.r.l. <info@unixmedia.it>
# Copyright (c) 2011-2014 Franco (nextime) Lanza <franco@unixmedia.it>
#
# Domotika System Controller Daemon "domotikad" [http://trac.unixmedia.it]
#
# This file is part of domotikad.
#
# domotikad is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from
domotika.boards
import
iboards
from
domotika.boards.boardtype
import
BaseBoard
,
ANABoard
,
INPBoard
,
OUTBoard
from
zope.interface
import
implements
from
twisted.plugin
import
IPlugin
try
:
import
hashlib
md5
=
hashlib
md5
.
new
=
hashlib
.
md5
sha1
=
hashlib
.
sha1
except
:
import
md5
import
sha1
class
DMBoard
(
INPBoard
,
ANABoard
,
OUTBoard
,
BaseBoard
):
hasAnalogs
=
False
hasOutputs
=
False
hasInputs
=
True
hasRelays
=
False
hasAmperometers
=
False
fwtype
=
'rgbled4'
numInp
=
10
class
Board
(
object
):
implements
(
IPlugin
,
iboards
.
IDMBoards
)
def
getBoard
(
self
,
host
,
port
,
pwd
,
lang
):
return
DMBoard
(
self
.
core
,
host
,
port
,
pwd
,
lang
)
board
=
Board
()
domotika/ikapserver.py
View file @
3a1812be
...
@@ -327,7 +327,7 @@ class DomIkaBaseProtocol(object):
...
@@ -327,7 +327,7 @@ class DomIkaBaseProtocol(object):
if
str
(
arg
[
5
:])
in
[
'DMRv3'
,
'DMRv1'
,
'DMSnt84'
,
'DMRv4'
]:
if
str
(
arg
[
5
:])
in
[
'DMRv3'
,
'DMRv1'
,
'DMSnt84'
,
'DMRv4'
]:
fwver
=
int
(
struct
.
unpack
(
'<B'
,
arg
[
4
])[
0
])
fwver
=
int
(
struct
.
unpack
(
'<B'
,
arg
[
4
])[
0
])
self
.
core
.
addBoard
(
str
(
arg
[
5
:]),
fwver
,
src
,
host
,
80
,
port
,
ptype
)
self
.
core
.
addBoard
(
str
(
arg
[
5
:]),
fwver
,
src
,
host
,
80
,
port
,
ptype
)
elif
str
(
arg
[
7
:])
in
[
'DMRv3'
,
'DMRv1'
,
'DMSnt84'
,
'DMRv4'
]:
elif
str
(
arg
[
7
:])
in
[
'DMRv3'
,
'DMRv1'
,
'DMSnt84'
,
'DMRv4'
,
'DMLed4'
,
'DMLed'
]:
fwver
=
int
(
struct
.
unpack
(
'<B'
,
arg
[
4
])[
0
])
fwver
=
int
(
struct
.
unpack
(
'<B'
,
arg
[
4
])[
0
])
webport
=
int
(
struct
.
unpack
(
'<H'
,
arg
[
5
:
7
])[
0
])
webport
=
int
(
struct
.
unpack
(
'<H'
,
arg
[
5
:
7
])[
0
])
self
.
core
.
addBoard
(
str
(
arg
[
7
:]),
fwver
,
src
,
host
,
webport
,
port
,
ptype
)
self
.
core
.
addBoard
(
str
(
arg
[
7
:]),
fwver
,
src
,
host
,
webport
,
port
,
ptype
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment