I needed to know the state of my Gigablue Enigma 2 set-top satellite box. Was working on pythons scripts when it suddenly dawned on me I could use the Scrape senor with the Enigma2 web API
This requires the Openwebif interface to be installed on the enigma2 box. This is default on most distro’s. You will need to change the IP address to your box details
The following sensor shows the current channel
- platform: scrape
resource: http://192.168.1.91/web/subservices
name: TV Channel
select: 'e2servicename'
The current TV program
- platform: scrape
resource: http://192.168.1.91/web/getcurrent
name: TV Program
select: 'e2eventtitle'
If the box is on or in standby
- platform: scrape
resource: http://192.168.1.91/web/powerstate
name: Gigablue Power State
select: 'e2instandby'
value_template: '{{value.replace("true","off")|replace("false","on") }}'
You can scrape almost any data from the web interface very simply. Much easier than coding. I hope this idea helps others