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
1ac745f4
Commit
1ac745f4
authored
Aug 15, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add [[SRCVAL]] even on other action commands
parent
fb36fa66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
domotika.py
domotika/domotika.py
+7
-3
No files found.
domotika/domotika.py
View file @
1ac745f4
...
...
@@ -1171,7 +1171,7 @@ class domotikaService(service.Service):
log
.
debug
(
command
)
command
=
command
[
7
:]
subprocess
.
Popen
(
command
.
replace
(
"
\r\n
"
,
" "
)
.
replace
(
'[[SRC]]'
,
src
),
command
.
replace
(
"
\r\n
"
,
" "
)
.
replace
(
'[[SRC
VAL
]]'
,
src
),
shell
=
True
,
preexec_fn
=
os
.
setsid
)
elif
command
.
startswith
(
"IOCONF "
)
or
command
.
startswith
(
"IOCONF:"
):
command
=
command
[
7
:]
...
...
@@ -1203,6 +1203,7 @@ class domotikaService(service.Service):
csrc
=
com
.
split
()[
0
]
cdst
=
com
.
split
()[
1
]
msg
=
" "
.
join
(
com
.
split
()[
2
:])
msg
=
msg
.
replace
(
'[[SRCVAL]]'
,
src
)
if
cdst
==
'all'
and
not
':'
in
cdst
:
dmdb
.
getAllUsers
()
.
addCallback
(
multipleInsertNotify
,
csrc
,
expire
,
msg
)
...
...
@@ -1218,7 +1219,7 @@ class domotikaService(service.Service):
elif
command
.
startswith
(
"SQL "
)
or
command
.
startswith
(
"SQL:"
):
sqlstring
=
command
[
4
:]
try
:
dmdb
.
runOperation
(
sqlstring
)
dmdb
.
runOperation
(
sqlstring
.
replace
(
'[[SRCVAL]]'
,
src
)
)
except
:
pass
...
...
@@ -1227,6 +1228,7 @@ class domotikaService(service.Service):
fc
=
command
[
8
:]
.
split
(
':'
)
else
:
fc
=
command
[
8
:]
.
split
()
fc
[
0
]
=
fc
[
0
]
.
replace
(
'[[SRCVAL]]'
,
src
)
if
len
(
fc
)
>
1
:
if
genutils
.
is_number
(
fc
[
1
]):
expire
=
time
.
time
()
+
float
(
fc
[
1
])
...
...
@@ -1367,6 +1369,7 @@ class domotikaService(service.Service):
pnumbers
=
command
.
split
(
"] "
)[
1
]
.
split
()[
1
:]
else
:
pnumbers
=
command
.
split
(
"] "
)[
1
]
.
split
()
ptext
=
ptext
.
replace
(
'[[SRCVAL]]'
,
src
)
self
.
astmanager
.
phoneSay
(
ptext
,
pnumbers
,
retry
=
int
(
pretry
),
interval
=
int
(
pinterval
),
replay
=
int
(
preplay
),
engine
=
str
(
engine
))
...
...
@@ -1390,6 +1393,7 @@ class domotikaService(service.Service):
pnumbers
=
command
.
split
()[
2
:]
else
:
pnumbers
=
command
.
split
()[
1
:]
pfile
=
pfile
.
replace
(
'[[SRCVAL]]'
,
src
)
self
.
astmanager
.
phonePlay
(
pfile
,
pnumbers
,
retry
=
int
(
pretry
),
interval
=
int
(
pinterval
),
replay
=
int
(
preplay
))
...
...
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