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

IR remote control Air Conditioner get always different raw

$
0
0

@Bratan9600 wrote:

Using XIAOMI MI REMOTE (chuangmi.remote.v2). I successfully learn commands and control the remote control from the TV. However, when I try to read commands from the air conditioning control, I always get different commands (raw string) for the same state.
For example, I press power on - get raw1, I press power off - get raw2, without making changes to the states of the air conditioner, I press power on again. Logically, I should get raw1, but I get raw3. Similarly, turning off - get raw4.
Attempts to send these commands via IR do not lead to anything - the air conditioner does not turn on / off.

Any ideas why it can be?

Zanussi Fresco air conditioner
Remote control ZH/TT-02

Posts: 1

Participants: 1

Read full topic


Eco-Eye Smartpv, Tasmota and serial connection

$
0
0

@tfspark wrote:

Hi All, first post here and very new to Home Assistant.
I need help please with an Eco-Eye SmartPv and getting data into HA.

https://www.eco-eye.com/product-monitor-solar-smartpv

I have HA running on a Raspberry Pi 3. I have a solar pv system and use an Eco-Eye Smartpv to display power usage and generation.
This device has a serial connection on it and every four seconds it sends two lots of data (uuuu,gggg) terminated by a carriage return, where uuuu is usage in amps * 100 and gggg is generated in amps * 100. I have it connected to a Wemos D1 Mini running Tasmota.

When looking in the Tasmota console I can see it publishing the values to my mqtt topic. For instance -:

12:49:32 MQT: tele/testmqtt/RESULT = {“SSerialReceived”:0103,0609}

I have set up a sensor in Home Assistant called smartpv.

sensor 7:
   platform: mqtt
   name: smartpv
   state_topic: tele/testmqtt/RESULT

When I look in Developer Tools, States it shows the following under sensor.smartpv

{“SSerialReceived”:0079,0611 }

so the sensor is showing data.

Now I’m stuck as I don’t know how to extract that data in HA.
I would like to split out the data perhaps into two sensors? one called usage and one called generated. I would then like combine it into a Lovelace card (perhaps a guage?) to show red when using energy and green when producing more than using.

I have spent a few days searching for a solution but nothing seems to come close.
Is it a json payload? and I suspect I need to use a template but as a new user I now need some help if possible.

Posts: 1

Participants: 1

Read full topic

[Newbie] Problem with notifications in history

$
0
0

@tireks wrote:

Hi everyone.
I am now expermenting with persistent_notification.create service and automations and maybe my question is dumb, but I’ve looked through a lot of documentation and i’m truly can’t solve this problem myself.
Problem is :
I’ve created simple automation with mqtt trigger that calls persistent_notification.create service

  alias: test automation
  description: ''
  trigger:
  - payload: 'on'
    platform: mqtt
    topic: home-assistant/controller_STATES/lights/boiler_livolo_1
  condition: []
  action:
  - data:
      message: Boiler lights on
      title: Alarm
    service: persistent_notification.create

i’ve tested this automation and everything was perfect, until i opened the “History” section :

I don’t know, how to remove all of notifications from history. I can’t use persistent_notification.dismiss, cos I didn’t even indicate notification_id in persistent_notification.create

Posts: 1

Participants: 1

Read full topic

Last data update on lovelace card

$
0
0

@stix wrote:

I have rest api, where data is updated once per 15min. Output is json array with values and unix timestamp (example: 1588854014) which tell when is data in response updated. Parsing data is ok, but I don’t know how to show “updated X min ago” on lovelace card.

I start with template to parse unix timestamp and convert it to required format:

- platform: template
  sensors:
    eliot_last_update:
      value_template: '{{ states.sensor.eliot.attributes["timestamp"] }}'
      device_class: timestamp
    eliot_updated_ago:
      value_template: >-
        {% set last_updated = states.sensor.eliot.attributes["timestamp"] %}
        {% set seconds = now().timestamp()-last_updated %}
        {% set hours = seconds / 3600 %}
        {% if seconds / ( 60 * 60 ) > 1 %}
          {{ (seconds //  ( 60 * 60 ))|int }} hrs
        {% else %}
          {{ (seconds // 60)|int }} min
        {% endif %}

This show correct values, but problem is - sensor eliot_updated_ago was updated only when fetching new data from rest api. So for example I see updated 5min ago for 10 minutes. State last_updated of sensor can’t be used, because update of sensor (retrieve data from api) doesn’t mean that data in response are changed from previous call. And other thing, there is no reason to save eliot_updated_ago every minute to db.

Is there any option to take unix timestamp from eliot_last_update and count time difference directly on lovelace card, without saving to database? If not, can I set something like refresh rate for eliot_updated_ago?

Posts: 1

Participants: 1

Read full topic

Best method to hide phone badges in Lovelace?

$
0
0

@aming-miyembro wrote:

Howdy,

I have no need of the many badges from our smartphones cluttering up the Home Assistant interface. Drilling down into the Lovelace configuration options, it looks like one can delete the Entities in the Raw configuration editor – haven’t actually tried it yet – but is the most optimal way to make the badges go away?

Thanks.

Posts: 1

Participants: 1

Read full topic

Open website to start device

$
0
0

@totolino wrote:

Hi all!

I can start my lawnmower by opening 192.168.178.51/start and i can send it home by opening 192.168.178.51/gohome.

Whats the best way to use it with homeassistant (hassos).

Curl?
Or restful command?

Posts: 1

Participants: 1

Read full topic

How to access files in Ubuntu VirtualBox?

$
0
0

@msmilkshake wrote:

Hello, I have set up home assistant on a Linux VirtualBox on my Windows 10 computer and I am wondering how can I access the configuration.yaml to configure it, and all the other files??

I tried FTP but can’t connect…
I tried with these settings:

2cLod7K

Can somebody help me?

Posts: 2

Participants: 2

Read full topic

Text entry box on home screen for use in an automation

$
0
0

@getut wrote:

As a compromise with my better half, I need to try and get a text box on my home screen to disable some automations. Here is the scenario …

I have an automation that turns the target lights on with motion. I have a second automation that also monitors the motion, but starts a 5 minute timer. If it goes for 5 minutes without seeing motion, it turns the target lights back off again.

My wife does not like the lights coming on and off even though there is a 5 minute delay to any action, she does not like this and keeps disabling my automations and forgetting to turn them back on when she is done in the area. Sometimes she wants the lights permanently off and sometimes she wants them permanently on.

As a compromise, I’d like to set up a text box with an on off switch that will turn the lights either on and off and leave it that way for X number of minutes, then re-enable the automations as normal.

Any idea how to implement this?

Posts: 1

Participants: 1

Read full topic


Need help with Mycroft integration

$
0
0

@ToonK wrote:

I’ve went through the steps, I added mycroft’s IP at the configuration.yaml, created the long-lived access token, in Mycrof.ai I added the ip-address of the Raspberry pi4b where HASS is running and added the token…searched the web for this error…but can’t seem to find it.

All I get is (in Mycroft):

Access to home assistant server at http://ipofhass:8123/api/states failed.
*ipofhass replaced with actual ip-address

Does anyone know what that means? Did anyone get a successful connection…?

Posts: 1

Participants: 1

Read full topic

Camera.record don't build correct index in mp4 videos

$
0
0

@DendelX wrote:

Hello, I have been recording my cameras for a long time using the camera.record service with code similar to this:

- service: camera.record
    data:
      entity_id: camera.patio
      filename: '/config/tmp/records/patio/{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4'
      duration: 30
      lookback: 5

the generated files seem correct, but when I play them in any player they don’t seem to have the index well built. The player cannot interpret the duration of the video and it is not possible to advance or rewind the mp4 file.

Is there any solution or another way to do my records?.

Thanks in advance

Posts: 2

Participants: 2

Read full topic

Unable to get Home Decorator / Hampton Bay Zigbee fan to pair

$
0
0

@boojew wrote:

Hey guys -

I need some assistance… I have this(https://community.smartthings.com/t/home-decorators-ceiling-fan-light-controller-mr101z-first-impressions/81408) Zigbee fan. I had it properly paired w/ Wink - but with the subscription pricing - I decided it was time to get it on Zigbee2Mqtt (my preferred choice) or Smartthings. I unpaired the fan from wink, it blinked a few times - but now Smartthings, Wink, Zigbee2mqtt refuse to see it when I try and pair it. I have tried to factory reset it multiple times with no luck. Both “hubs” are less than 3’ away :frowning: Zigbee2mqtt is in debug and pairing mode and doesnt report anything about seeing a new device - although this is my 1st time trying since it was moved to herdsman.

Thanks for any help

Posts: 1

Participants: 1

Read full topic

Xiaomi vaccum prevented to call home - strange behaviour

$
0
0

@rak wrote:

Hello,

I ran an all ubiquiti network with the typical setup of IoT/NoT/normal VPN networks.

IoT devices can talk to the internet, but are limited to talk to the local LAN (e.g. Alexa, Netatmo and alike).
NoT devices can not talk to the internet, but only to HASS. All in seperate VLANs and respective firewall rules.

I have my xiaomi vaccum (roborock S6) inmy NoT network. I dont want him call back to china.

With doing so i see constant reestablishing of the wifi connection when the NoT firewall blocking rule is active. If I turn the rull off and the vaccum can talk home is is not restarting the wifi connection.

I tried in firewall rule drop or reject with both same results.

Is this expected? Has this an impact of my overall wifi performance? How do you have this setup?

Regards
Ralf

Posts: 1

Participants: 1

Read full topic

Turn on light trough applescript

$
0
0

@robzombie wrote:

Hi

Is it possible to turn on a light I have in HA by running an applescript.
I found this thread on how to run a HA script trough SSH. Do I have to put all the HA-commands in a script first, can’t I simply put all commands in my applescript?

Robert

Posts: 2

Participants: 2

Read full topic

Abject Newbie looking for help in (complicated?) media configurations

$
0
0

@NYSteve wrote:

Hi, everyone. I’m new to Home Assistant but a long time IOT/home automation person looking to make a fully integrated solution so that my family can more effectively use everything without going to a million different places. Home Assistant looks excellent for this, and I started to set it up.

Before I get too far - one of the things that has always been a challenge for my family has been our complicated media setup. We have a home theater receiver (HEOS compatible), with a smart tv (Vizio SmartCast). I also have a whole house audio setup with a Logitech Media Server ( and squeezebox) and use it for Spotify in addition to music on my own server. And a logitech Harmony which makes at least the home theater setup better but doesn’t do much for the streaming music services. And so on. Each individual piece can be integrated into Home Assistant, but the way I’ve seen it work so far, I end up with the digital equivalent of several remote controls.

Here’s the way I’d love for this to work, but I haven’t seen anything else work quite like this.
I’d like to have a panel for each media location (or zone) - kitchen, deck speakers, living room, etc. That panel can select an activity - listen to spotify, or local music; watch TV or Netflix; etc. And once an activity is selected, that panel should expand to have the appropriate controls for that activity - selecting playlists or chosing an artist for Spotify; driving the Netflix or cable box UI for that; etc. For Bonus points, I’d like to be able to group locations together so that whatever is playing on one is also routed to the other. For even more bonus points, I can give voice commands to my echo or Siri to do some common things.

I have all of the hardware to do this and with enough clicking around on enough apps I can make all of this happen myself, but I don’t know where to get started on building a UI that works this way.

Has anyone seen or built a lovelace panel that works even remotely like the one that I describe?

Thanks for the great work on Home Assistant - it’s so far the first thing I’ve played with that seems to have a shot at getting me where I want to go.

~Steve

Posts: 1

Participants: 1

Read full topic

Mikrotik and Xiaomi Gateway

$
0
0

@jojoro wrote:

I’m trying to setup Xiaomi Gateway (Aquara) working with network behind Mikrotik.
When I use a config:

gateways:
  - mac: 34CE008D4XXX
    key: qx8rfaXXXXXXXX
    host: 192.168.1.51
  - mac: 7811DCB06XXX
    key: op70q7XXXXXXXXX
    host: 192.168.1.50
  - mac: 7811DC6C9XXX
    key: ddfu2sp7jXXXXX
    host: 192.168.1.52

then Gateways are runing fine (detected, switches working, sensors sending temperature) but only for 30 -90 seconds.
After that all stops. I can tunr on/off lights (even on gateway) by clicking switches on hassio interface but psysical switchest stop working. Sensors do not updates and goes to unavailable state.

If I remove “host: ip” from my config then flatform auara could not be set up.
I think Mikrotik somehow block MULICAST but I don’t know how to enable it.

On old simple tplink router everything works fine.

Please help me.

Posts: 1

Participants: 1

Read full topic


Looking for help making the automation a bit more steamlined

$
0
0

@ptdalen wrote:

I’ve been using this automation for a long while and it “works”, but it’s a bit slow and clunky. When I wrote it, the goal was to fix an issue outside of HA between my Harmony Hub and my Sony TV that was IP controlled. Every month or so, the hub would loose it’s IP connection, and then the TV would not start. It I was home, easy enough, to go in and fix with the harmony App, but if the spouse was home, then she’d be stuck digging in drawers to get the sony remote, etc. So I aded the ROKU component to HA and did this kinda hacky trick, since HA could control my TV. I recently realized I could make this a bit faster

- alias: TV Force On for Tivo
  trigger:
  - platform: event
    event_type: roku_command
    event_data:
      source_name: Home Assistant
      type: keypress
      key: Fwd
  action:
  - delay:
      seconds: 5
  - condition: or
    conditions:
    - condition: template
      value_template: '{{ (states.media_player.living_room_tv.attributes.source) != "HDMI 1" }}'
    - condition: state
      entity_id: media_player.living_room_tv
      state: 'off'
  - service: media_player.turn_on
    entity_id: media_player.living_room_tv
  - delay:
      seconds: 5
  - service: media_player.select_source
    data:
      entity_id: media_player.living_room_tv
      source: 'HDMI 1'
  - service: notify.pushover
    data_template:
      target: Paul
      title: Sony TV lost Key
      message: Fix Harmony

Basically the roku FWD command is the last thing in the startup sequence for my activity.
If the TV is off, then turn it on and wait for 5 seconds and then set the input.

Overall there is a 10 second delay. I’d like to skip the 1st 5 second delay if the TV is on.
So something like this
ROKU fwd command
is TV on? and set to input 1. Do nothing
Is TV on , but wrong input? Switch Input
Is TV off? Turn it on, wait 5 seconds, then set input.

I’m struggling a bit with a service template, since there are two services I care about?

I’m sure it’s fairly obvious, but my brain is just not focusing in on the answer

Posts: 1

Participants: 1

Read full topic

Xiaomi Universal Remote Learn & Send

$
0
0

@febalci wrote:

So i have this Xiaomi Universal Remote, it has about 4 types, mine is chuangmi.remote.v2 model(latest?). I Did the configuration, HA sees and uses it safe and sound.

I use the following python scripts for IR learn and send, so that it can learn all codes for all buttons on the remote easily and much faster than HA way. I got these codes from Domoticz forum. Please note that you have to install python3 miio for this ( pip3 install python-miio)

Learn Code Script:
This learns 5 keys in order every time it is started and writes these codes to a file called “codes.txt”

#!/usr/bin/python3
import sys
import ipaddress
from typing import Any
from miio import ChuangmiIr,DeviceException
import time
import json
num_lines = sum(1 for line in open('codes.txt'))
print ('Stored Ir Keys  ->'+ str(num_lines) )
id = num_lines + 1
ir =  ChuangmiIr('192.168.XXX.XXX',XXXXXX....')

for i in range(5):
  ir.learn(key=1)
  t=0
  while ir.read(key=1).get("code")=='' and t<=5:
    time.sleep(0.1)
    t +=0.1

  print (str(i)+': '+ir.read(key=1).get("code"))

  with open('codes.txt', 'a') as file:
 	  file.write(ir.read(key=1).get("code")+ '\n')

Send Code Script:

#!/usr/bin/python3
import sys
import ipaddress
from typing import Any
from miio import ChuangmiIr,DeviceException
import time
#id = input('Enter code:')
id=Input('Enter the Code:')
ir =  ChuangmiIr('192.168.XXX.XXX','XXXXXXXXX.....,debug=1)
print (ir.info())
ir.play(id)

This worked very well for Pioneer BDP150, Pioneer VSX and Epson Projector.

However, with Sony Bravia TV and a Sagemcom TV set top box, it learns the codes, however when sending it, the devices don’t get the codes at all. There is no error on the script or HA when sending. Bravia works OK with Mi Home application. Sagemcom set top box doesn’t have any pre defined device in Mi Home app so i can’t test it.

Now i was wondering if there is a tip or trick to make the learned commands work with Bravia TV and the Sagemcom set top box? Is there anyone who made it work with Sony TVs? Is there a way to decode or encode these raw codes of chuangmi.remote.v2?

Bravia Power Code: "mU0mUwlk1nEwlkxmQBDTYBDwEPlk2mgA5TUAeZjMgBCAQQDHgB7mEAA="
Sagemcom Power Code: "mU1mEsnE0mEsmUyADKZzYAQgEHAHKZTcAhpjMgImmMym4CKzkAdpjOQODAIKYQA="

Posts: 1

Participants: 1

Read full topic

RFXtrx433 v1 and X10

$
0
0

@DaddyCool wrote:

Im trying to work out how to add a binary sensor MS13E - can only see it with rfxmgr with x10 on (tried AC and Lighting4 but nothing) It’s a combined motion (a1) and dusk (a2) sensor that I use to trigger a night lamp.

Upp’d logging to debug as info was not giving on/off

What I can see is the code 0710000X410Y0Z50
X increments per trigger
Y is 1 for the motion and 2 for dusk
Z = 1 on 0 off

2020-05-07 18:23:13 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: a2 Class: LightingDevice Sub: 0, Pkt_id: 0710000841020150)
2020-05-07 18:23:13 DEBUG (Thread-2) [homeassistant.components.rfxtrx.binary_sensor] Binary sensor update (Device ID: a2 Class: LightingDevice Sub: 0)
2020-05-07 18:23:13 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a2 device_update. Command: On
2020-05-07 18:23:13 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a2 device_update. Command: On
2020-05-07 18:23:22 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: a2 Class: LightingDevice Sub: 0, Pkt_id: 0710000941020050)
2020-05-07 18:23:22 DEBUG (Thread-2) [homeassistant.components.rfxtrx.binary_sensor] Binary sensor update (Device ID: a2 Class: LightingDevice Sub: 0)
2020-05-07 18:23:22 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a2 device_update. Command: Off
2020-05-07 18:23:22 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a2 device_update. Command: Off
2020-05-07 18:23:43 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: a1 Class: LightingDevice Sub: 0, Pkt_id: 0710000a41010150)
2020-05-07 18:23:43 DEBUG (Thread-2) [homeassistant.components.rfxtrx.binary_sensor] Binary sensor update (Device ID: a1 Class: LightingDevice Sub: 0)
2020-05-07 18:23:43 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a1 device_update. Command: On
2020-05-07 18:23:43 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a1 device_update. Command: On
2020-05-07 18:24:42 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: a1 Class: LightingDevice Sub: 0, Pkt_id: 0710000b41010050)
2020-05-07 18:24:42 DEBUG (Thread-2) [homeassistant.components.rfxtrx.binary_sensor] Binary sensor update (Device ID: a1 Class: LightingDevice Sub: 0)
2020-05-07 18:24:42 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a1 device_update. Command: Off
2020-05-07 18:24:42 DEBUG (Thread-2) [homeassistant.components.rfxtrx] Device_id: a1 device_update. Command: Off

Tried to add the below to configuration.yaml but errors

binary_sensor:
  platform: rfxtrx
  automatic_add: true
  devices:
    '0710000841020150':
      name: motion_landing
      device_class: motion
      off_delay:
        seconds: 60
      data_bits: 16
      command_on: 0x101
      command_off: 0x100
  devices:
    '0710000a41010150':
      name: dusk_landing
      device_class: light
      data_bits: 16
      command_on: 0x201
      command_off: 0x200

The error is:

2020-05-07 19:12:31 WARNING (SyncWorker_4) [homeassistant.util.yaml.loader] YAML file /var/opt/homeassistant/configuration.yaml contains duplicate key "devices". Check lines 51 and 60.
2020-05-07 19:12:31 ERROR (MainThread) [homeassistant.components.homeassistant] Invalid config for [binary_sensor.rfxtrx]: value must be at most 255 for dictionary value @ data['devices']['0710000a41010150']['command_off']. Got 512
value must be at most 255 for dictionary value @ data['devices']['0710000a41010150']['command_on']. Got 513. (See ?, line ?). 


Any pointers from the collective appreciated

Posts: 1

Participants: 1

Read full topic

How to hide control on group

$
0
0

@FattusMannus wrote:

I see that in a recent release the control: hidden option from groups has been removed.

How can I group items together now but hide the overall control for the group?

Thanks

Posts: 2

Participants: 2

Read full topic

Missing Automations, Scripts & Scenes from the frontend

$
0
0

@MarkBiHome wrote:

Hello

I seem to be having an issue with Automations, Scripts & Scenes Frontend. I have various automations and scripts but am unable to see them in the front end.
All I get is ‘We couldn’t find any editable automations’

I have tried deleting the contents of my automations.yaml and created a new one on the frontend which adds the information to the file. However I still cannot see it on the frontend.

I have tried restarting and reloading everything to no luck.

Could someone please help me rectify this issue?

Many Thanks
Mark

Posts: 1

Participants: 1

Read full topic

Viewing all 109086 articles
Browse latest View live


Latest Images

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