Vu+ Integration

thanks for your reply, can you tell me how to implement it in my config :slightly_smiling_face:

media_player:

  • platform: enigma
    host: ip-Adress
1 Like

thanks for your help, i got it working :slight_smile:

Hi

After changing
bouquets_xml = self.request_call(’/web/getservices’)

It partially works in a old dreambox 800se, but not working in a gigablue.

Getting this error
File “/home/osmc/.homeassistant/custom_components/media_player/enigma.py”, line 126, in update
powerstate_soup = BeautifulSoup(powerstate_xml, ‘html.parser’)
File “/srv/homeassistant/lib/python3.5/site-packages/bs4/init.py”, line 193, in init
elif len(markup) <= 256 and (
TypeError: object of type ‘bool’ has no len()

The error occurs when the request is made to check the powerstatus.
It is a standard request to http://IP/web/powerstate which retrieves a simple XML, like:

<?xml version="1.0" encoding="UTF-8"?> false

Is the problem in the BeautifulSoup parser ? Already tried to change to lxml :frowning:

UPDATE: I see now if I add only one of my boxes, then it works as expected, however, if I ad both to the configuration, one of them will not work. Everything loads but then it does not update.

And the error raised, is :slight_smile:

018-02-21 00:11:32 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: source=custom_components/media_player/enigma.py, timestamp=1519171892.4285777, exception=Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
    yield from self.async_device_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 306, in wrapper
    result = method(*args, **kwargs)
  File "/home/osmc/.homeassistant/custom_components/media_player/enigma.py", line 125, in update
    powerstate_soup = BeautifulSoup(powerstate_xml, 'html.parser')
  File "/srv/homeassistant/lib/python3.5/site-packages/bs4/__init__.py", line 193, in __init__
    elif len(markup) <= 256 and (
TypeError: object of type 'bool' has no len()
, level=ERROR, message=Update for media_player.gigablue fails>

Found the problem. Was related to the auth.

Now it works with multiple enigma boxes using authentication.

I will make a code cleanup and share it later.

Has any progress been made on the sources list for this as mine only shows 10-15 and then whitespace

For those interested, i’ve committed my first version.

Find it at https://github.com/cinzas/homeassistant-enigma-player

Check the readme.
Thanks

1 Like

I’m running Hass.io and when I’ve tried to set this up I’ve got the following error in the logs (And it doesn’t show up in HA)

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 84, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/asyncio/tasks.py”, line 180, in _step
result = coro.send(None)
File “/usr/lib/python3.6/asyncio/coroutines.py”, line 210, in coro
res = func(*args, **kw)
File “/config/custom_components/media_player/enigma.py”, line 78, in async_setup_platform
config.get(CONF_TIMEOUT))
File “/config/custom_components/media_player/enigma.py”, line 114, in init
self.load_sources()
File “/config/custom_components/media_player/enigma.py”, line 119, in load_sources
reference = urllib.parse.quote_plus(self.get_bouquet_reference())
File “/config/custom_components/media_player/enigma.py”, line 135, in get_bouquet_reference
bouquets_xml = self.request_call(‘/web/getallservices’)
File “/config/custom_components/media_player/enigma.py”, line 146, in request_call
return self._opener.open(uri, timeout=self._timeout).read().decode(‘UTF8’)
AttributeError: ‘bool’ object has no attribute ‘open’

Hi Craig

I’m boarding on a long flight.
I can have a look at that tomorrow.

Are you using authentication?
If not, please try with it.

Also, if you have a timeout= in you enigma config , remove it, or set it to something like timeout=30

Let me know if it helps.

Thanks

I was using it without authentication but I’ve tried a few ways, I have a Vu Solo2 running 1.3.0 OpenWebif and OpenVix image.

By default OpenVIx doesn’t have a root pw so OpenWebIf doesn’t require authentication internally. I also set the timeout to higher but no luck

Hi

Please share your config. Also, enable debug and share the log of the error.
You could start HA with only enigma configured in order to have a clean log :slight_smile:

I’ll try start it with just that component, in the mean time I tried to give me Enigma2 box a password as it was set to root with no pw. Now I’ve given it one and set the config I still get an error but it’s differnt

enigma: Error on device update!
Traceback (most recent call last):
File “/config/custom_components/media_player/enigma.py”, line 146, in request_call
return self._opener.open(uri, timeout=self._timeout).read().decode(‘UTF8’)
File “/usr/lib/python3.6/urllib/request.py”, line 532, in open
response = meth(req, response)
File “/usr/lib/python3.6/urllib/request.py”, line 642, in http_response
‘http’, request, response, code, msg, hdrs)
File “/usr/lib/python3.6/urllib/request.py”, line 570, in error
return self._call_chain(*args)
File “/usr/lib/python3.6/urllib/request.py”, line 504, in _call_chain
result = func(*args)
File “/usr/lib/python3.6/urllib/request.py”, line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 197, in _async_add_entity
yield from entity.async_device_update(warning=False)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/util/init.py”, line 308, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/media_player/enigma.py”, line 187, in update
xml = self.request_call(‘/web/epgservicenow?sRef=’ + reference)
File “/config/custom_components/media_player/enigma.py”, line 148, in request_call
_LOGGER.exception("Enigma: [request_call] - Error connecting to remote enigma %s: %s ", self._host, HTTPError.code)
AttributeError: type object ‘HTTPError’ has no attribute ‘code’

Ok, So I tried it on my old HA Install which is running on standard Ubuntu (Not Hass.io) and it works fine. It must be something with it being run under Hass?

Hi Craig, thanks for the inputs.

I will get a new sdcard and install hass.io in a old pi.
I’m currently running on osmc.

But that error shouldn’t occur

I’ll test it

Hi Craig

You’re the second person reporting that.
I’ve installed hass.io just now, added the component to custom_components/media_player/enigma.py

Started hass.io with just my 2 boxes. … and it works.

Can you please check if you can open via your browser the following links:

http://ip_of_your_box/web/getallservices
http://ip_of_your_box/web/bouquets

Try with user and password enabled on the WebInterface

Thanks

Further discussion continues on the other topic: Enigma2 receivers integration

hi, i have question about start vusolo2 on selected channel:

tvnturbo:
sequence:
- service: media_player.play_media
data:
entity_id: media_player.solo2
media_content_type: tvshow
media_content_id: “1_0_1_3DD1_640_13E_820000_0_0_0”
#media_content_id: “TVN”

doesent work, why?
error:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/service.py”, line 226, in _handle_service_platform_call
await func(entity, data)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/media_player/init.py”, line 592, in play_media
raise NotImplementedError()
NotImplementedError

the same here, no working:

hdmi1: #nie działa
sequence:
- service: homeassistant.turn_on
entity_id: media_player.yamaha_rxv683_zone_1
data:
source:
- HDMI1

this two works perfect::
vusolo_power:
sequence:
- service: homeassistant.turn_on
entity_id: media_player.solo2

vusolo_poweroff:
sequence:
- service: homeassistant.turn_off
entity_id: media_player.solo2

I have a Pull Request open on HA with an enigma2 media_player. Please comment there if you would like to see it merged, so maybe the review might get picked up quicker!

https://github.com/home-assistant/home-assistant/pull/21271

I’m wondering what the current options and limitations of integrating a VU+ receiver are. Obviously there (still) is no dedicated integration. Is the Enigma2 working well for VU+ devices? What is possible, what isn’t?