text:
eq3btsmart - not working after 0.56 update

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.56
Python release (python3 --version):
Python 3.5.2
Component/platform:
climate.eq3btsmart
Description of problem:
eq3btsmart - not working after 0.56 update
Expected:
Thermostats not available
Traceback (if applicable):
Traceback (most recent call last):
  File "/srv/hass/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 222, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, 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/hass/lib/python3.5/site-packages/homeassistant/components/climate/eq3btsmart.py", line 169, in update
    self._thermostat.update()
  File "/srv/hass/lib/python3.5/site-packages/eq3bt/eq3btsmart.py", line 163, in update
    self._conn.make_request(PROP_WRITE_HANDLE, value)
  File "/srv/hass/lib/python3.5/site-packages/eq3bt/connection.py", line 71, in make_request
    with self:
  File "/srv/hass/lib/python3.5/site-packages/eq3bt/connection.py", line 36, in __enter__
    self._conn.connect(self._mac)
  File "/srv/hass/lib/python3.5/site-packages/bluepy/btle.py", line 408, in connect
    self._connect(addr, addrType, iface)
  File "/srv/hass/lib/python3.5/site-packages/bluepy/btle.py", line 388, in _connect
    self._startHelper()
  File "/srv/hass/lib/python3.5/site-packages/bluepy/btle.py", line 246, in _startHelper
    universal_newlines=True)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error

Additional info:
0.55 worked with no problem with the same setup
Downgrading to 0.55 does not helping...

Look like a problem in local bluepy module

How can I fix it? Reinstall bluepy?

Solved! Uninstall bluepy and reinstal with pip3 --no-cache-dir install bluepy
Thanks for hint mate :) 👍

Bluepy problems - reinstall with pip3 --no-cache-dir install bluepy solved it

authors: marekobi pvizeli

repo: home-assistant/home-assistant


text:
Incorrect authorize address for Spotify component

Home Assistant release (hass --version):
service ver. 1.48
Python release (python3 --version):
Python 3.5.3
Component/platform:
Raspbian
Spotify
Description of problem:
When following the link to authorize Spotify, the link shows up dead:
"INVALID_CLIENT: Invalid redirect URI"
https://accounts.spotify.com/authorize?redirect_uri=https%3A%2F%2Fhomeassistant.lcl%2Fapi%2Fspotify&client_id=c5fc09356068112945ssasda&response_type=code&scope=user-modify-playback-state+user-read-playback-state+user-read-private
Most like this happens due to the lack of port in address? I use a non-default local port for HomeAssistant (not 8123).
Expected:
Link not to be broken.
Problem-relevant configuration.yaml entries and steps to reproduce:

Add Spotify to configuration.yaml
Setup API @ Spotify.com
Follow link "Link Spotify account" from HomeAssistant.

Additional info:

Have you set the Spotify App setting to redirect to the same uri as is in the link ( https://homeassistant.lcl)? Seems to be a settings missmatch.
See the Redirect URI part in https://home-assistant.io/components/media_player.spotify/

Redirect URI in Spotify.com is:
https://homeassistant.lcl:1234/api/spotify

I'm having the same issue. If I go to https://{name}.duckdns.org/api/spotify I get a 500 error. If I click the configure link to link my account I get INVALID_CLIENT: Invalid redirect URI. I've added every possible callback URI I can think of in Spotify and I am reasonably active with Spotify development so I'm familiar with the setup on that side.
I am getting this error in my logs.
2018-05-18 16:13:29 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
    resp = await self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_app.py", line 322, in _handle
    resp = await handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 88, in impl
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 68, in staticresource_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 27, in real_ip_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 28, in auth_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 101, in handle
    result = handler(request, **request.match_info)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/media_player/spotify.py", line 115, in get
    self.oauth.get_access_token(request.query['code'])
  File "multidict\_multidict.pyx", line 140, in multidict._multidict._Base.__getitem__
  File "multidict\_multidict.pyx", line 135, in multidict._multidict._Base._getone
KeyError: "Key not found: 'code'"

Same issue as jayheavner

I see the same thing with the latest code, on Docker

Any updates on this? I have the same issue, also running on docker

source: gharchive/issue

authors: Kalekulan bhsolberg darkenbula jayheavner rasmusbe strassea

license_type: permissive

license_source: github-api


text:
Harmony Remote - coroutine 'HarmonyRemote.new_config' was never awaited

**Home Assistant release with the issue: 0.85.0.dev0
**Operating environment (Hass.io/Docker/Windows/etc.): Docker
**Component/platform: https://github.com/home-assistant/home-assistant/blob/faeee4f7adc77d3caee3b33aa1d28d9d169b0c87/homeassistant/components/remote/harmony.py#L232
Description of problem:
Receiving the error below since PR #19595 was merged into Dev:
/usr/src/app/homeassistant/components/remote/harmony.py:232: RuntimeWarning: coroutine 'HarmonyRemote.new_config' was never awaited self.new_config()

@sqldiablo Thank you!!! Fixed in PR.


text:
SSL error

After the last update i get this error when i try to call google_say service:
HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6c53d770>: Failed to establish a new connection: [Errno -3] Try again'))
And this error when i try to send a telegram message:
Error while bootstrap del webhook: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot842684153:AAE4Ilk30Yr8T5K8L0DcZxLNG9CpYk5DfcY/deleteWebhook (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x6b4e47d0>: Failed to establish a new connection: [Errno -3] Try again'))
I think the problem is SSL but i don't know how to fix it

Are you running Hassbian or Raspbian?
Also, please use the issue template you've deleted. So I don't have to ask these questions. Thanks! 👍

I have hassio

@andreamastro  Have you installed PiHole or AdGuard home recently?

Yes, Adguard home

This is a common issue with AdGuard Home & PiHole, which occurs if the user does not follow the installation steps.
Please take a look at the AdGuard Home installation steps again. Especially the first step is really important.
For support on my add-ons, please join our Discord server or try the add-on topics on the Home Assistant community forums.
This is not an issue with Home Assistant.

authors: andreamastro frenck


text:
Value cannot be processed as a number: unknown

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (0.39.3):
Python release (3.5.2):
**Component/platform: sensor
**Description of problem: When I restart HA, I get the following error in the log. It only happens when I restart and does not continue after HA is running.
**Expected: I would like to figure out which sensor is causing this issue and whether it is something that I am doing incorrectly or if its just an issue when HA restarts. I have added in MQTT sensors for temp, humidity, barometric pressure and light level, all parsed from a JSON message, all in double format. All of them report correctly in the system and none have a value of unknown. All I can think is that when HA restarts, it has no value for these sensors, causing the unknown to occur until MQTT has the change to pull in the values to HA.
Problem-relevant configuration.yaml entries and steps to reproduce:
##MQTT Sensors
- platform: mqtt
  state_topic: 'master/sensor'
  name: 'Bedroom temperature'
  unit_of_measurement: '°F'
  value_template: '{{ value_json.temperature }}'
- platform: mqtt
  state_topic: 'master/sensor'
  name: 'Bedroom humidity'
  unit_of_measurement: '%'
  value_template: '{{ value_json.humidity }}'
- platform: mqtt
  state_topic: 'master/sensor'
  name: 'Bedroom pressure'
  unit_of_measurement: 'mb'
  value_template: '{{ value_json.barometer }}'
- platform: mqtt
  state_topic: 'master/sensor'
  name: 'Bedroom light level'
  unit_of_measurement: '%'
  value_template: '{{ value_json.photoCell }}'

This is the output from the MQTT message:
{"pir":0,"photoCell":62,"temperature":68.65,"humidity":30.25,"barometer":1.02e3}
The scientific notation is correctly displayed in HASS as 1020.0mb
Traceback (if applicable):

Additional info:
So, to recap, I cannot locate the cause of this error, but it doesn't seem to be affecting anything. So, this is no rush to figure out.

Do you have any automations that use these sensors?

Yes, everything but the barometer has an automation attached to it.
I will try and remove the barometer and do a restart to see if the error goes away.
Keep you posted

I tried to comment out the barometer, but the error still pops up. I have a feeling that the system runs through the automations before it reads the MQTT message, ending with a NULL value for those sensors and causing the automation rule to have a problem with the blank value.
Tested this out by commenting out the automation rules that trigger based on a sensor number value and this got rid of the error on restart.
Here's what I narrowed it down to. Commenting out this automation rule gets rid of the error on restart:
- alias: Fan on low night time
  trigger:
    platform: numeric_state
    entity_id: sensor.bedroom_temperature
    above: 75
    below: 78
  condition:
    condition: and
    conditions:
      - condition: time
        after: '20:30:00'
        before: '08:59:59'
      - condition: state
        entity_id: group.family
        state: 'home'
  action:
    - service: script.turn_on
      entity_id: script.fan_low

I have a few of these for the different temp ranges, to turn the fan low, medium, high or off.

I have a similar problem with the following script:
alias: Turn On Lights Movement Main Area
trigger:
platform: state
entity_id: sensor.Ademco
to: '3'
condition:

condition: state
entity_id: group.family
state: 'home'
condition: sun
after: sunset
after_offset: "-00:30:00"
action:
service: homeassistant.turn_on
entity_id: group.firstfloor

It seems to work, but I got the same error that you are getting.  The only thing there is the condition for the family group. Any ideas?

I think there is/was a bug with numeric state triggering before the MQTT message is initially received during startup.
A few releases back I changed all my numeric state trigger to templates and all my "Value cannot be processed as a number: unknown" error disappeared from my logs.
Try this workaround until fixed:
- alias: Fan on low night time
  trigger:
    platform: template
    value_template: '{{ states.sensor.bedroom_temperature.state | int > 75 and states.sensor.bedroom_temperature.state | int < 78 }}'

authors: JuliusLedoux arsaboo martokk nordicblue


text:
why I used homeassistant-homeassistant for a minutes, the homeassistant would crash

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.50.2
Python release (python3 --version):
3.4
Component/platform:
climate
Description of problem:
I want to control AC via siri. So I used homeassistant-homebridge, but If I control the homeassistant on homekit for a minutes, the homeassistant would crash.
Expected:
How to resolve this problem ?
Problem-relevant configuration.yaml entries and steps to reproduce:

Traceback (if applicable):

Additional info:

Without any information (which components you are using, error logs), there is no way for anyone to offer any assistance. Many of us are using Homebridge with HA without any issues, so looks like some configuration issue.

This is the bug/issue tracker for Home Assistant. Please use the forum for questions about installation, setup, and configuration.
If it's a bug, please re-open the issue with the issue template filled.

authors: 893399065 arsaboo fabaff


text:
Plex mark devices unavailable if they 'vanish' and clear media

Partial Fix for:
https://github.com/home-assistant/home-assistant/issues/10074
if a client vanishes it will persist in UI however it is marked Unavailable and media images are cleared

Did you see self._is_player_available? What's the difference?

Removing all my code and using player available results in player IDLE not unavailable

@syssi leaving _player_available till next cleanup (i've to add code to remove unavailable clients and update api to 3.0.6). But Have added prev comments
@balloob Can this make 0.65?

source: gharchive/pull-request


text:
Fix Tado doing async wrong

Description:
Fix Tado device tracker async handling.
Related issue (if applicable): https://github.com/home-assistant/home-assistant/pull/13027#issuecomment-372080443

Not sure that this is totally fixed, see #13179

authors: balloob filcole


text:
Add Lightwave TRV

Proposed change

Added support for Lightwave TRVs
Blocked until https://github.com/GeoffAtHome/lightwave/pull/5 is merged.
Type of change

[ ] Dependency upgrade
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New integration (thank you!)
[X] New feature (which adds functionality to an existing integration)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
lightwave:
  host: 192.168.10.10
  trv_proxy_ip: 127.0.0.1
  trv_proxy_port: 7878
  trv:
    R1Dh:
      name: Bedroom TRV
      serial: E84902

Additional information

This PR fixes or closes issue: fixes #
This PR is related to issue:
Link to documentation pull request: Pull 12027

Checklist

[X] The code change is tested and works locally.
[X] Local tests pass. Your PR cannot be merged unless tests pass
[X] There is no commented out code in this PR.
[X] I have followed the development checklist
[X] The code has been formatted using Black (black --fast homeassistant tests)
[ ] Tests have been added to verify that the new code works.

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

[X] Documentation added/updated for www.home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] The manifest file has all fields filled out correctly.
Updated and included derived files by running: python3 -m script.hassfest.
[ ] New or updated dependencies have been added to requirements_all.txt.
Updated by running python3 -m script.gen_requirements_all.
[ ] Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

[ ] No score or internal
[ ] 🥈 Silver
[ ] 🥇 Gold
[ ] 🏆 Platinum

@ColinRobbins please run python3 -m script.gen_requirements_all inside of your dev environment to update the new requirement :)

@springstan I'm confused by the CI error above, as it's in a module that has nothing to do with my changes (test_create_doorbell_with_motion).
Is it a blocker?   What can I do about it?

What needs to happen next?  It was marked as stale?
It’s not stale, I’m waiting for a pull?

The errors seems a downstream error.
Not sure I can fix it.
How to I rerun the test?

@springstan, thanks for the feedback, all fixed.
What do I need to do next to get the pull accepted?  It’s been sitting here quite a while?
Cheers,
Colin.

@ColinRobbins thank you very much for addressing my comments.
Yeah I am really sorry about the long waiting time, it looks pretty good now to me at least.
Still a bit unsure about creating a separate battery sensor, but I think it is fine AFAIK.
@MartinHjelmare could you please take a look at this PR? I have reviewed it thoroughly and would like to push it forward so we can merge it. Thanks a lot.

@MartinHjelmare thanks again for helping me with this 😁👌

Looks good

Really appreciate the help @MartinHjelmare, @springstan.   This has been a big learning curve for me.
Cheers.

authors: ColinRobbins bdraco springstan


text:
Fix JSON serialization error html5 push config

@robbiet480 suggested this fix in https://github.com/home-assistant/home-assistant/issues/3028#issuecomment-244472690, and it fixed the issue https://github.com/home-assistant/home-assistant/issues/3154 for me.
This has the side-effect of making the conf file less readable, but IMO that's better than the alternative of failed registrations that people are reporting in https://github.com/home-assistant/home-assistant/issues/3154 and https://github.com/home-assistant/home-assistant/issues/3028

I restarted the Travis run since it seems tests failed on something unrelated to this. Once those pass this is good to merge.
@balloob If 0.28.3 happens this should be in it.

Closes #3154.

Thanks! 🐬 🍪 💯


text:
Use bundled certificates if port matches mqtts

Description:
Whenever a certificate is not specified, but the port specified matches that of mqtts, use the bundled certificates from the requests library.
I have written (some) tests before, but I am fairly new to the python ecosystem in general. Any hints on how to add proper tests (especially since this project seems to be async) are welcome.
Configuration is not changed perse, rather accepts a default when the port hints a secure layer is desired.
Related issue (if applicable): fixes none
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):

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

[ ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New dependencies are only imported inside functions that use them (example).
[x] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

If the code does not interact with devices:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Hi @dennisdegreef,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

This test would be a good starting point: https://github.com/home-assistant/home-assistant/blob/dev/tests/components/mqtt/test_init.py#L365-L380
Something like this:

@asyncio.coroutine
def test_setup_XXX(hass):
    """Test for setup XXXX."""
    test_broker_cfg = {mqtt.DOMAIN: {mqtt.CONF_BROKER: 'test-broker', 'port': 8883}}

    with mock.patch('homeassistant.components.mqtt.MQTT') as mock_MQTT:
        yield from async_setup_component(hass, mqtt.DOMAIN, test_broker_cfg)

    assert mock_MQTT.called
    assert mock_MQTT.mock_calls[0][1][2] == 8883

Thanks for the pointer on the test :+1: It always takes a bit longer to figure out things when writing in a language/ecosystem you haven't written in before :smile:
I now have added both assertions that the certificate bundle is used on port 8883, but also the non-happy path, that it isn't used on the regular 1883 (to assure not breaking backwards compatability).

Ziet er goed uit 🐬

authors: balloob dennisdegreef homeassistant