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

Turn power meter readings of EDL21 into instantaneous consumption

$
0
0

Hi all,

I have a power meter (vendor: ISKRA MT681) that I read out with IR interface from Hichi.

It works fine after the January 2022 update of HA (see screenshot).
I get a reading (via template code I found on Github) showing me instantaneous net consumption (“Nettobezug”) from grid under consideration of my photovoltaic production - this is what I need to charge my vehicle while I have more production than consumption.

However, I would also like to see my instantaneous production (negative active energy) and consumption (positive active energy). I tried with statistics and also riemann integration but to no avail (failures in parsing configuration.yaml).

I only get absolute readings (see screenshot) - could someone point me into the right direction of how to get the present consumption/production from my EDL21 sensors?
It would probably have to be calculated by (reading at time t2 minus reading at time t1)/(t2 minus t1).
It should be ok if the sensor value is aggregated over the last e.g. (t2 minus t1) = 10 to 30 seconds.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Specific 
sensor:
  - platform: edl21
    name: Stromzaehler
    serial_port: /dev/ttyUSB0

#sensor:
#  - platform: integration
#    source: sensor.stromzaehler_positive_active_energy_in_tariff_t1
#    name: Strombezug_180 
#    unit_prefix: k
#    round: 2 
    
    
template:
  - sensor:
      - name: Strombezug
        state: >
           {% set pwrin = states('sensor.stromzaehler_positive_active_energy_in_tariff_t1') | float %}
           {{ pwrin / 1000 | round(3) }} 
        unit_of_measurement: kWh
        state_class: total_increasing
        device_class: energy
#zusätzlich 300122        
      - name: Einspeisung
        state: >
           {% set pwrin = states('sensor.stromzaehler_negative_active_energy_in_tariff_t1') | float %}
           {{ pwrin / 1000 | round(3) }}
        unit_of_measurement: kWh
        state_class: total_increasing
        device_class: energy
        
      - name: Nettobezug
        state: >
           {% set pwrin = states('sensor.stromzaehler_sum_active_instantaneous_power') | float %}
           {{ pwrin / 1000 | round(3) }}
        unit_of_measurement: kWh
        state_class: total_increasing
        device_class: energy
        
#Experimental
#sensor:
#  - platform: integration
#    name: Strombezugintegriert
#    source: sensor.Strombezug
#    unit_time: min 
#    method: left

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

1 post - 1 participant

Read full topic


Energy Cost Tariff

$
0
0

I have a sensor which has price €/kWh. It changes every hour. I set that value to “Use an entity with current price”
image

Does HA calculate cost of energy per hour or how is it exactly? I do not find any information, what is the current value which HA calculates the cost?

1 post - 1 participant

Read full topic

MQTT user (Mosquitto) question

$
0
0

This is probably a really dumb question, but I am going to ask it anyway :slight_smile:

I recently started on using MQTT and as such installed Mosquitto. In the installation instruction it says to create ‘a new user’:

Create a new user for MQTT via your Home Assistant’s frontend ConfigurationUsers (manage users) , (i.e. not on Mosquitto’s Configuration tab).

I can create a new user, but how does Mosquitto know what user this would be? Is it a specific name for the user? I couldn’t find anything in the rest of the settings where to tell Moqsuitto to use a user and it is working fine ‘without it’. I’m guessing it’s not the logins part of the config as the manual says:

Option: logins (optional)
A list of local users that will be created with username and password. You don’t need to do this because you can use Home Assistant users too, without any configuration. If a local user is specifically desired:

I’m just a bit confused.

1 post - 1 participant

Read full topic

Access an HP Printer's Embedded Webserver (EWS) via Home Assistant

$
0
0

Hi,
Would anyone out there know how to access an embedded web server on a device (like the ones on an HP printer) via iframe within home assistant?

Right now, I’m using a lovelace card with a hyperlink that opens a new tab in my browser to get to the EWS of my HP printer. It would be nice if I had it in an iframe but can’t seem to get that to load. Both HA and my printer are using HTTP (not https).

Anyone out there know how to do that?

1 post - 1 participant

Read full topic

RTSP generic stream issue from DVR and surveillance camera

$
0
0

Hi,
I have a Kenik KG-5214UVR CCTV DVR recorder and I want to add RTSP stream to my HA.
In configuration of my DVR I found a RTSP setting as:

rtsp://[IP]:[PORT]/mode=real&idc=[]&ids=[]

where idc is a channel and ids is a set of primary or secondary stream

I can successfully connect to this stream via VLC using this adress:

rtsp://ha:HomeAssistant@192.168.0.223:554/mode=real&idc=1&ids=1

Configuration of HA is:

camera:

  - platform: generic

    stream_source: "rtsp://ha:HomeAssistant@192.168.0.223:554/mode=real&idc=1&ids=1"

    name: "My Camera"

Error figured in HA log:

Logger: homeassistant.components.stream.stream.camera.my_camera


Source: components/stream/__init__.py:340
Integration: Stream ([documentation](https://www.home-assistant.io/integrations/stream), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+stream%22))
First occurred: 22:38:02 (3 occurrences)
Last logged: 22:38:33

Error from stream worker: Error opening stream (HTTP_BAD_REQUEST, Server returned 400 Bad Request) rtsp://****:****@192.168.0.223:554/mode=real&idc=1&ids=1

What I’m doing wrong?

1 post - 1 participant

Read full topic

Button to turn on a relay (not a toggle)

$
0
0

hi, i just install home assistant, so im a newbie, i have a fibaro relay (fgs 222) with 2 output to open my garage door and my gate, but i only need a quick signal, not a on/off switch, and i cant find a way to do it ? can someone explain me how ?
thank you

1 post - 1 participant

Read full topic

Can't get this automation to work.. Must be something simple but cannot work it out .. can someone help?

$
0
0

Basically I have a 4 button remote in HA which shows as 4 seperate switches.

Each choose is for a different action (button)

Trigger is each of the buttons being pressed.

It all works Except for the panic function which just does nothing.

alias: New Fob Control - Fob 1
description: ''
trigger:
  - platform: state
    entity_id: switch.fobarm
    from: 'off'
    to: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 1
  - platform: state
    entity_id: switch.fobhomearm
    from: 'off'
    to: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 1
  - platform: state
    entity_id: switch.fobdisarm
    from: 'on'
    to: 'off'
    for:
      hours: 0
      minutes: 0
      seconds: 1
  - platform: state
    entity_id: switch.fobpanic
    from: 'off'
    to: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 1
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: switch.fobarm
            state: 'on'
        sequence:
          - service: alarm_control_panel.alarm_arm_away
            data: {}
            target:
              entity_id: alarm_control_panel.home_security_system
          - service: switch.turn_on
            data: {}
            target:
              entity_id: switch.fobdisarm
          - service: switch.turn_off
            data: {}
            target:
              entity_id: switch.fobarm
      - conditions:
          - condition: state
            entity_id: switch.fobhomearm
            state: 'on'
        sequence:
          - service: alarm_control_panel.alarm_arm_home
            data: {}
            target:
              entity_id: alarm_control_panel.home_security_system
          - service: switch.turn_on
            data: {}
            target:
              entity_id: switch.fobdisarm
          - service: switch.turn_off
            data: {}
            target:
              entity_id: switch.fobhomearm
      - conditions:
          - condition: state
            entity_id: switch.fobdisarm
            state: 'off'
        sequence:
          - service: alarm_control_panel.alarm_disarm
            data:
              code: '7676'
            target:
              entity_id: alarm_control_panel.home_security_system
      - conditions:
          - condition: state
            entity_id: switch.fobpanic
            state: 'on'
            for:
              hours: 0
              minutes: 0
              seconds: 1
        sequence:
          - service: timer.start
            data:
              duration: '3600'
            target:
              entity_id: timer.alarm_noise
    default: []
mode: single

1 post - 1 participant

Read full topic

Usb controllers

$
0
0

Hello all

I’m running HA on an hp elitebook. which only has 2 usb ports.

One port is for the mouse and keyboard and on the other port i connected the aeotec USB.and all works fine.

next month i will be expanding my automation substantially (at least in my mind) .

part of the expansion will include installing a ZigBee TRV for all my radiators.

To support this I will need to purchase a ZigBee usb controller
.
my questions:
can i install the ZigBee usb and the z-wave usb on an USB expansion board without any
interference between both usb?

will i need to re install and pair all my z wave devices again?

the Nortek HUSZBZ will not work with European z wave frequencies

thank you

1 post - 1 participant

Read full topic


Light brightness slider not moving to 100% after light is toggled 'on'

$
0
0

I have been using Inovelli Red Series Dimmer light Switches in HA for a few years over zwave. This issue started after I updated my Host to Home Assistant OS 7.3. I was using a version that was maybe 4 or 5 versions back before this update. Not really sure what version.

After the update when I toggle these dimming switches ‘on’ from Lovelace or from the physical switch the brightness slider in HA shows 0% and the toggle shows off. The physical lights in the room come on to 100% but the display on my overview shows off. If I move the brightness slider everything starts functioning again.

If I function the lights using Z-Wave JS to MQTT web ui using the ‘[12-38-0-Up] Perform a level change (Up)’ everything works as expected. The lights come on and the slider shows 100%.

I have tried updating the firmware on the Invelli switch, and I have tried Zwave JS and Zwave JS to MQTT. In both systems I still have this issue.

Unfortunately I cannot add any animations to set the brightness after I turn on the light because HA doesn’t see the transition from off to on. When I press the physical switch, or toggle the switch in HA, no state changes are shown. Also when the switch is off the brightness attribute doesn’t exist, so I can’t just turn up the brightness via an automation.

Is there a workaround I can use to function these lights? Is there something I am doing incorrectly when adding this dimmer to my z-wave configuration?

1 post - 1 participant

Read full topic

Temp automation not firing

$
0
0

New to HA - coming from Hubitat/SmartThings.

I have a few separate automations to set the humidity set point based on the outdoor temp so my windows don’t bleed but they aren’t triggering. I read various posts but not seeing what I’m doing wrong

‘’’
alias: Humidity when Temp Above 40
description: ‘’
trigger:

  • platform: numeric_state
    entity_id: weather.home
    attribute: temperature
    above: ‘41’
    condition: []
    action:
  • device_id: daae9607956d176221065d6ffb2ad123
    domain: humidifier
    entity_id: humidifier.ecobee3
    type: set_humidity
    humidity: 45
    ‘ ‘ ‘

Help??

1 post - 1 participant

Read full topic

Migrate Broadlink RM deprecated switch YAML?

$
0
0

Hey,

I looked through the topics mentioning “Broadlink” since the past few weeks and tried finding an answer in older topics, but no luck.

I knew this was coming, that there was going to be a breaking change and the old Base64 switch YAML configuration would be invalid for my RM Pro. I was also hoping there would be an easy way to migrate all the old switches, when that day comes.
That day came with the last monthly release and I can’t for the life of me find a way anywhere in the Broadlink integration docs. Am I missing something on how people like myself can migrate all the old IR and RF commands without relearning everything through the learn commands in Lovelace?

I have around 120+ (yeah, I know) RF and IR commands in my YAML since 2016. Most of which for remotes, which I no longer have, because they were cheapo little things for my wall switches.
A lot of which was painstakingly difficult to finally get the RM Pro to learn the right code (as I’m sure fellow Broadlink RF users can confirm).

As far as I understand, I can’t edit the files in the storage folder, to put in my codes.
So that leaves me with… Getting a new Broadlink RM, connecting it with another HA, sending those commands using the old way, so my original HA can learn the commands in Lovelace? :joy:

Any input is appreciated!

Thanks
Ben

1 post - 1 participant

Read full topic

Camera Proxy API 401

$
0
0

Hello! I’m trying to access one of my Home Assistant camera with URL:
http://192.168.1.6:8123/api/camera_proxy_stream/camera.videokamera?api_password=

But I only get:
401: Unauthorized

I’ve tried to use this config:

homeassistant:
  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        - 192.168.1.0/24
    - type: legacy_api_password
      api_password: !secret http_password

Without any success. What do I have to do in order to be able to access my camera from API URL?

1 post - 1 participant

Read full topic

Playing Hide & Seek, Can't find 2 entities

$
0
0

Can someone point me in the right direction. I have 2 entities that I don’t use anymore, and I thought, I removed them back before HA switched from the OG config files, to the Lovelace config file. But, since I updated to 2022.2.0, their are now showing up in the home-assistant.log file. the following is what the log shows;

2022-02-09 11:41:23 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'name': 'LED Light Pole 2', 'command_topic': 'cmnd/led_pole_2/POWER', 'state_topic': 'stat/led_pole_2/RESULT', 'value_template': '{{value_json.POWER}}', 'payload_off': 'OFF', 'payload_on': 'ON', 'availability_topic': 'tele/led_pole_2/LWT', 'payload_available': 'Online', 'payload_not_available': 'Offline', 'brightness_command_topic': 'cmnd/led_pole_2/Dimmer', 'brightness_state_topic': 'stat/led_pole_2/RESULT', 'brightness_scale': 100, 'on_command_type': 'brightness', 'brightness_value_template': '{{value_json.Dimmer}}', 'rgb_command_topic': 'cmnd/led_pole_2/Color2', 'rgb_state_topic': 'stat/led_pole_2/RESULT', 'rgb_value_template': '{{value_json.Color}}', 'platform': 'mqtt'},)

The second error is the same, except it is for the entity is for led_pole_1. I went thru all my config files, and I can’t find any thing, that references these 2 entities.
Also, the 2 entities do not show up in the Configration/Entities or Device List

1 post - 1 participant

Read full topic

Saving state into a variable

$
0
0

I’m attempting to customize an existing BluePrint to leverage an existing HACS adding for sending notifications.

Here is the code thus far: GarbageCollection.yaml (github.com)

The blueprint imports fine, but when I kick it off, there are 2 issues that i’m having trouble figuring out. I’m relatively new to YAML and JINJA formatting, so bare with me.

The first issue is that line 34 should be saving a query into a variable:

  sensors_tomorrow: "{{ states.sensor | selectattr('attributes.device_class', 'equalto', 'garbage_collection__schedule') | selectattr('attributes.days', 'equalto', day_offset) | map(attribute='attributes.friendly_name')| list | join(', ') }}"

I can run the above as a tempalte with the variable day_offset replaced with a static number and I get the expected values, but when i call this from the automation leveraging this blueprint, it does not return any text. What am I missing here?

Here is what i’d expect that to look like based on the template tool:

Next issue is related to the above. There is a condition which should control if this automation should even run. E.g. if you get no results on the above query, do not run, but it seems to still be running and just sending empty text. Here is the condition statement:

condition:
  condition: template
  value_template: "{{ sensors_tomorrow != '' }}"

Any pointers on the above would be much apprecaited. I feel like i’m very close and pulling my hair out over something trivial, so hoping to use this as a learning oppurtunity.

Thanks!

1 post - 1 participant

Read full topic

Template Cover for gate with automatic closure

$
0
0

Dear All,

i have RF broadlink command to open gate of my home.

I don’t have any sensor to identify the status, simply when i open the gate (with the command) this is automacally closed after 60 secs.

How i can define cover template with default status closed, that switch in open status when i send the command and then go back on closed after 60 secs?
I dont have found a way to do it. Any suggestions?

This is the script to open gate with broadlink rf command:

script:
apri_cancello_garage:
sequence:
- service: remote.send_command
target:
entity_id: remote.wi_fi_universal_remote_remote
data:
device: cancello_garage
command: apri

Thanks

Massimo

2 posts - 2 participants

Read full topic


Use Amber Electric Forecast to Optimize what hours are selected for pool pump each day

$
0
0

Hi

Like a bit of advice or ideas about how I could use Amber Electric’s Energy price for picking the best 8hours each day to run the pool pump and heater. Essentially replicating their smart shift technology…but for whatever I want

I’m using Astral Pool’s Connect10 for the pool automation and already have some triggers that ensure it operates the heater pump when it is day time, less than a static preset price for electricity checked against the current price and the pool’s temperature (once pool is at temp, heater and pump turn off, temperature is polled off the circulation pump).

I’d like to improve on this, but figuring out how to use the Amber Price Forecast to identify the best likely hours and/or prices for a day and have that dynamically either select the hours or dynamically change the trigger and condition values.

Requirements

  1. Pool circulation pump needs to run 8hours/day - ideally the cheapest 8hours
  2. HeatPump and associated Pump needs to run a variable (depends on time of year and if cover was left off over night) amount of time to reach temp…ideally the cheapest hours and must be same hours as circulation pump for temperature control. maybe this variable amount of time could be calculated based on a log of the average temp gain/time over the last 7 days (how long does a 1C change take) and then set temp - current temp = Temp Change required * time for 1C change + Insurance Offset = required time to heat pool

The logic and Math make sense to me…but I’m new to programming and HA…and treating this as a learning opportunity…so just a point in the right direction and links to learning/resources would be great…but not sure where to start.

this is what the sensor.home_feed_in_forecast looks like in developer tool

state_class: measurement
forecasts: 
- duration: 30
  date: '2022-02-10'
  nem_date: '2022-02-10T11:30:00+10:00'
  per_kwh: 0.02
  spot_per_kwh: 0.02
  start_time: '2022-02-10T01:00:01+00:00'
  end_time: '2022-02-10T01:30:00+00:00'
  renewables: 96
  spike_status: none
- duration: 30
  date: '2022-02-10'
  nem_date: '2022-02-10T12:00:00+10:00'
  per_kwh: -0.03
  spot_per_kwh: -0.03
  start_time: '2022-02-10T01:30:01+00:00'
  end_time: '2022-02-10T02:00:00+00:00'
  renewables: 104
  spike_status: none
  range_min: -0.04
  range_max: 1.01
- duration: 30
  date: '2022-02-10'
  nem_date: '2022-02-10T12:30:00+10:00'
  per_kwh: -0.04
  spot_per_kwh: -0.04
  start_time: '2022-02-10T02:00:01+00:00'
  end_time: '2022-02-10T02:30:00+00:00'
  renewables: 107
  spike_status: none
  range_min: -0.04
  range_max: 0.53
- duration: 30
  date: '2022-02-10'
  nem_date: '2022-02-10T13:00:00+10:00'
  per_kwh: -0.04
  spot_per_kwh: -0.04
  start_time: '2022-02-10T02:30:01+00:00'
  end_time: '2022-02-10T03:00:00+00:00'
  renewables: 106
  spike_status: none
  range_min: -0.04
  range_max: 0.53

1 post - 1 participant

Read full topic

Create "Current Temp" entity from air con

$
0
0

Hi all,

I’m new to HA and find it all a bit confusing, so this question may be simple and hope you can help.

I have an air conditioner integrated through Sensibo (boy was that an effort for me!). The device exists, but there doesn’t seem to be a current temp entity that I can use in other cards etc.

How do I take the data from one entity and split it so I can use it?

Many thanks

2 posts - 2 participants

Read full topic

Hassio_multicast container high CPU usage

$
0
0

So recently I’ve noticed my CPU usage sky rocketing after I haven’t restarted in a while. I can’t pin point what causes this but after checking different docker containers, it looks like it’s coming from the hassio_multicast container. I don’t know what this is and why it randomly goes super high. Restarting home assistant resolves the issue for a while and then eventually goes back to maxed out CPU again. Any ideas?

1 post - 1 participant

Read full topic

Aqara zigbee temperature sensors unavailable

$
0
0

I bought 2x aqara zigbee temperature sensors recently. I connected them directly with a con bee II stick via ZHA.

Both have the same issue. I am able to pair them successfully but after a while, they just become unavailable. I cannot do anything except deleting them and reconnecting them… until it happen again.

Any ideas why?

If not, can you provide some alternatives to these sensors that are reliable?

1 post - 1 participant

Read full topic

Environment Canada Forecasts

$
0
0

I have two Raspberry Pis, one 32 bit and the other 64. Both have what should be identical homeassistant integrations, but the Environment Canada integration is behaving differently. I am using Victoria Harbour, configured in both installs with the same Province and ID code, but the sensors are different in each. One has a sensor.victoria_harbour_forecast entity but the other does not. Why is this, and can I manually add an entity?

1 post - 1 participant

Read full topic

Viewing all 105849 articles
Browse latest View live


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