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

Run remote ssh command using command_line switch

$
0
0

@RienduPre wrote:

Hi,

I’ve read a lot of post about this functionality, but still can’t get it to work. So I like to op a new topic.

What did I do solar:
Created a switch in my switch.yaml file:

- platform: command_line
  switches:
    mm_screen:
      command_on: "ssh pi@192.168.0.190 'vcgencmd display_power 1'"
      command_off: "ssh pi@192.168.0.190 'vcgencmd display_power 0'"

I create a ssh_key file in /config and using ssh-keygen -t rsa on the HASS.IO system
Did a - ssh-copy-id pi@192.168.0.190 on the HASS.IO system to the system I want to execute the command.
The command works from ssh on the HASS>IO system

But when a switch the switch to on, I get this error.
Schermafbeelding 2020-03-30 om 13.47.32

So any help is appreciated to get this working.

Best regards,
Rien

Posts: 1

Participants: 1

Read full topic


Home Energy Meter Gen5

$
0
0

@cyberphox wrote:

I currently have 2 x 200amp service running into my house. Bought 2 of these to hook up and have successfully got data coming in on the first one. Before I hook up the second one, I was wondering if it is possible to somehow add both sensor values together to sum up my whole house energy? Perhaps some kind of template needed to do this?

Posts: 2

Participants: 2

Read full topic

Unable to remove Auto-discovered Tasmota MQTT device

$
0
0

@Codec303 wrote:

Hi, I’ve searched on here and it seems that if I run setoption19 off on the device I want to remove it should disappear, yet I’ve done this, and the device still appears and shows as unavaliable:

Screenshot 2020-03-30 at 13.13.01

Running the latest HAC, TASMOTA, MOSQUITTO, etc. so cannot update, are there any other steps I need to do to remove this device? Thanks.

Posts: 3

Participants: 2

Read full topic

Arm switch for script

$
0
0

@PaulAntonDeen wrote:

I control my fireplace through the main UI and want to make it a two step process to prevent accidental clicks. So something where I toggle an input boolean that automatically disables after 5 seconds (I got that part working). Only while the input boolean is on can you then press the buttons that run the scripts that send the MQTT commands to turn on/off the fireplace.
Prettiest would be that the UI elements themselves become gray until you toggle the input Boolean.
If that is not possible I need to embed a test in the scripts to test the condition of the input boolean and not execute if it is not in on position.

haard_uit:
  alias: Haard uit
  icon: mdi:fire-extinguisher
  sequence:
  - service: mqtt.publish
    data_template:
      payload: '{"value":2043326,"protocol":5,"length":22,"delay":367}'
      topic: home/OpenMQTTGateway_ESP8266_RF/commands/MQTTto433
      retain: true
  - delay: 00:00:01
  - service: mqtt.publish
    data_template:
      payload: '{"value":2043326,"protocol":5,"length":22,"delay":367}'
      topic: home/OpenMQTTGateway_ESP8266_RF/commands/MQTTto433
      retain: true
  - delay: 00:00:01
  - service: mqtt.publish
    data_template:
      payload: '{"value":2043326,"protocol":5,"length":22,"delay":367}'
      topic: home/OpenMQTTGateway_ESP8266_RF/commands/MQTTto433
      retain: true
  - delay: 00:00:01
  - service: mqtt.publish
    data_template:
      payload: '{"value":2043326,"protocol":5,"length":22,"delay":367}'
      topic: home/OpenMQTTGateway_ESP8266_RF/commands/MQTTto433
      retain: true
haard_max:
  alias: Haard maximaal
  icon: mdi:fireplace
  sequence:
  - service: mqtt.publish
    data_template:
      payload: '{"value":2043316,"protocol":26,"length":22,"delay":367}'
      topic: home/OpenMQTTGateway_ESP8266_RF/commands/MQTTto433
      retain: true
haard_min:
  alias: Haard minimaal
  icon: mdi:fireplace-off
  sequence:
  - service: mqtt.publish
    data_template:
      payload: '{"value":2043316,"protocol":5,"length":22,"delay":367}'
      topic: home/OpenMQTTGateway_ESP8266_RF/commands/MQTTto433
      retain: true

Posts: 3

Participants: 2

Read full topic

How to add an extra filter in python script to rule out a subset of lights

$
0
0

@Mariusthvdb wrote:

using this python

dt_prevstate = None
utc_offset = hass.states.get('sensor.utc_offset').state
timeDifference = float(utc_offset)

group = 'group.all_lights_only'
fname = 'Lights'
on_format = 'Lights on: {} -- {}'
off_format = 'No lights on since '
filter = 'on'
pic = 'lamp_off|lamp'
icon = 'mdi:lightbulb'

# min_show = 0
count = 0
desc = ''

for entity_id in hass.states.get(group).attributes['entity_id']:
    state = hass.states.get(entity_id)

    if (state.state == filter or debug):
        dt = state.last_updated + datetime.timedelta(hours= timeDifference)
        time = '%02d:%02d' % (dt.hour, dt.minute)

      # If state changed in the past days show the date too
        if dt.date() < datetime.datetime.now().date():
            time = '{} {}'.format('%02d/%02d' % (dt.day, dt.month),time)

        count = count + 1
        desc = '{} {} ({}), '.format(desc,state.name,time)
    else:
        if (dt_prevstate is None):
            dt_prevstate = state.last_changed
        else:
            if (not state.last_changed is None):
                if (state.last_changed > dt_prevstate):
                    dt_prevstate = state.last_changed

works fine. and shows me all light that are ‘on’, with their respective last_changed time.
However, Ive had to turn on allow_unreachable: true for my Hue lights, which makes unreachable lights show as ‘on’ if they are ‘on’ in the Hub. That is a bit silly, because now all my outside night lights show ‘on’ in my setup, while in fact they are ‘unreachable’.


So I’d like to extend the above python with an if clause for a sub set of lights for which the reachable attribute is set in a binary_sensor and if that binary_sensor is ‘off’, it should be added to the list (desc in the python)

the binaries follow the naming of the lights of course:

binary_sensor.backdoor_outdoors_reachable  light.backdoor_outdoors
binary_sensor.bureau_marte_reachable  light.bureau_marte
binary_sensor.driveway_reachable light.driveway
binary_sensor.garden_backyard_reachable 
binary_sensor.garden_terrace_reachable
binary_sensor.gate_outdoors_reachable
binary_sensor.mobile_reachable
binary_sensor.porch_outdoors_reachable

Please help me adding the logic to rule those out in the ‘on’ selection.

dont add to the list if

'binary_sensor.{}_reachable'.format(state.object_id) != 'on' 

to give you an idea of what I am looking for.
thanks for having a look and time if you would

Posts: 6

Participants: 2

Read full topic

Sonoff S20 plug Tasmota

$
0
0

@Vaughanza wrote:

Hi Guys
I have flashed my Sonoff S20 but there is no S20 plug Modula ?
Must I just use the Sonoff Basic for the Sonoff S20 plug

Thanks

Posts: 2

Participants: 2

Read full topic

Logitech Harmony Discovery

$
0
0

@FlangeMonkey wrote:

Hi Guys,

New to home-assistant and finding a couple of things confusing. I appear to have discovery working, it found a couple of devices on my network and I see them in devices and integration after configuration.

The Harmony Hub, however, appears to be discovered as I have a harmony_devicename.conf file, but I do not see it in devices, integration or developer tools > states.

I am a smartthings users and moving over to home-assistant, I also have smartthings connected to home-assistant during this move, so I’m unsure if there is some form of conflict.

Thanks,

Posts: 6

Participants: 4

Read full topic

Unable to retrieve data from luftdaten.info

$
0
0

@hajo62 wrote:

Often after a HA-reboot I don’t get data from luftdaten.info - (sensor 11642).

To get data, I need to reboot HA - sometimes multiple times till it works:

ERROR (MainThread) [homeassistant.components.luftdaten] Unable to retrieve data from luftdaten.info

The entity info on the luftdaten integrations shows:

This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.

Posts: 1

Participants: 1

Read full topic


How to prevent Supervisor from self updating?

$
0
0

@Jan.Schmidt wrote:

Hi,

i had a good running system - yesterday an update brokes my whole setup ;-(
After getting a backup ssd with a running OS & HA Docker environment my setup gets broken again by selfupdating.

I dint want that i want to update when i am prepared for it.
Now after some hours and rebuiling my setup from scratch i’ve got Supervisor 214 even when my configuration.yaml looks like this:

automation:
config:
frontend:
history:
logbook:
map:
person:
script:
ssdp:
sun:
system_health:

Posts: 3

Participants: 3

Read full topic

Fail2ban / ha : still allowing banned IPs

$
0
0

@ninjadog wrote:

Hi

So I installed fail2ban as per:


Tested by creating a new temp user in HA. Supplied wrong password 3 times. fail2ban log correctly states “Ban…”

2020-03-30 13:12:22,114 fail2ban.filter         [516]: INFO    [ha] Found xxx.xxx.xxx.xxx - 2020-03-30 13:12:22
2020-03-30 13:12:29,277 fail2ban.filter         [516]: INFO    [ha] Found xxx.xxx.xxx.xxx- 2020-03-30 13:12:29
2020-03-30 13:12:30,883 fail2ban.filter         [516]: INFO    [ha] Found xxx.xxx.xxx.xxx- 2020-03-30 13:12:30
2020-03-30 13:12:31,198 fail2ban.actions        [516]: NOTICE  [ha] Ban xxx.xxx.xxx.xxx

iptables correctly shows the drop in the chain…

Chain f2b-ha (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 REJECT     all  --  *      *       xxx.xxx.xxx.xxx/0    reject-with icmp-port-unreachable
 8488  730K RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

but if I use the correct password., HA allows login and presents overview screen.

I’ve set bantime to -1 so it should be permanent?

What should I look into?

Posts: 1

Participants: 1

Read full topic

107 and Resources

Unable to configure Besder IP Camera

$
0
0

@falithurrahman wrote:

I recently bought Besder IP Camera, the box said it’s model 6024PB-I101. I want to configure it so it’s accessible form home assistant user interface. I’ve read confirmed camera and configurations here. Then i realized that my camera is not listed over there, so i go to iSpy camera database over here.

On the camera database, i found several details like models, type, protocol, and path. With VLC player, i can stream my camera using address below
rtsp://admin:admin@192.168.1.20/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp

Then i try to configure my configuration.yaml file as below, but i can’t get my camera entities. Is there any solutions what should i do? Should i add still_image_url, but how? Thanks.

camera:
  - platform: ffmpeg
    stream_source: rtsp://admin:XRU3bzHp@192.168.42.99/user=admin_password=XRU3bzHp_channel=1_stream=0.sdp
    name: cctv_01

Posts: 1

Participants: 1

Read full topic

Area_id for automation

$
0
0

@Stresskind wrote:

Hi,

I like the areas that are available to group devices. I have multiple windows sensors in my system via deconz. For a nice view - in the frontend - they are all labeled as window.

There are multiple automations, that are working with these sensors e.g. an alarm system. I would like to access the area_id of my objects to get better notifications via telegram_bot.

Without the area_id, I have do make a lot of checks wich sensor calls the automation.

- alias: Window Warning
  description: ''
  trigger:
  - platform: device
    domain: binary_sensor
    entity_id: binary_sensor.livingroom_window
	type: opened
    for:
      hours: 0
      minutes: 10
      seconds: 0
	  
  - platform: device
    domain: binary_sensor
    entity_id: binary_sensor.kitchen_window
    type: opened
    for:
      hours: 0
      minutes: 10
      seconds: 0
	  
  - platform: device
    domain: binary_sensor
    entity_id: binary_sensor.bedroom_window
    type: opened
    for:
      hours: 0
      minutes: 10
      seconds: 0
	  
  condition:
  - condition: zone
    entity_id: person.family
    zone: zone.home
	
  action:
  - data_template:
      message: Close {{ trigger.to_state.attributes.device_class }} (*{{ trigger.to_state.attributes.friendly_name }}*) that was enough fresh air!
      title: '*Door & Window State*'
    service: notify.family

Thanks for a helpful advice.
Stresskind

Posts: 1

Participants: 1

Read full topic

Parsing JSON data into sensor and scraping for daily file

$
0
0

@texanbull14 wrote:

I’m hoping to get county data for Illinois in regards to coronavirus. The only data source I can seem to find is here: https://observablehq.com/@chicagoreporter/coronavirus-illinois-county-counts.

There’s a daily file I could possibly scrape for data, but I’m curious what the best route in getting this data displayed in HA. The two obstacles I need to overcome, in my opinion are:
- Pointing the data to a new URL depending on the day, due to the format of the JSON file:
. https://www.dph.illinois.gov/sites/default/files/COVID19/COVID19CountyResultsYYYYMMDD.json
- Ingesting this data and transforming / reading it into a sensor

Any thoughts? Any help is appreciated!

Posts: 2

Participants: 2

Read full topic

Poultry Barn Sensors

$
0
0

@jakadia wrote:

Hello, I have been trying to find a more efficient way to do what I am doing. I have a computer that runs 2 large poultry barns on my farm. I can set the computers up to dump data to an FTP server every 1-60 mins in the form of either a .json or .xml file. I am currently using Integromat to look for new files every 15 mins and parse the data into a json message and send it to HA via webhook, however I would like to make the update time more frequent and with doing this Integromat gets very expensive. Is there a way I can do this locally on HA? The FTP server is not running locally, but in the cloud so I am sure that adds a little more complexity to this. I checked with manufacturer of computers and they have no API or way to connect to a third party. Any ideas on what directions I should take or avenues I should pursue?

Posts: 1

Participants: 1

Read full topic


External access with MyFRITZ service?

$
0
0

@Marius82 wrote:

Hi!

Is it possible to have access to my home assistant via the FritzBox service MyFritz?Instead of ie. DuckDns?
It is a DynDns service from AVM (the FritzBox manufacturer) which is already integrated in the FritzBox.

Has anybody a working solution?

Thank you

Posts: 1

Participants: 1

Read full topic

Dimmer Switch Ping Pong?

$
0
0

@mboarman wrote:

Is/will there be a solution to the ‘ping-pong’ effect when using a Z-Wave dimmer inside lovelace? I don’t understand why such a basic command as on-off still doesn’t work properly with HA? I’ve adjust the poll rate of those devices and it helps (sorta). But I don’t understand why Smartthings and Hubitat can get it right and HA still is buggy? Don’t get me wrong…I don’t regret switching from ST or Hubitat for a second, but I would think that this would have been addressed by now?

Just curious if this is a priority or someone has a better solution. Thanks for hearing me out!

Posts: 1

Participants: 1

Read full topic

Include persistent_notification in notification group?

$
0
0

@n0ir wrote:

Anyone knows how to include the persistent_notification service in a notification group?

Posts: 1

Participants: 1

Read full topic

On-boarding wizard shouldn't appear

$
0
0

@aristosv wrote:

I am currently using Home Assistant core, in a docker container and I am working on a bash script that:

  • Stops Home Assistant container
  • Backs up all data located at /var/lib/docker/volumes/homeassistant/_data
  • Deletes Home Assistant container, image & volume
  • Downloads the latest Home Assistant image & installs it
  • Stops Home Assistant container
  • Restores backed up data to /var/lib/docker/volumes/homeassistant/_data
  • Starts the Home Assistant container

Basically I am doing this with all my containers but with Home Assistant I have the following issue:

After the container is started, I am prompted to go through the on-boarding wizard again. It shouldn’t do that because all my configuration has been restored.

Any idea why?

These are my scripts for backing up and restoring all my containers.

backup containers

for containername in $(docker ps --format "{{.Names}}")
do
 echo stopping $containername
 docker stop $containername > /dev/null 2>&1

 echo creating $containername backup folder
 mkdir -p /mnt/backup/backups/containers/$(date +"%d_%m_%Y")/$containername

 echo backing up $containername
 cp -R /var/lib/docker/volumes/$containername/_data/* /mnt/backup/backups/containers/$(date +"%d_%m_%Y")/$containername

 echo starting $containername
 docker start $containername > /dev/null 2>&1
done

restore containers

for containername in $(docker ps --format "{{.Names}}")
do
 echo stopping $containername
 docker stop $containername > /dev/null 2>&1
 
 echo removing $containername configuration
 rm -rf /var/lib/docker/volumes/$containername/_data/*

 echo restoring $containername configuration
 cp -R /mnt/backup/backups/containers/$(date +"%d_%m_%Y")/$containername/* /var/lib/docker/volumes/$containername/_data/
 
 echo setting $containername permissions
 chown -R containers:containers /var/lib/docker/volumes/$containername/_data/

 echo starting $containername
 docker start $containername > /dev/null 2>&1
done

Posts: 3

Participants: 3

Read full topic

Missing options?

$
0
0

@marvandorth wrote:

Hi,

Perhaps I’m stupid, but my Home Assistant installation is missing some key features I guess?
I’m unable to find the Automation Editor, Scene Editor and Scripts Editor.
In the past this was in the sidebar. But after a long time of not using HA and updating to 0.107.5 I can’t find them anymore.

Posts: 13

Participants: 4

Read full topic

Viewing all 106212 articles
Browse latest View live


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