- ImageUploadedByTapatalk1412667978.382946.jpg (116.07 KiB) Viewed 5467 times
- ImageUploadedByTapatalk1412667964.767919.jpg (123.53 KiB) Viewed 5467 times
- ImageUploadedByTapatalk1412667944.335060.jpg (112.23 KiB) Viewed 5467 times
Moderator: leecollings
Code: Select all
<e2powerstate>
<e2instandby>true</e2instandby>
</e2powerstate>
Code: Select all
<e2message>
<e2result>True</e2result>
<e2resulttext>Message send to screen</e2resulttext>
</e2message>
Code: Select all
<e2message>
<e2result>True</e2result>
<e2resulttext>Answer is (YES|NO)!</e2resulttext>
</e2message>
Don't know if it is still of interest to you, but I found out how you can install the .py files:Morcegolas wrote:I have Standby.pyo :/ can't edit that on vi, Using Dreambox 7020HD with Openatv 4.1.D'rMorris wrote: ...
Then in the directory /usr/lib/enigma2/python/Screens, there is a script called Standby.py. In this script, I added (made bold what I added):
---
Hope you can help me.
Thanks.
Code: Select all
*/1 * * * * /home/pi/domoticz/scripts/enigma2/check_enigma2_online.sh
Code: Select all
sudo apt-get install xmlstarlet
Code: Select all
#!/bin/bash
curl http://YOUR_stb1_IP/web/powerstate > /home/pi/domoticz/scripts/enigma2/powerstate_enigma2_living.xml
enigma2LivingStatus=`xmlstarlet sel -t -m '//e2instandby' -v . -n </home/pi/domoticz/scripts/enigma2/powerstate_enigma2_living.xml`
if [ $enigma2LivingStatus = "true" ]
then
curl 'http://domoticzIP:Port/json.htm?type=command¶m=udevice&idx=142&nvalue=0&svalue=0'
echo "$enigma2LivingStatus"
echo enigma2 Living is in standby
elif [ $enigma2LivingStatus = "false" ]
then
curl 'http://domoticzIP:Port/json.htm?type=command¶m=udevice&idx=142&nvalue=1&svalue=1'
echo "$enigma2LivingStatus"
echo enigma2 Living is not in standby
else
curl 'http://domoticzIP:Port/json.htm?type=command¶m=udevice&idx=142&nvalue=0&svalue=0'
echo "$enigma2LivingStatus"
echo enigma2 Living is in standby
echo enigma2 Living not found
rm -r /home/pi/domoticz/scripts/enigma2/powerstate_enigma2_living.xml
fi
curl http://YOUR_stb1_IP/web/powerstate > /home/pi/domoticz/scripts/enigma2/powerstate_enigma2_bedroom.xml
enigma2BedroomStatus=`xmlstarlet sel -t -m '//e2instandby' -v . -n </home/pi/domoticz/scripts/enigma2/powerstate_enigma2_bedroom.xml`
if [ $enigma2BedroomStatus = "true" ]
then
curl 'http://domoticzIP:Port/json.htm?type=command¶m=udevice&idx=139&nvalue=0&svalue=0'
echo "$enigma2BedroomStatus"
echo enigma2 Bedroom is in standby
elif [ $enigma2BedroomStatus = "false" ]
then
curl 'http://domoticzIP:Port/json.htm?type=command¶m=udevice&idx=139&nvalue=1&svalue=1'
echo "$enigma2BedroomStatus"
echo enigma2 Bedroom is not in standby
else
curl 'http://domoticzIP:Port/json.htm?type=command¶m=udevice&idx=139&nvalue=0&svalue=0'
echo "$enigma2BedroomStatus"
echo enigma2 Bedroom is in standby
echo enigma2 Bedroom not found
rm -r /home/pi/domoticz/scripts/enigma2/powerstate_enigma2_living.xml
rm -r /home/pi/domoticz/scripts/enigma2/powerstate_enigma2_bedroom.xml
fi
Code: Select all
commandArray = {}
if devicechanged['VU'] then
print('Level : '..tonumber(otherdevices_svalues['VU']))
commandArray['OpenURL']="http://192.168.1.99/web/vol?set=set" .. otherdevices_svalues['VU']
end
return commandArray
All commands can be found here if you want to construct a remote for enigmafree_nsc wrote: ↑Sunday 01 March 2015 1:55 Alternatively, to check current Enigma 2 status ie if it's in Standby , send:
http://e2ipaddress/web/powerstate?=
it will return:I also thought of alternative ways of using dreambox for home automation mainly around sending a messages back to dreambox to notify user on certain conditions. A bit like Push notifications at the moment. E.g. doorbell rang so someone at the door (it might be even possible to switch channel to an IPCam stream) or if temperature downstairs dropped to certain level message could be produced to inform user. You could also ask for Yes/No type of question so could even turn the central heating on from the dreambox remote. Here with the documenation on message facility:Code: Select all
<e2powerstate> <e2instandby>true</e2instandby> </e2powerstate>
Requests:
http://dreambox/web/message?text={messa ... agetimeout}
Parameter:
messagetext=Text of Message
messagetype=Number from 0 to 3, 0= Yes/No, 1= Info, 2=Message, 3=Attention
timeout=Can be empty or the Number of seconds the Message should disappear after.
Result:Requests:Code: Select all
<e2message> <e2result>True</e2result> <e2resulttext>Message send to screen</e2resulttext> </e2message>
http://dreambox/web/messageanswer?getanswer=now
Result:Very handyCode: Select all
<e2message> <e2result>True</e2result> <e2resulttext>Answer is (YES|NO)!</e2resulttext> </e2message>
I installed it,kofec wrote: ↑Thursday 07 December 2017 22:57 If some want. I have created python plugin for Domoticz. Any comment are welcome.
https://github.com/kofec/Domoticz-Enigma2
Users browsing this forum: No registered users and 1 guest