Quantcast
Channel: Configuration - Home Assistant Community
Viewing all 100861 articles
Browse latest View live

Starting from Scratch; I am having issues setting up my NVIDIA Shield TVs

$
0
0

@lawsuitup wrote:

o I had to get a new SD card for my pi, and I figured I would do this from scratch- knowing that it is possible to throw on one of my snapshots. That said, I set up the ADB on HA, I included the IPs for the 2 Shields I wanted to use, on one ( the most pressing one) I accepted the connection on the Shield, and of course put them in my config.

Any help, or advice would be helpful. THANK YOU.

The configuration. yaml looks like:

media_player:
  - platform: androidtv
    host: 192.168.86.57
    name: "Second NVidia Shield"
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037
  - platform: androidtv
    host: 192.168.86.56
    name: "Livingroom NVidia Shield"
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037

The Config in the add-on ADB looks like:

devices:
  - 192.168.8x.5x
  - 192.168.8x.5x
reconnect_timeout: 90

The log for the ADB, insists that it is connected to the devices:

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adb.sh: executing... 
[cont-init.d] adb.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:41:13] INFO: Starting the Android Debug Bridge server...
[22:41:14] INFO: Connecting to device: 192.168.86.57...
connected to 192.168.86.57:5555
[22:41:14] INFO: Connecting to device: 192.168.86.56...
connected to 192.168.86.56:5555
[22:42:44] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:42:44] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:44:15] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:44:15] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:45:45] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:45:45] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:47:16] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:47:16] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:48:46] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:48:46] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:50:17] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:50:17] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:51:47] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:51:47] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:53:17] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:53:18] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:54:48] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:54:50] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:56:21] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:56:21] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:57:51] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:57:53] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555

And these are the errors I get:

Log Details (WARNING)
Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:202
Integration: Media player (documentation, issues)
First occurred: 10:42:44 PM (6 occurrences)
Last logged: 10:52:50 PM

Platform androidtv not ready yet. Retrying in 60 seconds.
Platform androidtv not ready yet. Retrying in 90 seconds.
Platform androidtv not ready yet. Retrying in 120 seconds.
Platform androidtv not ready yet. Retrying in 150 seconds.
Platform androidtv not ready yet. Retrying in 180 seconds.
Log Details (ERROR)
Logger: androidtv.adb_manager
Source: components/androidtv/media_player.py:218
First occurred: 10:42:13 PM (7 occurrences)
Last logged: 10:52:50 PM

ADB device is unavailable; encountered an error when searching for device.
Log Details (ERROR)
Logger: homeassistant.components.media_player
Source: components/androidtv/media_player.py:215
Integration: Media player (documentation, issues)
First occurred: 10:42:13 PM (1 occurrences)
Last logged: 10:42:13 PM

Error while setting up androidtv platform for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/androidtv/media_player.py", line 215, in setup_platform
    state_detection_rules=config[CONF_STATE_DETECTION_RULES],
  File "/usr/local/lib/python3.7/site-packages/androidtv/__init__.py", line 52, in setup
    aftv = BaseTV(host, port, adbkey, adb_server_ip, adb_server_port, state_detection_rules, auth_timeout_s)
  File "/usr/local/lib/python3.7/site-packages/androidtv/basetv.py", line 100, in __init__
    self.device_properties = self.get_device_properties()
  File "/usr/local/lib/python3.7/site-packages/androidtv/basetv.py", line 206, in get_device_properties
    constants.CMD_MAC_ETH0)
  File "/usr/local/lib/python3.7/site-packages/androidtv/adb_manager.py", line 435, in shell
    return self._adb_device.shell(cmd)
  File "/usr/local/lib/python3.7/site-packages/ppadb/command/transport/__init__.py", line 20, in shell
    conn = self.create_connection(timeout=timeout)
  File "/usr/local/lib/python3.7/site-packages/ppadb/device.py", line 45, in create_connection
    self.transport(conn)
  File "/usr/local/lib/python3.7/site-packages/ppadb/command/transport/__init__.py", line 15, in transport
    connection.send(cmd)
  File "/usr/local/lib/python3.7/site-packages/ppadb/connection.py", line 77, in send
    return self._check_status()
  File "/usr/local/lib/python3.7/site-packages/ppadb/connection.py", line 83, in _check_status
    raise RuntimeError("ERROR: {} {}".format(repr(recv), error))
RuntimeError: ERROR: 'FAIL' 00a7device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

Posts: 1

Participants: 1

Read full topic


Problems acessing ConBee 2 zigbee-devices in Node-Red

$
0
0

@jmF wrote:

I have problems connecting Node-RED deconz-nodes to zigbee sensors accessed via ConBee II.

My configuration:
Raspberry Pi 4 2GB, IP 192.168.178.38
ConBee II Version 2.05.75/8.3.2020 Firmware 264A0700
HassOS 3.12 from image hassos_rpi4-3.12.img
deCONZ 5.3.2
Node-RED 6.1.4

All Versions (SW and HW) updated to newest versions

manually integrated discovery: in configuration.yaml file.
dconz integrated in homeassistant
Several Sensors successfully added.
Sensors show up in homeassistant main page with correct values.

node-red-contrib-deconz 1.1.13 installed

In Node-RED:
Dragged node ‘dconz-event’ to the main window
Double-click the node to edit it
Entered the PIs IP-adress ‘192.168.178.38’
Clicked on ‘Get Settings’

And the oly thing I get is the alert ‘HomeAssistant? Fill only IP-address of your HA server’

Does someone know what step I left out to get the thing running?
As I said, homeassistant gets the sensor values from ConBee II, but the connection to Node_RED is not working.

Are there any solutions or suggestions to get it working?

I used websearch, reinstalled the system a few times in the last weeks but found no solution.

Thanks in advance and stay healthy.

Michael

Posts: 1

Participants: 1

Read full topic

Store calculated values?

$
0
0

@MikeS wrote:

Probably a noob question. I have created a number of sensors that are set by automations and calculate a lot of stuff, like energy usage, solar power generated etc. My problem is that the values get ‘lost’ during a restart of HA, wich happens quite a lot since i am always experimenting with it. Can anyone point me in the right direction?

Help would be greatly appreciated!

Posts: 5

Participants: 4

Read full topic

Can I trigger automations - locally - using Alexa or Google Home?

$
0
0

@DonnyBahama wrote:

I’d like to trigger automations using voice commands without using the cloud. I’d prefer to do this in Node-RED. Is anyone already doing this? If so, could you please share how it’s done? If it’s not currently possible, does anyone have a workaround they like?

Posts: 10

Participants: 3

Read full topic

How to map Conbee 2 USB Stick to Home Assistant Supervised..?

$
0
0

@MichaelE wrote:

Dear community!
I am just trying to get my Conbee2 stick to work.
It seems like I have to map it into my HA Docker-Container, but I have no idea how…
I am using a supervised install on a Raspi4.
Maybe someone can give me a hint?
Is there somewhere a config-file where I can modifiy the startup-parameters of the container?

Thanks a lot & best regards!
Michael

Posts: 7

Participants: 2

Read full topic

Unable to find referenced entities light.kitchen

$
0
0

@jjross wrote:

I’m getting this in my logs fairly regularly:

Unable to find referenced entities light.kitchen
12:12:06 PM – helpers/service.py (WARNING)

I get that there’s probably an automation or something that’s referencing a hue group that I had originally imported (I turned that off as it was filling my gui with groups) but I can’t figure out what the cause is. Is there any way to narrow things down so I can see what’s trying to reference the entity so I can fix it?

Posts: 3

Participants: 2

Read full topic

Change icon on state change of other entity

$
0
0

@Hellis81 wrote:

I have an ESP8266 with a servo and a photoresistor with a digital out.

Both work fine Home Assistant can control the servo HA respond to light changes.

image
The HDMI state is the entity that reads which output is active on the switch so on or off means TV or Projector.

I have earlier got the following working with some help.

switch.sonoff_1000000000:
      friendly_name: Kaffekokaren
      templates:
        icon: mdi:coffee-maker
        icon_color: if (state === 'off') return ''; 
                    if (entities['counter.counter'].state == "0") return 'rgb(255, 0, 0)';
                    if (entities['counter.counter'].state == "1") return 'rgb(155, 100, 0)';
                    if (entities['counter.counter'].state == "2") return 'rgb(50, 200, 0)';
                    if (entities['counter.counter'].state == "3") return 'rgb(0, 255, 0)';
                    if (entities['counter.counter'].state == "4") return 'rgb(0, 155, 100)';
                    if (entities['counter.counter'].state == "5") return 'rgb(0, 50, 200)';
                    if (entities['counter.counter'].state == "6") return 'rgb(0, 0, 255)';
                    if (entities['counter.counter'].state == "7") return 'rgb(100, 0, 155)';
                    if (entities['counter.counter'].state == "8") return 'rgb(200, 0, 50)';

and this change the color of the icon.
I figured I could use the same with changing icon, so I tried the following:

script.1585736971040:
      friendly_name: HDMI_Switch
      assumed_state: false
      templates:
        icon: if (entities['binary_sensor.hdmi_state'].state === 'off') return 'mdi:projector';
              if (entities['binary_sensor.hdmi_state'].state === 'on') return 'mdi:television-classic';

I have tried with if, else, with === or == and switching place with on and off state. It will only shows as ‘on’.
Even when I can see the state in the frontend saying off, the HDMI switch icon is not changed.

What I’m doing wrong?

Posts: 4

Participants: 2

Read full topic

Cover template position 0 corresponds to "Open" instead of "Closed"

$
0
0

@joshlawless wrote:

I have a number of Bali blinds connected to my ISY controller and exposed to Home Assistant as lights.

I have attempted to create template covers for these blinds in my configuration file, based upon the status of the light as reported by ISY.

When the covers are closed, the lights are off, and no longer have a “brightness” attribute, so I have tried to create, with position templates, a way to handle this. But when the brightness of the light is “None”, and the position template sets the position of the cover template to 0, the UI of home assistant shows that the cover is “open”

Here is the relevant configuration:

      nook_middle_window_blind:
        friendly_name: Nook Middle Window Blind
        position_template: >-
          {% if state_attr('light.nookmid_mc' , 'brightness') == None %}
            0
          {% elif state_attr('light.nookmid_mc' , 'brightness') > 0 %}
            {{ state_attr('light.nookmid_mc' , 'brightness') }}
          {% else %}
            0
          {% endif %}          
        icon_template: >-
          {% if state_attr('light.nookmid_mc' , 'brightness') == None %}
            mdi:checkbox-blank
          {% elif state_attr('light.nookmid_mc' , 'brightness') == 100 %}
            mdi:checkbox-blank-outline
          {% elif state_attr('light.nookmid_mc' , 'brightness') > 0 %}
            mdi:gradient            
          {% else %}
            mdi:checkbox-blank
          {% endif %}
        open_cover:
          service: light.turn_on
          data:
            entity_id: light.nookmid_mc
            brightness: 100
        close_cover:
          service: light.turn_off
          data:
            entity_id: light.nookmid_mc          
        stop_cover:
          service: light.turn_on
          data:
            entity_id: light.nookmid_mc          
        set_cover_position:
          service: light.turn_on
          data_template:
            entity_id: light.nookmid_mc
            brightness: "{{position}}"

Just to confirm that the UI is reading this all correctly, I used the developers tools section and provide the following template for evaluation:

{{ states.light.nookmid_mc }}

{{ states.cover.nook_middle_window_blind }}

{% if state_attr('light.nookmid_mc' , 'brightness') == None %}
  0
{% endif %}

The output of this evaluation is:

<template state light.nookmid_mc=off; friendly_name=NookMid MC, supported_features=1 @ 2020-04-09T12:54:32.657836-06:00>

<template state cover.nook_middle_window_blind=open; friendly_name=Nook Middle Window Blind, icon=mdi:checkbox-blank, supported_features=15 @ 2020-04-09T12:54:32.090960-06:00>


  0

Can anyone help explain why the cover state is “open” when the position_template is evaluating a “None” brightness as a 0?

Posts: 1

Participants: 1

Read full topic


How to check if picture is uptodate

$
0
0

@Thuurke wrote:

Hello,

I have an automation that is triggered by a button (doorbell)
The action is taking a picture from a esp32-cam programmed with esphome and send the picture to telegram.

I have this code:

    - service: camera.snapshot
      data:
        entity_id: camera.esp32cam01
        filename: '/home/homeassistant/.homeassistant/www/camerapictures/doorbell.jpg'

If the camare is disconnected the file is not replaced and an old picture is sent.

I can add a condition of “when camera is online”, and make an other automation that is triggered if not and send a telegram that camera is down (but doorbell is pushed).

Other way could be: Check if file exists before sending and if so send picture and delete it after sending the telegram. Is this possible?

Posts: 1

Participants: 1

Read full topic

Problem passing parameters to shell_command

$
0
0

@stargex wrote:

So I know this has been talked about a bunch on other threads but nothing mentioned in those seem to be helping me. I’m trying to setup a shell_command for the first time and I can’t seem to get it to accept any parameters. The command does work without parameters though so I’m not sure what is going on.

I’ve defined the shell_command in my configuration.yaml file like this:

shell_command:
  show_toast_command: node C:\path\to\node\script\showToast.js {{ entity_id }}

I’ve then tried to run the command through the web UI under Developer Tools -> Services and provided the following Service Data (YAML):

entity_id: "foobar"

This then produces the following error in the logs:

2020-04-09 12:36:38 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `node C:\path\to\node\script\showToast.js {{ entity_id }}`, return code: 1
NoneType: None

So if I replace {{ entity_id }} with just a hard coded value and don’t provide any service data the service call works. It only errors as soon as I add that parameter. I have tried wrapping the whole command in single quotes too and that doesn’t seem to change anything.

Any ideas what could be wrong? I’m guessing it is something super simple but I can’t quite figure it out.

Posts: 1

Participants: 1

Read full topic

Not able to translate MQTT state topic values in correct HASS light state. Probably due to templating

$
0
0

@Marcel1 wrote:

Hi!

I can’t get HASS to properly detect if my dimmer lights are ON or OFF via MQTT.
I am pretty sure i am overlooking something really simple. I am new to MQTT, so excuse me for asking stupid questions :slight_smile:

I have just two MQTT topics:

  • /service/fhem/gw_keukenkoof/dim
  • /service/fhem/gw_keukenkoof/cmnd

Publishing any number between 1 and 100 to the /cmnd topic will switch ON my lights (value 1 being the darkest and 100 being the brightest). Publishing a 0 will switch OFF my lights.
The /dim topic just represents the actual status

I am able to set the right dim value via HASS, however I am not able to read it. Even detecting if the lights are ON or OFF is not working for me. So controlling the brightness outside (or on/off state) outside of HASS is not reflected in HASS.

Below is my yaml

light:
  - platform: mqtt
    name: "Keuken Koof Dimmer"
    state_topic: "/service/fhem/gw_keukenkoof/dim"
    state_value_template: "{{ 'OFF' if value == '0' else 'ON' }}"
    command_topic: "/service/fhem/gw_keukenkoof/cmnd"
    payload_off: "0"
    payload_on: "30"
    brightness_state_topic: "/service/fhem/gw_keukenkoof/dim"
    brightness_command_topic: "/service/fhem/gw_keukenkoof/cmnd"
    on_command_type: 'brightness'
    brightness_scale: 100

Any help in the right direction is appreciated.

Posts: 2

Participants: 2

Read full topic

Aeon Mico switches

$
0
0

@catchmonster wrote:

hi,
Is it Aeon micro switch a good solution to drive all Heat/Fan/Light/Night-Light 4 Function On/Off Switch?
I am not familiar with Aeon micro switches, and I am trying to figure out if I need to setup some sort of access box for three or four of these micro switches so that I can connect them to these four functions.

I am using this switch to control FV-11VH2 WhisperWarm Fan/Heater Combination, Ventilation Fan in bathroom …

Much appreciated

Posts: 1

Participants: 1

Read full topic

Reduce Light Brightness Maximum

$
0
0

@rwlove wrote:

Is there a way that I can limit a light’s maximum brightness? I have an Elgato Key Light that is too bright for my need, even when at a very low setting. I’d like to be able to reduce its maximum brightness.

Posts: 2

Participants: 2

Read full topic

Home tracks documentation?

$
0
0

@2ndchanceor wrote:

In the 0.108 release, the notes said that a “tracking display” option is available on the Home card. I’m unable to find the documentation for that. Directions? :smile:

Posts: 1

Participants: 1

Read full topic

[SOLVED] Automate switching of Sony Bravia TV Scenes to change post-processing or picture mode for certain content

$
0
0

@shawly wrote:

Edit: I got it working now, see below for the solution


So I’ve been trying to get the “Scenes” from my Sony Bravia so I can add them to an input_select list and change the scene of my Bravia. I’ve been able to change the scene as well as get the current scene from the API, but I’m having difficulties mapping the values from the json array of scenes.

This is the raw response from my TVs API:

JSON Response
{
  "id": 40,
  "result": [
    {
      "candidate": [
        {
          "value": "general"
        },
        {
          "value": "auto"
        },
        {
          "value": "auto24pSync"
        },
        {
          "value": "photo"
        },
        {
          "value": "music"
        },
        {
          "value": "cinema"
        },
        {
          "value": "game"
        },
        {
          "value": "graphics"
        },
        {
          "value": "sports"
        },
        {
          "value": "animation"
        }
      ],
      "currentValue": "game"
    }
  ]
}

And here are my configurations for accessing the TV API:

sensors.yaml
######### Sony Bravia KDL-55W805B ###########
############# Current Scene Sensor ##########
  - platform: rest
    name: Sony Bravia TV Power Status
    resource_template: !secret bravia_systemurl
    headers:
      x-auth-psk: !secret bravia_psk
    method: POST
    payload: '{"method":"getPowerStatus","params":[""],"id":1,"version":"1.0"}'
    value_template:  >
      {%- if value_json is defined -%}
        {{- value_json.result[0].status -}}
      {%- else -%}
        offline
      {%- endif -%}
    scan_interval: 5
############# Current Scene Sensor ##########
  - platform: rest
    name: Sony Bravia TV Current Scene
    resource_template: !secret bravia_videoscreenurl
    headers:
      x-auth-psk: !secret bravia_psk
    method: POST
    payload: '{"method":"getSceneSetting","params":[""],"id":40,"version":"1.0"}'
    value_template:  >
      {%- if value_json is defined -%}
        {{- value_json.result[0].currentValue -}}
      {%- else -%}
        auto
      {%- endif -%}
    scan_interval: 5
############# All Scenes Sensor #############
  - platform: rest
    name: Sony Bravia TV Scene Setting
    resource_template: !secret bravia_videoscreenurl
    headers:
      x-auth-psk: !secret bravia_psk
    method: POST
    payload: '{"method":"getSceneSetting","params":[""],"id":40,"version":"1.0"}'
    json_attributes_path: "$.result.[0]"
    json_attributes:
      - candidate
      - currentValue
    value_template:  'OK'
input_selects.yaml
  sony_bravia_tv_scenes:
    name: Sony Bravia TV Scenes
    icon: mdi:image-filter-hdr
    options: [ None ]
rest_commands.yaml
######### Sony Bravia KDL-55W805B ###########
############ Set Scene Command ##############
  sony_bravia_tv_set_scene_setting:
    url: 'http://{{ host }}/sony/videoScreen'
    method: POST
    headers:
      x-auth-psk: '{{ psk }}'
      accept: 'application/json'
    payload: '{"method":"setSceneSetting","params":[{"value":"{{ scene }}"}],"id":40,"version": "1.0" }'
    content_type:  'application/json; charset=utf-8'
############ Fill input command #############
  sony_bravia_tv_input_select_set_options:
    url: '{{ url }}/services/input_select/set_options'
    method: POST
    headers:
      authorization: 'Bearer {{ token }}'
      content-type: 'application/json'
    payload: >-
      {
        "entity_id": "input_select.sony_bravia_tv_scenes",
        "options": [
      {%- for item in state_attr("sensor.sony_bravia_tv_scene_setting", "candidate")|map(attribute="value")|list -%}
        "{{- item -}}"{% if not loop.last %}, {% endif %}
      {%- endfor -%}
        ]
      }
automations.yaml
######### Sony Bravia KDL-55W805B ###########
####### Automation to disable automations when TV is off #######
  - alias: Sony Bravia TV Automations
    initial_state: 'off'
    trigger:
      - platform: state
        entity_id: sensor.sony_bravia_tv_power_status
        to: 'standby'
      - platform: state
        entity_id: sensor.sony_bravia_tv_power_status
        to: 'offline'
    action:
      # Turn off automations
      - service: automation.turn_off
        data:
          entity_id: automation.sony_bravia_tv_input_select_scene_set
      - service: automation.turn_off
        data:
          entity_id: automation.sony_bravia_tv_input_select_current_scene_populator
      - service: input_select.set_options
        data_template:
          entity_id: input_select.sony_bravia_tv_scenes
          options: [ 'None' ]
####### Automation to query scenes from Sony Bravia TV for input select #######
  - alias: Sony Bravia TV Input Select Scenes Populator
    initial_state: 'on'
    trigger:
      - platform: homeassistant
        event: start
      - platform: state
        entity_id: sensor.sony_bravia_tv_power_status
        to: 'active'
    action:
      # Turn off other automations
      - service: automation.turn_off
        data:
          entity_id: automation.sony_bravia_tv_input_select_scene_set
      - service: automation.turn_off
        data:
          entity_id: automation.sony_bravia_tv_input_select_current_scene_populator
      # Fill input_select.sony_bravia_tv_scenes with all available scenes
      - service: rest_command.sony_bravia_tv_input_select_set_options
        data:
          url: !secret internal_api_url
          token: !secret internal_api_token
      - service: input_select.select_option
        data_template:
          entity_id: input_select.sony_bravia_tv_scenes
          option: '{{ states("sensor.sony_bravia_tv_current_scene") }}'
      # Turn other automations on again
      - service: automation.turn_on
        data:
          entity_id: automation.sony_bravia_tv_input_select_scene_set
      - service: automation.turn_on
        data:
          entity_id: automation.sony_bravia_tv_input_select_current_scene_populator
      - service: automation.turn_on
        data:
          entity_id: automation.sony_bravia_tv_automations
####### Automation for sending the selected scene to Sony Bravia TV #######
  - alias: Sony Bravia TV Input Select Scene Set
    initial_state: 'off'
    trigger:
      - platform: state
        entity_id: input_select.sony_bravia_tv_scenes
    action:
      - service: rest_command.sony_bravia_tv_set_scene_setting
        data_template:
          host: !secret bravia_host
          psk: !secret bravia_psk
          scene: '{{ states("input_select.sony_bravia_tv_scenes") }}'
####### Automation to query current scene from Sony Bravia TV for input select #######
  - alias: Sony Bravia TV Input Select Current Scene Populator
    initial_state: 'off'
    trigger:
      - platform: state
        entity_id: sensor.sony_bravia_tv_current_scene
    action:
      - service: automation.turn_off
        data:
          entity_id: automation.sony_bravia_tv_input_select_scene_set
      - service: input_select.select_option
        data_template:
          entity_id: input_select.sony_bravia_tv_scenes
          option: '{{ states("sensor.sony_bravia_tv_current_scene") }}'
      - service: automation.turn_on
        data:
          entity_id: automation.sony_bravia_tv_input_select_scene_set
media_players.yaml
  - platform: braviatv
    name: Sony Bravia KDL-55W805B
    host: !secret bravia_host
secrets.yaml
bravia_host: '192.168.0.200' # this is your bravias ip
bravia_psk: '0000' # this is your bravias psk (set it within "Network Settings" on the TV)
bravia_videoscreenurl: 'http://192.168.100.49/sony/videoScreen' # this is the api url to get tv scenes, insert your bravias ip here
bravia_systemurl: 'http://192.168.100.49/sony/system' # this is the api url to get tv power state, insert your bravias ip here
internal_api_url: 'http://hass.example.com:8123/api' # make sure this url points to your hass api  otherwise it will result in 401 and 403 errors
internal_api_token: '<your token>' # generate a new long lived token in your profile settings
configuration.yaml
# enable api
api:

automation: !include automations.yaml
sensor: !include sensors.yaml
media_player: !include media_players.yaml
rest_command: !include rest_commands.yaml
input_select: !include input_selects.yaml

This configuration basically pulls the available scenes from the TVs API including the currently set scene of the TV. The “Sony Bravia TV Current Scene” sensor pulls the current scene from the API every 5 seconds. If the value has changed (when you manually change it with your remote for example) it will update the current option of the input_select to the current value of the API response. If you select a scene in the input_select it will send the new value to the TV updating the scene.
I wrote this automation so I can turn off the post processing when I want to play games on the TV.

This can be combined for stuff like changing the scene to game when your AVR or TV changes to a gaming console input, effectively reducing the post processing of the TV. Or if you want to watch anime it can change to animation or cinema when watching Netflix.

I also implemented a better state detection for the TVs on/off state via API since the media_player for Bravias isn’t as fast and isn’t implementing API calls properly.

I can confirm that this is working for my Sony Bravia KDL-55W805B, but if the API didn’t change it should effectively work for most Sony Bravia models released after 2013. I can’t guarantee it of course, you have to look through the API yourself.

Here are some useful resources for getting info on your Bravias API:
https://pro-bravia.sony.net/develop/integrate/rest-api/spec/index.html

Posts: 1

Participants: 1

Read full topic


Need help for Input Datetime

$
0
0

@Dmitriy_As wrote:

My time is now 23:10
I want to perform automation on time

  1. In Configuration - Helpers - Add Helpers - Date and/or time - Create Time

  2. In automatios.yaml

- alias: Xiaomi OFF at clock
  trigger:
  - platform: template
    value_template: "{{ states('sensor.time') == (state_attr('input_datetime.time', 'timestamp') | int | timestamp_custom('%H:%M', True)) }}"
  action: 
  - entity_id: fan.xiaomi_miio_device
    service: fan.turn_off
  1. In configuration.yaml
homeassistant:
  time_zone: Asia/Yekaterinburg

sensor:
  - platform: time_date
    display_options:
      - time
      - date

time in sensor.time shows mine - 23:10 and input_datetime.time - 23:10

For Overview Creater new Card

cards:
  - entities:
      - entity: input_datetime.time
    show_icon: true
    show_name: true
    show_state: true
    theme: Backend-selected
    title: Xiaomi
    type: glance
type: horizontal-stack

It works, but the shutdown time doesn’t make it mine, but “My time” - 5 hours. = UTC
So In order for it to turn off at my time I need to set 18:10

how can I fix this? why is he taking time out of my zone?

Posts: 8

Participants: 2

Read full topic

Zwave Devices Slowly Going "Unknown"

$
0
0

@Jonesie wrote:

I’m using the latest Home Assistant, installed from the RPi3 image and upgraded regularly, now running 0.108.1 with HassOS 3.12. As far as I can tell, everything is up to date.

I installed 3x Honeywell ZW3010 dimmers 4-6 weeks ago, and they come into HA as “Unknown id=0039 Unknown: type=4944, id=3235” I’ve read a bunch of stuff about editing the manufacturer_specific.xml file, but haven’t done anything about that yet.

In the past couple of days, I’ve noticed other devices that were previously working fine and properly identified have now dropped into unknown states:

  • Multiple Leviton DZPA1-2BW outlets
  • In-Wall Switches and Dimmers from GE and GoControl
  • GoControl Door/Window Sensor
  • Even my HUSBZB-1 ZWave controller is now listed as unknown.

Z-Wave is becoming totally unusable all of the sudden. Everything on the ZigBee side of the HUSBZB-1 seems to be fine.

I also see a lot of the following errors in the OZW_Log.txt file

2020-04-09 13:55:58.142 Detail, Node011, Notification: ValueAdded
2020-04-09 13:55:58.170 Warning, Exception: Manager.cpp:2499 - 102 - ValueID passed to GetValueFloatPrecision is not a Decimal Value
2020-04-09 13:55:58.170 Warning, Exception: Manager.cpp:2499 - 102 - ValueID passed to GetValueFloatPrecision is not a Decimal Value

Any help you would be able to provide would be greatly appreciated!

Thanks!

Posts: 1

Participants: 1

Read full topic

Cards all lining up in one big column in .107.7 instead of multiple as they used to

$
0
0

@scstraus wrote:

Hi all,

I’ve just noticed that some of my views no longer stack the cards in multiple columns, just in one big one down the middle since .107… I am not using panel=true on these views and have not modified the views at all… Any idea why this is happening all of a sudden in latest releases? This one used to show in 3 columns across, now it’s only one, even if I zoom out to 30%.

My config is here if anyone wants to examine it.

Same with this one:

Posts: 2

Participants: 2

Read full topic

Can't pair more than one xiaomi light to HA

$
0
0

@dthporro wrote:

Hey there! after some struggling i’ve now home assistant working on my house :slight_smile:started to pair devices, philips hue without problems, but when it comes to pair xiaomi zhirui downlight it’s a little tricky.

I’ve got the token, and the correct config to pair a downlight, here’s the config:

#Xiaomi Downlight MID
light:

  • platform: xiaomi_miio
    name: Xiaomi Pasillo MID
    host: 192.168.1.165
    token: !!!secrettoken!!!
    model: philips.light.downlight

ok, light appears in lovelace as it:

but if i add a second or third downlight, it only appears the last one:

#Xiaomi Downlight IN:
light:

  • platform: xiaomi_miio
    name: Xiaomi Pasillo IN
    host: 192.168.1.164
    token: !!!secrettoken!!!
    model: philips.light.downlight

#Xiaomi Downlight OUT
light:

  • platform: xiaomi_miio
    name: Xiaomi Pasillo OUT
    host: 192.168.1.167
    token: !!!secrettoken!!!
    model: philips.light.downlight

#Xiaomi Downlight MID
light:

  • platform: xiaomi_miio
    name: Xiaomi Pasillo MID
    host: 192.168.1.165
    token: !!!secrettoken!!!
    model: philips.light.downlight

how should i do to make all lights visible on home assistant? plus, i’ve more to add later, so the problem is going to get bigger.

Thank you in advice!

Posts: 6

Participants: 2

Read full topic

Ajuste en la iPhone de my raspberry pi4

$
0
0

@HugoJesahel wrote:

Hola, soy nuevo en el tema de la domótica y me llamó mucho la atención Hassio, lo he instalado pero he observado que a cada momento me cambia la IP para poder accesar a él, de inicio no generé la USB config, porque la conecte directo al puerto de red de mi enrutador, pero ahora pago las consecuencias.

Me pueden ayudar por favor diciéndome que debo hacer para establecer una IP estática para mi dispositivo?

De antemano gracias por su ayuda… Saludos

Posts: 1

Participants: 1

Read full topic

Viewing all 100861 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>