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

[HOW TO]: reading/writing global variables to/from Fibaro

$
0
0

@MJFox wrote:

Hi!

Since it took me a while to get all the peaces together I would like to share with you how to read and write global variables in Fibaro.

I’m using an input slider to set the air temperature and the value of the input slider gets stored in a global variable in Fibaro. If I change the global variable in Fibaro the value gets synced to the slider accordingly:

First we need a rest_command:

rest_command:
  set_fibaro_var:
    method: put
    url: "http://192.168.1.31/api/globalVariables/{{ var }}"
    username: !secret fibaro_user
    password: !secret fibaro_password
    payload: '{"value":"{{ value }}"}'
    headers:
      Content-Type: application/json

Make sure you change the IP-adress to whatever your Fibaro Home Center is set to and set “fibaro_user” and “fibaro_password” in your secrets.yaml. Keep in mind that only super users are allowed to set global variables!

Next we need an input number. This is the value that is being controlled by the slider in your lovelace interface:

input_number:
  temperature_air:
    name: Air Temperature
    min: 20
    max: 30
    step: 0.5

Next we need a sensor to store the value of the global variable:

sensor:
  - platform: rest
    username: !secret fibaro_user
    password: !secret fibaro_password
    authentication: basic
    resource: "http://192.168.1.31/api/globalVariables/air_temperature"
    name: get_air_temperature
    value_template: '{{ value_json.value }}'

Make sure you change the IP-address and the name of the variable you want to read (“air_temperature” in my example).

Finally we need two automations to read and write the variable:

automation:
  - alias: set air temperature
    trigger:
      platform: state
      entity_id: input_number.temperature_air
    action:
      service: rest_command.set_fibaro_var
      data_template:
        var: "air_temperature"
        value: "{{ trigger.to_state.state }}"
  - alias: get air temperature
    trigger:
      platform: state
      entity_id: sensor.get_air_temperature
    action:
      service: input_number.set_value
      data_template:
        entity_id: input_number.temperature_air
        value: "{{ trigger.to_state.state }}"

Make sure you change

var: “air_temperature”

to the name of the variable you want to read/write.

After that you can add the entity “input_number.temperature_air” to your lovelace interface and it will be synced with the global variable.

Hope it helps! :slightly_smiling_face:

Cheers

MJFox

Posts: 1

Participants: 1

Read full topic


Timer Duration Limit

$
0
0

@Cognoquest wrote:

Is there suppose to be a duration limit for the Timer? I am running Home Assistant 0.105.3.

The Timer seems to be working correctly when the duration is set for less than a day. A set time that exceeds one day the countdown is frozen or not working.

Posts: 2

Participants: 2

Read full topic

Wall Panel Options (HomeSeer to Home Assistant)

$
0
0

@HA5525 wrote:

I’m new around here and I’m looking for some guidance. Background: I’m a long time user of HomeSeer HS3 and I have many tablets on the walls around the house. HomeSeer is currently in beta for HS4 and frankly the release is botched. I no longer have confidence in the product. My tablets are a mix of Windows 10 10", Amazon Fire 7" and 8", iPad Pro and iPhone 11 Pro (not wall mounted). I will not be using HomeSeer long term and need to migrate to a stable long term platform.

I have Home Assistant installed and it is running well. I have a few ZWave and Zigbee devices migrated over and they are working well. Where I am struggling is the panels. The HomeSeer way of doing panels is with a native app (Android, iOS, Windows). Designer software (HSTouch Designer) is then used (it feels like Visual Studio) to design screens and deploy to the mobile apps. It works well but the Designer software is not kept up to date and has been forgotten about.

I am looking for options with Home Assistant. I don’t know if there are native apps I should be using? Are the screens supposed to be served via web browser on the panels? I need to have the wall mounted panels be able to make audio announcements “back door left open” etc.

I see so many options in the forum I am not sure which will meet my needs and I don’t want to go down a long rabbit trail. I “took control” of my Lovelace and put a few things on a new tab but I’m not sure how to translate this into wall mounted panels.

Requirements
Different panels get different screens available to them
Audio announcements on the panels
iOS (iPad/iPhone), Amazon Fire 7"/8", Windows 10
Wall panels get a non busy interface with no access to Home Assistant config (ie guest friendly)

Thank you!

Posts: 2

Participants: 2

Read full topic

MQTT automation light control to template automation

$
0
0

@lionberger wrote:

I currently have the following automation in order to switch on and off a double_garage light in Home Assistant when an on/off message is received via MQTT hub.

automation:
  - id: '11'
    alias: turn on lights
    trigger:
      platform: mqtt
      topic: 'light/double_garage'
      payload: "on"
      encoding: "utf-8"
    action:
      - service: light.turn_on
        data:
          entity_id:
            - light.double_garage
  - id: '12'
    alias: turn off lights
    trigger:
      platform: mqtt
      topic: 'light/double_garage'
      payload: "off"
      encoding: "utf-8"
    action:
      - service: light.turn_off
        data:
          entity_id:
            - light.double_garage

That’s a lot of code for one single light! any way to template the above for any light matching for instance a regex??

Posts: 2

Participants: 2

Read full topic

All my history is gone

WARNING (MainThread) [homeassistant.config] Package homeassistant contains invalid customize

$
0
0

@badabing wrote:

Some background:

I started splitting home assistant configuration similar to how @frenck has done in his excellent config here

I got mostly everything working fine with the exception of this weird issue that is puzzling me.

Let me start with my config/integrations/homeassistant.yaml file as I suspect that file is not properly being loaded.

---
# Sets up Home Assistant.
#
# Basically, everything that doesn't have to be in the
# main configuration.yaml.
#
# https://www.home-assistant.io/docs/configuration/basic/
#
homeassistant:
  # lets do the basic setup
  latitude: !secret zone_office_latitude
  longitude: !secret zone_office_longitude
  elevation: !secret zone_office_elevation
  time_zone: !secret zone_office_time_zone
  unit_system: metric
  name: Office

  # # Lets me customize individual entities
  #customize: !include_dir_merge_named ../customizations/entities
  #customize: !include ../customize.yaml

  # # Lets me custimize all entities in a domain
  # customize_domain: !include_dir_merge_named ../customizations/domains

  # # Lets me custimize entities based on a matching pattern
  # customize_glob: !include_dir_merge_named ../customizations/globs

  # https://www.home-assistant.io/docs/authentication/providers/
  auth_providers:
    - type: homeassistant

As you can see, I’ve commented out customizations folder inclusions to narrow down the issue.
By the way the time_zone entry is not being picked up, and the only way I can get it is by setting it in the UI under general (more on this later)

As seen in here, no customization file is referenced, however if I restart Home Assistant or reload customizations the following message is seen in the logs

WARNING (MainThread) [homeassistant.config] Package homeassistant contains invalid customize

Usually Home Assistant is very good in pinpointing the offending file / line, but not in this case.
I’ve searched all my configuration files for customize entries made sure none existed, yet I still got this error.

But it gets weirder,
In and attempt to narrow down the issue, I went to the UI and customized an entity in customization section
I got the following message:

It seems that your configuration.yaml doesn't properly include customize.yaml.
Changes made here are written in it, but will not be applied after a configuration reload unless the include is in place.

Even though it created the customize.yaml file and the settings applied (ie customization worked)
So I figured, ok it needs the inclusion under the homeassistant heading
hence why you see the commented line above
customize: !include ../customize.yaml
So I added that line (uncommented of course) and restarted Home Assistant.
Same issue, the error in the log, and also in the UI about including customize.yaml

Ok maybe it doesn’t like ../ in the path, (even though it didn’t make much sense)
I changed the entry to customize: !include customize.yaml
and restarted Home Assistant
This time I got the following error

ERROR (MainThread) [homeassistant.components.homeassistant]   in "/config/integrations/homeassistant.yaml", line 21, column 14: Unable to read file /config/integrations/customize.yaml

Which makes sense because the file did not exist, and also a proof that the homeassistant.yaml file is loading properly.

I figured, ok, let me just paste all my previous customization entries into customize.yaml, set the inclusion back to customize: !include ../customize.yaml and live with the error for now until I figure out the issue.

Needless to say I searched the community posts and found several matches that all got resolved by adding the customize.yaml inclusion.

To my surprise, none of my pasted customizations seems to have been read and applied.
The one manually done in the UI which created the initial customize.yaml file was still working.

So I checked under UI customization one of the entities that I was customizing to see if it had my setting.
To my surprise it showed the following message
image

How is that even possible? it knows about the customization, but it’s not showing up as customized on the entity (ie the entity is not showing the picture)
Ok let me save it in the UI and see what happens.
Surprise surprise, the entity image is properly displayed.
I compared the customize.yaml file before saving and after saving, 0 differences, identical, with the exception of modified date, there is zero difference.

I repeated the process, just to be sure I wasn’t imagining things, nope, if I select customization entry in the UI and hit save, it works.
Of course the logs still show the invalid customize message and the ui still says that I should include the customize.yaml (even though it is already included)

Can anyone make any sense of what’s going on? it’s a head scratcher (at least for me).

I even searched all hassio folder for any customiz reference just in case some hidden file had some setting.
Nope

It is worth to note that initially I had the homeassistant.yaml file exactly like frenck’s ie all 3 inclusions
entity, domain, glob
with my customizations in respective directories broken down by entities / domains.
I got the same errors hence why I commented the lines in an attempt to find the root issue.

I failed.

Coming back to the time_zone issue
Any clue why it’s not working?
Somehow I get a feeling that entries loaded from this homeassistant.yaml file are having issues

Hope someone has a clue.
Thanks
BB

Posts: 2

Participants: 1

Read full topic

Aeotec Limited Unknown Device

$
0
0

@talkshowonmute26 wrote:

So I got two new ZW187s, AKA Gen 7 recessed door sensors, and they’re showing up as unknown.
I tried my hand at editing the zwcfg manually and using the info from a gen5, but it didn’t work.
Can anyone out there with one that works, and has editable config parameters post what they have for it in their zwcfg file?

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Upgrading to 0.107

$
0
0

@myle wrote:

looking good

but

you NEED to DELETE all group: bits

yes I know I was told but I miss sum and it broke

My tip

take backup SNAPSHOT download it put in safe place

go into vs-code

image

Ctrl+Shift+F

and do a search for group:

image

the ones you are looking for are the

filename.yaml 
group:

in the above picture Ihave one in the sprinkler.yaml file

then by clicking on the group the file will open and now you can delete that selection.

image

take other backup SNAPSHOT download it put in safe place

NOW do the upgrade to 0.107

and it works why I have just done the above steps

Posts: 6

Participants: 3

Read full topic


Bedside Lamp 2 without Homekit

$
0
0

@andrepia wrote:

Hi there!

I just bought a Yeelight / Xiaomi Bedside Lamp 2 and I managed to set it up as a Homekit accessory, but I wanted to do it manually.
For what I could understand from Home Assistant Integration description, I would have more control doing it manually, for example the nightlight mode.
So after I added it to my “configuration.yaml”, I got a new entity but it is unavailable!

Configuration.yaml
Captura de Tela 2020-03-16 às 23.51.11

Can someone point me in the right direction, please?
Thanks!!

Posts: 2

Participants: 2

Read full topic

Yale Lock Retrieve User

$
0
0

@trankillity wrote:

Anyone know if it’s possible to retrieve the user that unlocked a Yale lock (YRD256 specifically) with the Yale Zigbee module? Would like to add a “who unlocked the lock” detector for stuff like presence, etc.

Have a CC2531, so can use ZHA or zigbee2mqtt.

Posts: 3

Participants: 3

Read full topic

Issue accessing front end after restart

$
0
0

@diode wrote:

I’m having a heck of a time trying to get my front end to play well after a server restart. I’m running my Home Assistant in docker and recently updated the server that it was running on prior to restarting. Once it was restarted I was unable to connect to the home assistant port via web browser and I was forced to restart the docker.socket and docker.service in order to even access Portainer. Prior to restarting I was unable to stop or even kill a container. I can now see all of the containers running, but now I’m unable to reach the front of either. Prior to restarting the server I made zero changes to the Home Assistant instance which makes me confused on why it didn’t survive the restart. All add-ons are running and are working properly. The docker has no other errors in the logs.

locally using 8123 port or using the Android app. When connecting I receive the following errors:
2020-03-17 04:45:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.XXXXXXXXXXX] Received invalid command: get_panels

2020-03-17 04:45:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.XXXXXXXXXXX] Received invalid command: frontend/get_themes

2020-03-17 04:45:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.XXXXXXXXXXX] Received invalid command: frontend/get_translations

2020-03-17 04:45:31 INFO (MainThread) [homeassistant.components.websocket_api.http.connection.XXXXXXXXXXX] Connection closed by client

I tried accessing the docker to see if there was a way to rebuild the container using the hass command, but that doesn’t appear to be possible.

When trying to access via https using the browser, I receive the following error:

404: Not Found
Any help would be greatly appreciated.
I’m running version 103.6 at the moment.

Posts: 2

Participants: 2

Read full topic

Deconz on remote host

$
0
0

@alonjr wrote:

Hello, I am running two HA on two Raspberry Pis (Raspis). The old Raspi has hassbian + HA + ConBee/deconz/Phoscon while the new Raspi has HassOS/Hass.io + deConz Add-on.

My issues are on the new raspi setup.
When I added the “deConz Zigbee Gateway” in the integration panel (while pressing “Authenticating App” on old raspi Phoscon webui) all deConz entities showed up and working well. However then when I restart HA (on new raspi) all the deConz entities show up as unavailable (no change on old raspi). If I remove the “deConz Zigbee Gateway” Integration and then add it back again, all the deConz entities become available again.

Any help would be appreciated.

Posts: 1

Participants: 1

Read full topic

Conditions with "or" and "and"

$
0
0

@Jaques-Ludwig wrote:

Hello,

I want to turn on my outdoor lamp before sunrise and after sunset and only if my dummy-switch is “on”.

This is my automation

id: '1583077428563'
  alias: Eingang Licht AN
  description: ''
  trigger:
  - device_id: 18a4c3b0dd7a4745b5ce115410d8f6a2
    domain: binary_sensor
    entity_id: binary_sensor.presence_11
    platform: device
    type: motion
  condition:
  - condition: and
    conditions:
    - condition: state
      entity_id: input_boolean.dummy_switch_eingang
      state: 'on'
    - after: sunset
      condition: sun
  - condition: and
    conditions:
    - condition: state
      entity_id: input_boolean.dummy_switch_eingang
      state: 'on'
    - before: sunrise
      condition: sun
  action:
  - device_id: 8ccf481a9ff24d8bb63644d6edfcd64a
    domain: light
    entity_id: light.licht_eingang
    type: turn_on

This works only in the evening. In the morning, (very early at 6 o’clock, it is always dark) it doesn’t work. What’s the reason?

Thanks,

Jaques-Ludwig

Posts: 2

Participants: 2

Read full topic

Firing Action/Status URLs

$
0
0

@ob2s wrote:

I am new to HA, and it is a little bit daunting, however before HA, I built a number of ESP8266s that have simple URLs for status, turn things off and on, etc. I also have Shelly devices that work the same way. I created a web page to execute them all, but I’d like to integrate them into HA. I didn’t see anything in the add-on store. It seems like a simple task, but I can’t sort it.
Thanks

Posts: 4

Participants: 2

Read full topic

MQTT question ( MQTT Explorer )


Round() function no longer rounding

$
0
0

@zoogara wrote:

I have a template sensor:

    # reads 1 hPa high compared to local stations
  - platform: template
    sensors:
      outside_pressure_msl:
        friendly_name: "Outside Air Pressure MSL"
        unit_of_measurement: hPa
        value_template: "{{ ((states('sensor.outside_air_pressure')|float * (1 - (0.0065 * 175) / (states('sensor.outside_temperature')|float + (0.0065 * 175) + 273.15)) ** -5.257) | round(1)) - 1  }}"
        icon_template: mdi:gauge

This used to work fine, after the latest update however I get this result:

Screenshot 2020-03-17 17.33.36

Has templating changed? This used to work, nothing has changed in the template. Can anyone spot an error that was “fixed” in the latest update?

Posts: 6

Participants: 4

Read full topic

How to calculate a constant time of a given date (yesterday)?

$
0
0

@jegember wrote:

Hi guys, I’m stuck a bit with a date calculation. I’ve got a hot water circulation script, that circulatest the water in the morning (before wake up). I wanted to add a condition that checks if there was somebody in the house after 8:00PM Yesterday or e.g. left for vacation and no circulation is needed in the morning.

So I wanted to do something like: “If there was a movement after 8:00PM Yesterday then circulate, else don’t”.
I’m struggling with getting the time for 8:00PM Yesterday. I managed to extract the day for yesterday, but I do not really know how to build up (concatenate?) the whole date&time from this:

{{ (as_timestamp(now()) - (24*3600)) | timestamp_custom('%d', True) }}

Thank you very much in advance!

Posts: 3

Participants: 2

Read full topic

RFXtrx devices with rotating code

$
0
0

@boywiz wrote:

Hi

I have a couple of 433 Security Alarm devices that i am trying to use but they have a rotating code in the middle, I wondered if there is a way to use regex for the devices. so to illustrate below i effectively want to do the following as i like the idea of the codes rotating, I know these devices use to work ing Demoticz but i don’t want to run that again. or an additional powered device

  - platform: rfxtrx
    automatic_add: True
    devices:
     ......
      077500<regex>990580:
        name: Office PIR
        device_class: motion

When i track it in the RFXmngr i can see in the small tests that i have done that the first 6 and last stay the same but are unique per device, what i don’t want is lots of 1-time devices. below is output from the test the front and last have been changed to avoid publically exposing my devices.

All help greatly appreciated.
Mo

------------------------------------------------
17/03/2020 09:07:23:927= 077500**2600**990580
Packettype    = Chime
subtype       = Byron SX
Sequence nbr  = 38
ID            = 0095 decimal:149
Sound         = SX21 Tubular 3 notes
Signal level  = 8  -56dBm
------------------------------------------------
17/03/2020 09:14:32:565= 077500**2700**990580
Packettype    = Chime
subtype       = Byron SX
Sequence nbr  = 39
ID            = 0095 decimal:149
Sound         = SX21 Tubular 3 notes
Signal level  = 7  -64dBm
------------------------------------------------
17/03/2020 09:14:37:052= 077500**2800**990580
Packettype    = Chime
subtype       = Byron SX
Sequence nbr  = 40
ID            = 0095 decimal:149
Sound         = SX21 Tubular 3 notes
Signal level  = 8  -56dBm
------------------------------------------------
17/03/2020 09:14:38:472= 077500**2900**990580
Packettype    = Chime
subtype       = Byron SX
Sequence nbr  = 41
ID            = 0095 decimal:149
Sound         = SX21 Tubular 3 notes
Signal level  = 8  -56dBm

Posts: 3

Participants: 2

Read full topic

Rain Gauge - How to total / increment reed switch

$
0
0

@Jatho wrote:

Hi there

I’ve modified my Oregon rain gauge and soldered wires to the reed switch which I’ve then connected to VIN pin and D8 pin on a nodemcu board and using ESPhome with the intention of it recording the amount of rainfall over time.

I’ve set it up using the pulse_counter platform however the issue is that the pulse_counter acts like a counter per minute giving you the number of times the switch is toggled in one minute but then resets to zero after a minute and starts counting again for the next minute, what I need is for it count each time the switch is toggled and increase it by that count so that I am then able to measure rain fall by hour, day, month, year etc…

Is there a way to count and store this information in Home Assistant?

I’ve searched the forum and have come across similar scenarios but haven’t really seen any examples of a reed switch being used to count, its either open or closed and doesn’t need to be accumulated.

Thanks in advance.

sensor:    
  - platform: pulse_counter
    pin: D8
    name: "Rain Gauge"
    icon: "mdi:water"
    unit_of_measurement: "mm"
    accuracy_decimals: 2

image
image
image

Posts: 6

Participants: 3

Read full topic

RESTful and XML Integration

$
0
0

@Stejo wrote:

Hi,

I´m trying to use the RESTful integration to get out data from a boiler. The result is in XML format, but as I understood it should convert to JSON according to this page https://xmltodict-debugger.glitch.me/

My config is:

- platform: rest
  resource: http://192.168.xxx.xxx:8080/user/var/120/10251/0/0/12242
  name: eta_tanktopp_temp
  device_class: temperature
  json_attributes:
    - strValue

The XML result is as following:

<?xml version="1.0" encoding="utf-8"?>
<eta version="1.0" xmlns="http://www.eta.co.at/rest/v1">
  <value uri="/user/var/120/10251/0/0/12242" strValue="79" unit="°C" decPlaces="0" scaleFactor="10" advTextOffset="0">792</value>
</eta>

And when using the converter I get the following:

{
  "eta": {
    "@version": "1.0",
    "@xmlns": "http://www.eta.co.at/rest/v1",
    "value": {
      "#text": "792",
      "@advTextOffset": "0",
      "@decPlaces": "0",
      "@scaleFactor": "10",
      "@strValue": "79",
      "@unit": "°C",
      "@uri": "/user/var/120/10251/0/0/12242"
    }
  }
}

I would like the sensor to get the @strValue, what is it I do wrong and do not understand?

Posts: 3

Participants: 2

Read full topic

Viewing all 105777 articles
Browse latest View live


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