Checking Dreambox state

Moderator: leecollings

Morcegolas
Posts: 24
Joined: Wednesday 01 October 2014 12:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Checking Dreambox state

Post by Morcegolas »

Sure, here they are:
ImageUploadedByTapatalk1412667978.382946.jpg
ImageUploadedByTapatalk1412667978.382946.jpg (116.07 KiB) Viewed 5472 times
ImageUploadedByTapatalk1412667964.767919.jpg
ImageUploadedByTapatalk1412667964.767919.jpg (123.53 KiB) Viewed 5472 times
ImageUploadedByTapatalk1412667944.335060.jpg
ImageUploadedByTapatalk1412667944.335060.jpg (112.23 KiB) Viewed 5472 times
D'rMorris
Posts: 138
Joined: Thursday 01 May 2014 9:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands - Sittard
Contact:

Re: Checking Dreambox state

Post by D'rMorris »

That's the python folder :-). Now the contents of the Screens subfolder please ;-).
Morcegolas
Posts: 24
Joined: Wednesday 01 October 2014 12:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Checking Dreambox state

Post by Morcegolas »

ImageUploadedByTapatalk1412678116.196390.jpg
ImageUploadedByTapatalk1412678116.196390.jpg (135.74 KiB) Viewed 5461 times
Sorry. ;)
User avatar
kabouter
Posts: 6
Joined: Tuesday 30 December 2014 16:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2336
Location: Helmond, Netherlands
Contact:

Re: Checking Dreambox state

Post by kabouter »

I think I found an better way to do this.
Just create an dummy...
Just use http://dreambox_ipaddress/web/powerstate?newstate=4 for the on action.
and use http://dreambox_ipaddress/web/powerstate?newstate=5 for the standby action.
You can use this on every linux machine. e.q. as Dreambox or Vuduo etc.
V3.9460(beta)
2 x RPI (remote) B 2.0 512MB
2 x RPI (remote) B+ 512MB
2 x RPI (remote) 2B 1024MB
2 x PiFace 2 - 1 x RFXtrx433E Firmware 1024 - 4 x RFLink_r48 - 3 x RFLink_r48 - RFLink Gateway
3 x Action (Impuls) - 2 x AMST606 - 9 x MySensors
free_nsc
Posts: 36
Joined: Friday 19 December 2014 0:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Checking Dreambox state

Post by free_nsc »

Alternatively, to check current Enigma 2 status ie if it's in Standby , send:
http://e2ipaddress/web/powerstate?=

it will return:

Code: Select all

<e2powerstate>
<e2instandby>true</e2instandby>
</e2powerstate>
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:
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:

Code: Select all

<e2message>
   <e2result>True</e2result>
   <e2resulttext>Message send to screen</e2resulttext>
</e2message>
Requests:
http://dreambox/web/messageanswer?getanswer=now
Result:

Code: Select all

<e2message>
   <e2result>True</e2result>
   <e2resulttext>Answer is (YES|NO)!</e2resulttext>
</e2message>
Very handy
PeterFleur
Posts: 32
Joined: Sunday 08 March 2015 13:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.4739
Contact:

Re: Checking Dreambox state

Post by PeterFleur »

So if we would combine Kabouter and free_nsc posts (Because you also turn on the dreambox with the remote sometimes) how could we get an accurate script that updates Domoticz with Luo on the device Dreambox?

Peter
RaspberryPI
ZWave
RFXtrx433E
D'rMorris
Posts: 138
Joined: Thursday 01 May 2014 9:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands - Sittard
Contact:

Re: Checking Dreambox state

Post by D'rMorris »

Morcegolas wrote:
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):
---
I have Standby.pyo :/ can't edit that on vi, Using Dreambox 7020HD with Openatv 4.1.

Hope you can help me.
Thanks.
Don't know if it is still of interest to you, but I found out how you can install the .py files:
- Login in via SSH to your dreambox
- Execute command: opkg install enigma2-src
- Then edit the .py file as described in this thread
- Reboot box
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Checking Dreambox state

Post by tuspam »

I modded a lite code for my 2 STB with enigma2.
Script check state STB and change state virtual switch in domoticz (only change state without any action). You don't need make any changes in Your enigma2 device.
Script recognize states: ON, OFF, POWER OFF

Add to crone -e for checking state every minute

Code: Select all

*/1 * * * * /home/pi/domoticz/scripts/enigma2/check_enigma2_online.sh
Install xmlstartlet for domoticz if You need

Code: Select all

sudo apt-get install xmlstarlet
check_enigma2_online.sh

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&param=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&param=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&param=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&param=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&param=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&param=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
In my case stb1 got idx 142 and second one 139
Sorry for my lang
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Checking Dreambox state

Post by simon_rb »

Does anyone know the command to grab the play time/status bar when playing a recording. It's the bar along the bottom so you can fast forward 30 mins or whatever really quickly.. Know what I mean?

Cheers
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Checking Dreambox state

Post by Derik »

Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Checking Dreambox state

Post by simon_rb »

Can't find any reference to what I'm after

Thanks anyways
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: Checking Dreambox state

Post by madrian »

I need little help with volume control. I have a dummy slider for volume control and this lua script:

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
It works like a charm, but the slider does not change when I change volume from remote control...for obvious reasons.

I thought that simple script like:

STATE=$(curl -s "http://192.168.1.99/web/vol??set=state" | xmllint --xpath '//e2volume/e2current/text()' -)
curl "192.168.1.54:8080/json.htm?type=command&param=udevice&idx=37&nvalue=1&svalue=$STATE"

(running every minutes) solves the problem, but it is not 100% good. If I change volume on remote, then when this script runs the volume OSD is showing again on the TV (because Domoticz is registering the devicechanged['VU'] and the lua script get running.

The real question is:

It is possible to change slider value, without triggering devicechanged['VU']?
zicht
Posts: 251
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 2023.1+
Location: NL
Contact:

Re: Checking Dreambox state

Post by zicht »

free_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:

Code: Select all

<e2powerstate>
<e2instandby>true</e2instandby>
</e2powerstate>
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:
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:

Code: Select all

<e2message>
   <e2result>True</e2result>
   <e2resulttext>Message send to screen</e2resulttext>
</e2message>
Requests:
http://dreambox/web/messageanswer?getanswer=now
Result:

Code: Select all

<e2message>
   <e2result>True</e2result>
   <e2resulttext>Answer is (YES|NO)!</e2resulttext>
</e2message>
Very handy
All commands can be found here if you want to construct a remote for enigma
https://dream.reichholf.net/wiki/Enigma ... cellaneous

I have created a slector switch with simple HTTP commands in place in domoticz for :
Off - turn from on to standby
On - turn on from standby
r- reboot enigma box
Chup - next channel
Chdwn - prev channel
Vup- volume up
Vdwn- volume down
Rec - Instand record only current program (and it ends after program finishes

i have created a text sensor in domoticz showing current station and program
I check with isAlive if the box is reachable --> if hard turned off from mainswitch no polling is done.
All in lua... Anything in the link above can be done in domoticz,..your imagination is the limit.

BUT it would be nice to have something like a kodi remote for enigma in domoticz !
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
kofec
Posts: 53
Joined: Friday 16 September 2016 14:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Checking Dreambox state

Post by kofec »

If some want. I have created python plugin for Domoticz. Any comment are welcome.

https://github.com/kofec/Domoticz-Enigma2
NoProfesor
Posts: 17
Joined: Wednesday 10 October 2018 21:46
Target OS: -
Domoticz version:
Contact:

Re: Checking Dreambox state

Post by NoProfesor »

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
I installed it,
I added the hardware,
but i do not see device. What can be wrong?

I do not understand this as;
""First use script "tinycontrol.py" to verify if you have needed python modules e.g:

./enigma2.py 192.168.1.1
./enigma2.py -h
usage: enigma2.py [-h] [--user USER] [--password PASSWORD] IPaddress

Comunicate with Enigma2.

positional arguments:
IPaddress IP address of Enigma2

optional arguments:
-h, --help show this help message and exit
--user USER Username to login to
--password PASSWORD Password to login to""
kofec
Posts: 53
Joined: Friday 16 September 2016 14:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Checking Dreambox state

Post by kofec »

you have to provide IP address of your Tuner: probably it is not 192.168.1.1
./enigma2.py x.x.x.x
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests