Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to override callback url #21583

Merged
merged 3 commits into from Mar 5, 2019

Conversation

Projects
None yet
5 participants
@StevenLooman
Copy link
Contributor

commented Mar 2, 2019

Description:

Add ability to override callback/notification url.

Related issue (if applicable): fixes StevenLooman/async_upnp_client#33 (non-home assistant.)

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8797

Example entry for configuration.yaml (if applicable):

media_player:
  - platform: dlna_dmr
    url: http://192.168.1.42:1936/
    callback_url_override: http://192.168.1.42:8080/notify

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

@StevenLooman StevenLooman changed the title Add option to override callback url WIP: Add option to override callback url Mar 5, 2019

@StevenLooman StevenLooman changed the title WIP: Add option to override callback url Add option to override callback url Mar 5, 2019

@dgomes

dgomes approved these changes Mar 5, 2019

@dgomes dgomes merged commit 3ffff88 into home-assistant:dev Mar 5, 2019

4 checks passed

Hound No violations found. Woof!
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.001%) to 92.757%
Details

@ghost ghost removed the in progress label Mar 5, 2019

@StevenLooman StevenLooman deleted the StevenLooman:upnp_callback_url_override branch Mar 10, 2019

@derkling

This comment has been minimized.

Copy link

commented Mar 17, 2019

Nope, tested with 0.94.0b4 and I still get UPnP errors:

2019-03-17 19:49:01 INFO (MainThread) [homeassistant.loader] Loaded upnp.sensor from homeassistant.components.upnp.sensor2019-03-17 19:49:01 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.upnp2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_bytes_sent                                                                                                                                         
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_bytes_received                                                                                                                                     
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_received
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_sent
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_kbyte_sec_sent
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_sec_received
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_sec_sent
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_kbyte_sec_received2019-03-17 19:49:01 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.loader] Loaded upnp.sensor from homeassistant.components.upnp.sensor                                                                                                                                                                      
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.upnp                                                                                                                                                                                                 
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_bytes_sent                                                                                                                                         
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_bytes_received                                                                                                                                     
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_received                                                                                                                                   
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_sent                                                                                                                                       
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_kbyte_sec_sent                                                                                                                                     
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_sec_received                                                                                                                               
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_packets_sec_sent                                                                                                                                   
2019-03-17 19:49:01 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.upnp entity: sensor.huawei_home_gateway_kbyte_sec_received                                                                                                                                 
2019-03-17 19:49:01 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved                                                                                                                                                                                
Traceback (most recent call last):                                                                                                                                                                                                                                                             
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 352, in _async_add_entity                                                                                                                                                                                                 
    await entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 225, in async_update_ha_state                                                                                                                                                                                                      
    self._async_write_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 248, in _async_write_ha_state
    tate = self.state
  File "/usr/src/app/homeassistant/components/upnp/sensor.py", line 144, in state 
    return format(self._state, 'd')
TypeError: unsupported format string passed to NoneType.__format__
@derkling

This comment has been minimized.

Copy link

commented Mar 17, 2019

Here is a full log:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 352, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 248, in _async_write_ha_state
    state = self.state
  File "/usr/src/app/homeassistant/components/upnp/sensor.py", line 144, in state
    return format(self._state, 'd')
TypeError: unsupported format string passed to NoneType.__format__
2019-03-17 20:00:22 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 352, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 248, in _async_write_ha_state
    state = self.state
  File "/usr/src/app/homeassistant/components/upnp/sensor.py", line 144, in state
    return format(self._state, 'd')
TypeError: unsupported format string passed to NoneType.__format__
2019-03-17 20:00:22 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 352, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 248, in _async_write_ha_state
    state = self.state
  File "/usr/src/app/homeassistant/components/upnp/sensor.py", line 144, in state
    return format(self._state, 'd')
TypeError: unsupported format string passed to NoneType.__format__
2019-03-17 20:00:22 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 352, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 248, in _async_write_ha_state
    state = self.state
  File "/usr/src/app/homeassistant/components/upnp/sensor.py", line 144, in state
    return format(self._state, 'd')
TypeError: unsupported format string passed to NoneType.__format__
@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Mar 17, 2019

Please open an issue if you suspect a bug. If you need help please use our help channels:
https://home-assistant.io/help/#communication-channels

Merged PRs should not be used for support or bug reports. Thanks!

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Mar 17, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.