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
b464c431
Commit
b464c431
authored
Feb 03, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
two little minor fixes
parent
5e2d5510
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
index.php
Web/admin/index.php
+1
-1
domotika.py
domotika/domotika.py
+27
-1
pluggable.py
domotika/mediasources/pluggable.py
+1
-1
No files found.
Web/admin/index.php
View file @
b464c431
...
...
@@ -106,7 +106,7 @@
{
?>
<tr>
<td>
<?=
$timer
[
'
timer_name
'
]
?>
</td>
<td>
<?=
$timer
[
'
description
'
]
?>
</td>
<?
if
(
$timer
[
'active'
]
>
0
)
{
?>
<td><button
class=
"btn btn-success btn-small pull-right"
>
Active
</button></td>
<?
}
else
{
?>
...
...
domotika/domotika.py
View file @
b464c431
...
...
@@ -968,6 +968,24 @@ class domotikaService(service.Service):
ret
=
doQuery
(
"SELECT active FROM timers WHERE id="
+
str
(
tid
[
0
]),
reverse
)
except
:
pass
elif
len
(
tid
)
>
0
and
len
(
tid
[
0
])
>
0
:
try
:
ret
=
doQuery
(
"SELECT IF(SUM(active)>0,1,0) from timers WHERE DMDOMAIN(timer_name, '"
+
str
(
tid
[
0
])
+
"')=1"
)
except
:
pass
elif
trigger
.
startswith
(
"ACTIONSTATUS "
)
or
trigger
.
startswith
(
"ACTIONSTATUS:"
):
aid
=
trigger
[
13
:]
.
split
()
if
len
(
aid
)
>
0
and
genutils
.
is_number
(
aid
[
0
]):
try
:
ret
=
doQuery
(
"SELECT active FROM actions WHERE id="
+
str
(
aid
[
0
]),
reverse
)
except
:
pass
elif
len
(
aid
)
>
0
and
len
(
aid
[
0
])
>
0
:
try
:
ret
=
doQuery
(
"SELECT IF(SUM(active)>0,1,0) from actions WHERE DMDOMAIN(action_name, '"
+
str
(
aid
[
0
])
+
"')=1"
)
except
:
pass
elif
trigger
.
startswith
(
"BOARDSTATUS "
)
or
trigger
.
startswith
(
"BOARDSTATUS:"
):
bname
=
trigger
[
12
:]
.
split
()
if
len
(
bname
)
>
0
:
...
...
@@ -989,6 +1007,14 @@ class domotikaService(service.Service):
ret
=
doQuery
(
"SELECT status FROM relstatus WHERE buttonid="
+
str
(
tid
[
0
]),
reverse
)
except
:
pass
elif
trigger
.
startswith
(
"ACTSTATUS "
)
or
trigger
.
startswith
(
"ACTSTATUS:"
):
tid
=
trigger
[
10
:]
.
split
()
if
len
(
tid
)
>
0
and
genutils
.
is_number
(
tid
[
0
]):
try
:
ret
=
doQuery
(
"SELECT status FROM actstatus WHERE buttonid="
+
str
(
tid
[
0
]),
reverse
)
except
:
pass
elif
trigger
.
startswith
(
"AMPSTATUS "
)
or
trigger
.
startswith
(
"AMPSTATUS:"
):
if
':'
in
trigger
:
amp
=
trigger
[
10
:]
.
split
(
":"
)
...
...
@@ -1632,7 +1658,7 @@ class domotikaService(service.Service):
ss
.
del_status
(
res
.
id
)
return
ret
=
defer
.
succeed
(
False
)
trigger
=
res
.
trigger
trigger
=
res
.
status_
trigger
self
.
parseStatusRequest
(
trigger
,
restype
=
'string'
)
.
addCallback
(
self
.
manageStatusAction
,
res
)
@
defer
.
inlineCallbacks
...
...
domotika/mediasources/pluggable.py
View file @
b464c431
...
...
@@ -25,7 +25,7 @@ def getMediaSourcePlugin(name, manufacturer='generic'):
return
None
for
p
in
getPlugins
(
imediasource
.
IMediaSource
,
mod
):
qual
=
"
%
s.
%
s"
%
(
p
.
__module__
,
p
.
__class__
.
__name__
)
log
.
debug
(
"Calling
Board
Module "
+
qual
)
log
.
debug
(
"Calling
MediaSource
Module "
+
qual
)
if
p
.
__module__
.
split
(
'.'
)[
-
1
]
==
name
:
return
p
return
None
...
...
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