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

Template gives error in config.yaml

$
0
0

@ageurtse wrote:

Hello,

i’m trying to work with templats, what i want is do a count on my door and window contacts.

when i check the template in the template editor, it is working, but when pasting the code to the config.yaml. it won;t load.

what do i do wrong ?

sensors:
  - platform: template 
    sensors:
      contact_count:
        entity_id: sensor.count
        value_template: > 
          {% set binary_sensor = [
            states.binary_sensor.voordeur,
            states.binary_sensor.achterdeur,
            states.binary_sensor.raam_voor,
            states.binary_sensor.raam_achter,
            ] %}
          {{ binary_sensor | selectattr('state','eq','on') | list | count }}

Posts: 2

Participants: 2

Read full topic


Problems setting up Pi-hole or AdGuard

$
0
0

@une18 wrote:

Ubuntu - Docker - Home assistant

Tried so many ways. Pihole on Docker, Pihole on HA, AdGuard on HA (only because Pi-hole is no longer updated for HA). Would prefer docker, but don’t have skills for debugging.

before update I was able to open pihole admin page, but not run the service. After update it doea not work.

Can not access if installed into docker.

Get error if try with AdGuard

Posts: 10

Participants: 3

Read full topic

Time Sensor display 24HR AM/PM

$
0
0

@wakeskate wrote:

I have searched everywhere for this.
Like most things with HA always harder than it seams.
Anyone know how to get the standard time sensor
to display 24HR AM/PM

sensor:
  - platform: time_date
    display_options:
      - 'time'

Thanks…

Posts: 1

Participants: 1

Read full topic

Why is this notification dismissal happening in the background?

$
0
0

@Mariusthvdb wrote:

building on this: Please check correct trigger and id in this automation

I have test automation for finding the correct trigger templates for my persistent_notifications. To see which service_data is used:

  - alias: 'Global persistent notification dismissal notification'
    trigger:
      platform: event
      event_type: call_service
      event_data:
        domain: persistent_notification
        service: dismiss
    action:
      service: notify.mobile_app_calltheboss
      data_template:
        title: 'dismissed'
        message: >
          persistent notification with notification_id {{trigger.event.data.service_data.notification_id}}
          was dismissed

without any frontend persistent_notification being created (or at least so I can see) this is firing about very 5 minutes…??

message text is:

persistent notification with notification_id config_entry_discovery was dismissed

Apparently the config discovery going on in the background, creating a persistent notification, which is then auto dismissed somehow. The dismissal is being sensed by the automation, and reported…

Is this a bug in the system, or a unexpected side-effect of an ‘ignore’ for the discovery I set? these kept bugging me:

and now still do, in the background apparently? I would think, setting the ignore fall would truly ignore the discovery, as in prevent. Now it seems to hide it, which is really unwanted, and taking system resources at that.

or would something else be going on

thanks for having a look

Posts: 1

Participants: 1

Read full topic

Moved to HAss Z-Wave

$
0
0

@SuperSuave wrote:

Hey All,

I have just switched over from SmartThings to an Aeotec Z-Stick Gen 5.

So far, I have gotten just about every device moved over(been a fun time). I have a few Inovelli devices. A couple of the older ones are working great, but I’m missing functions/being able to configure a few of them.

The ones I’m having issues with are the LZW42(RGBW Bulb), LZW60(4 in 1 Sensor) and their LZW31(Red Series Dimmer).

I have seen a lot about modiying the manufacturer_specific.xml file. I finally found it(I copied directly from the 1.4 archive for OZW, added in the new Inovelli Devices)

I tried following this post, but with no luck…

Can someone show me what I am missing and why I can’t get configuration options for these Inovelli devices?

Let me know if there’s any other info needed!

Running 0.108.3

Manufacturer Specific File:

    <Manufacturer id="031E" name="Inovelli">
      <Product type="0002" id="0001" name="LZW30-SN Switch Red Series" config="inovelli/lzw30-sn.xml"/>
      <Product type="0004" id="0001" name="LZW30 Switch" config="inovelli/lzw30.xml"/>
      <Product type="0001" id="0001" name="LZW31-SN Dimmer Red Series" config="inovelli/lzw31-sn.xml"/>
      <Product type="0003" id="0001" name="LZW31 Dimmer" config="inovelli/lzw31.xml"/>
      <Product type="0005" id="0001" name="LZW42 Multi-Color Bulb" config="inovelli/lzw42.xml"/>
      <Product type="0006" id="0001" name="LZW41 Multi-White Bulb" config="inovelli/lzw41.xml"/>
      <Product type="0007" id="0001" name="LZW40 Dimmable  Bulb" config="inovelli/lzw40.xml"/>
      <Product type="000d" id="0001" name="LZW60 4-in-1 Sensor" config="inovelli/lzw60.xml"/>
    </Manufacturer>

Z-wave Config:

zwave:
  usb_path: /dev/ttyACM1
  config_path: /config/z-wave/config
  device_config: !include zwave_device_config.yaml

Posts: 1

Participants: 1

Read full topic

Integrate ConnectSense with HA

$
0
0

@vnthierry wrote:

I am looking for ways to integrate ConnectSense in-wall Outlet to HA. Does anyone know how? Please help me

Thanks

Posts: 1

Participants: 1

Read full topic

Trusted network configuration problem

$
0
0

@Avi_Cohen wrote:

Home Assistant 0.108.3
I’m trying to configure trusted_proxies /trusted_networks
Basically i’d like to have to option to skip longing screen when i
connect to HA locally .
Im running traefik as reverse proxy - which running on same server ,
sharing same docker network .

below configuration :

homeassistant:
  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.0.0/24 #router
        - 127.0.0.1      #host
      allow_bypass_login: true
    - type: homeassistant

http:
  base_url: !secret base_url
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.29.4.5  # traefik internal docker port

I connect to HA with dns name http:/mydomain.com
but i keep getting “Your computer is not whitelisted”

Posts: 1

Participants: 1

Read full topic

Help needed with custom sensor

$
0
0

@michel72 wrote:

Hi, I need a custom template sensor that will create a state based on the attribute and state of the original sensor.

The original sensor is:

However if I set the fan speed to off, the sensor speed attribute actually remains ‘medium’, it just switches the fan off.

What I need is 1 sensor that will display the speed attribute, but not when the fan is off, so what I need is a template sensor with the following states:

Off
Low
Medium
High

I build this template:

sensor:
- platform: template
  sensors:
    comfofan_state:
      friendly_name: "Comfofan status"
      entity_id: fan.esp32_fan_controller_02
      value_template: "{{ state_attr('fan.esp32_fan_controller_02', 'speed') }}"

But that will only give me low, medium and high. but not off.

How to do this?

Posts: 2

Participants: 2

Read full topic


Bluetooth Phone Battery Sensor

$
0
0

@wakeskate wrote:

I found this sensor on the forum but it looks like it requires the android app.
Anyone know if there is any way to get the battery status from just a
Bluetooth device.tracker.

It works but just only shows home or away for phone status.

sensor:

  • platform: template
    sensors:
    battery_phone:
    friendly_name: ‘Phone Batt’
    unit_of_measurement: ‘%’
    value_template: >-
    {%- if state_attr(‘device_tracker.samsung_sm_g935v’, ‘battery_level’) %}
    {{ state_attr(‘device_tracker.samsung_sm_g935v’, ‘battery_level’)|round }}
    {% else %}
    {{ states(‘device_tracker.samsung_sm_g935v’) }}
    {%- endif %}
    device_class: battery

Posts: 1

Participants: 1

Read full topic

Turn on device based on workday, time and temperature

$
0
0

@vazquezjm wrote:

Hi.

I want to turn on a heating panel only if it is a workday, between 6:00 am and 9:00 pm and the temperature is < 22 ºC. Also, I want to turn it off if the temperature is => 22ºC.

I started with this, but not sure how to include the other conditions :confused:

automation:
  alias: Turn on heater on workdays
  trigger:
    platform: time
    at: '06:00:00'
  condition:
    condition: state
    entity_id: 'binary_sensor.workday_sensor'
    state: 'on'
  action:
    service: switch.panel_on
    entity_id: switch.heater

Posts: 3

Participants: 3

Read full topic

Revert lights to previous state after timed automation

$
0
0

@nickraffy wrote:

I have an automation that changes the color of a light depending on the amount of time I have before I have to leave for work. Currently I use an automation that activates 1 minute prior to the indicator automation to take a snapshot of the lights current state and then another script that activates 1 minute after the indicator automation to restore the lights initial state. The indicator automation is set to run between a specific time period. I am wondering if there is a way to condense this into a single automation that runs the indicator action for a set amount of time? I tried looking into using a for loop with a 1 minute delay per loop but I don’t know that I can place an entire action within a for loop.

The time_to_leave sensor gives a value in minutes before I am supposed to leave and goes negative once the time has passed (resets every day at midnight). I currently update that sensor manually within the automation since it uses the now() function.

Indicator automation action:

data_template:
  brightness_pct: 30
  color_name: >-
    {% set leave = states('sensor.time_to_leave')| int %} 
    {% if leave > 2 %}
      green
    {% elif 0 < leave <= 2 %}
      yellow
    {% else %}
      red
    {% endif %}
  entity_id: light.living_room
service: light.turn_on

The actions to take a snapshot and restore light state:

data:
  scene_id: leave_time_revert
  snapshot_entities: light.living_room
service: scene.create
data: {}
entity_id: scene.leave_time_revert
service: scene.turn_on

Posts: 1

Participants: 1

Read full topic

Raspi4 & Razberry 2 board - is it incompatible with Hassio?

$
0
0

@sdbenner wrote:

I have added dtoverlay=pi3-disable-bt to the end of my /mnt/boot/config.txt file, and the zwave integration seems to install successfully in the UI by using the

USB path = /dev/ttyAMA0

per my hardware listing, however when I try to start the zwave network, I continue to get the following error in my OZW_Log.txt:

2020-04-14 20:48:24.890 Always, OpenZwave Version 1.4.3469 Starting Up
2020-04-14 20:49:09.311 Info, Setting Up Provided Network Key for Secure Communications
2020-04-14 20:49:09.312 Info, mgr, Added driver for controller /dev/ttyAMA0
2020-04-14 20:49:09.312 Info, Opening controller /dev/ttyAMA0
2020-04-14 20:49:09.315 Info, Trying to open serial port /dev/ttyAMA0 (attempt 1)
2020-04-14 20:49:09.315 Info, Serial port /dev/ttyAMA0 opened (attempt 1)
2020-04-14 20:49:09.316 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2020-04-14 20:49:09.316 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2020-04-14 20:49:09.316 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2020-04-14 20:49:09.316 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2020-04-14 20:49:09.318 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2020-04-14 20:49:09.318 Detail,
2020-04-14 20:49:09.318 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2020-04-14 20:49:09.318 Detail, contrlr, Notification: DriverFailed

I’ve tried dtoverlay=pi3-miniuart-bt as well as replacing pi3 with pi4. no change.
Any suggestions?

Posts: 2

Participants: 1

Read full topic

Duplicate values written to InfluxDB

$
0
0

@sillyfrog wrote:

I have noticed that Home Assistant is writing all of my events to the InfluxDB twice (ie: duplicating every value). They are offset very slightly (ms apart), hence influx is not de-duplicating them.

I have even looked at a traffic dump (details below) and can confirm that it’s setting up 2x TCP connections, and posting the data twice.

Most of my sensors are over MQTT, and I’ve included a few relevant log lines below. This appears to be happening for all my sensors, I’m just focusing on one below to minimize noise.

I have tried updating to the latest Home Assistant (which obviously also restarts it), creating a new Influx DB and then writing to that (still the same thing in the new DB). My configuration for influx is very simple, ie:

influxdb:
    host: core.sf

That’s it, all writing to the default DB, and no authentication etc.

Best I can tell I have no other InfluxDB configuration (plus I would have thought changing the DB name in the config here would have caught that, but it was still getting written twice to the new DB).

This is the query and output showing the nearly (within a fraction of a second) duplicate entries:

curl "http://core.sf:8086/query?db=home_assistant&q=SELECT%20%22value%22%20FROM%20%22%C2%B0C%22%20WHERE%20(%22entity_id%22%20%3D%20'server_room_temperature')%20AND%20time%20%3E%3D%20now()%20-%201m" | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   179    0   179    0     0   3140      0 --:--:-- --:--:-- --:--:--  3140
{
   "results" : [
      {
         "statement_id" : 0,
         "series" : [
            {
               "columns" : [
                  "time",
                  "value"
               ],
               "values" : [
                  [
                     "2020-04-15T01:35:19.912827904Z",
                     31.22
                  ],
                  [
                     "2020-04-15T01:35:19.912833024Z",
                     31.22
                  ]
               ],
               "name" : "°C"
            }
         ]
      }
   ]
}

The MQTT events that were sent for the temperature sensor:

[2020-04-15 11:34:19.889856] INFO: MQTT: homie/server-room/temperature/degrees	31.42
[2020-04-15 11:35:19.911679] INFO: MQTT: homie/server-room/temperature/degrees	31.22

(Showing the minute before for completeness, but with all the other noise removed)

The relevant debug logs from HASS:

2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homie/server-room/temperature/degrees: b'31.22'
2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.server_room_temperature, old_state=<state sensor.server_room_temperature=31.42; unit_of_measurement=°C, friendly_name=Server Room Temperature, icon=mdi:thermometer @ 2020-04-15T11:34:19.891698+10:00>, new_state=<state sensor.server_room_temperature=31.22; unit_of_measurement=°C, friendly_name=Server Room Temperature, icon=mdi:thermometer @ 2020-04-15T11:35:19.912792+10:00>>
2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139935041355920] Sending {'id': 74, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.server_room_temperature', 'old_state': <state sensor.server_room_temperature=31.42; unit_of_measurement=°C, friendly_name=Server Room Temperature, icon=mdi:thermometer @ 2020-04-15T11:34:19.891698+10:00>, 'new_state': <state sensor.server_room_temperature=31.22; unit_of_measurement=°C, friendly_name=Server Room Temperature, icon=mdi:thermometer @ 2020-04-15T11:35:19.912792+10:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2020, 4, 15, 1, 35, 19, 912828, tzinfo=<UTC>), 'context': {'id': '44986d6954794b91b39babd106d16e29', 'parent_id': None, 'user_id': None}}}
2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139935246701072] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.server_room_temperature, old_state=<state sensor.server_room_temperature=31.42; unit_of_measurement=°C, friendly_name=Server Room Temperature, icon=mdi:thermometer @ 2020-04-15T11:34:19.891698+10:00>, new_state=<state sensor.server_room_temperature=31.22; unit_of_measurement=°C, friendly_name=Server Room Temperature, icon=mdi:thermometer @ 2020-04-15T11:35:19.912792+10:00>>}
2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homie/server-room/temperature/humidity: b'49.78'
2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.server_room_humidity, old_state=<state sensor.server_room_humidity=49.44; unit_of_measurement=%, friendly_name=Server Room Humidity, icon=mdi:water @ 2020-04-15T11:34:19.910935+10:00>, new_state=<state sensor.server_room_humidity=49.78; unit_of_measurement=%, friendly_name=Server Room Humidity, icon=mdi:water @ 2020-04-15T11:35:19.978488+10:00>>
2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139935041355920] Sending {'id': 74, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.server_room_humidity', 'old_state': <state sensor.server_room_humidity=49.44; unit_of_measurement=%, friendly_name=Server Room Humidity, icon=mdi:water @ 2020-04-15T11:34:19.910935+10:00>, 'new_state': <state sensor.server_room_humidity=49.78; unit_of_measurement=%, friendly_name=Server Room Humidity, icon=mdi:water @ 2020-04-15T11:35:19.978488+10:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2020, 4, 15, 1, 35, 19, 978542, tzinfo=<UTC>), 'context': {'id': '3d338d5996044a87b77990c1a51f70b3', 'parent_id': None, 'user_id': None}}}
2020-04-15 11:35:19 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139935246701072] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.server_room_humidity, old_state=<state sensor.server_room_humidity=49.44; unit_of_measurement=%, friendly_name=Server Room Humidity, icon=mdi:water @ 2020-04-15T11:34:19.910935+10:00>, new_state=<state sensor.server_room_humidity=49.78; unit_of_measurement=%, friendly_name=Server Room Humidity, icon=mdi:water @ 2020-04-15T11:35:19.978488+10:00>>}

Looking at those logs I see its firing 2x websocket connections, but I am running app daemon and have the web browser open. When I close the browser, there is only one web socket event fired (as expected I think).

Finally, the (decoded) TCP stream for traffic going to influx from HASS:

POST /write?db=home_assistant HTTP/1.1
Host: core.sf:8086
User-Agent: python-requests/2.23.0
Accept-Encoding: gzip, deflate
Accept: text/plain
Connection: keep-alive
Content-Type: application/octet-stream
Content-Length: 296
Authorization: Basic cm9vdDpyb290

..C,domain=sensor,entity_id=server_room_temperature friendly_name_str="Server Room Temperature",icon_str="mdi:thermometer",value=31.42 1586914459891752960
%,domain=sensor,entity_id=server_room_humidity friendly_name_str="Server Room Humidity",icon_str="mdi:water",value=49.44 1586914459910949888
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: 3ad2d245-7eb9-11ea-a92e-0242ac130009
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.7.10
X-Request-Id: 3ad2d245-7eb9-11ea-a92e-0242ac130009
Date: Wed, 15 Apr 2020 01:34:21 GMT

And on another TCP stream (date stamp happened to be slightly different to show the 2x posts):

POST /write?db=home_assistant HTTP/1.1
Host: core.sf:8086
User-Agent: python-requests/2.23.0
Accept-Encoding: gzip, deflate
Accept: text/plain
Connection: keep-alive
Content-Type: application/octet-stream
Content-Length: 296
Authorization: Basic cm9vdDpyb290

..C,domain=sensor,entity_id=server_room_temperature friendly_name_str="Server Room Temperature",icon_str="mdi:thermometer",value=31.42 1586914459891737088
%,domain=sensor,entity_id=server_room_humidity friendly_name_str="Server Room Humidity",icon_str="mdi:water",value=49.44 1586914459911021824
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: 3ad2d33f-7eb9-11ea-a92f-0242ac130009
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.7.10
X-Request-Id: 3ad2d33f-7eb9-11ea-a92f-0242ac130009
Date: Wed, 15 Apr 2020 01:34:20 GMT

Hopefully that’s all the information anyone may need to help point me in the right direction. I currently stumped as to what it could be - but best I can tell it’s some sort of bug in one of the modules (but not sure which one, however influx is looking most likely to me.) If there is anything else I can do, please let me know (eg: can I turn on more debugging in the Influx module?)

Cheers!

Posts: 1

Participants: 1

Read full topic

Use Tradfri standalone + integrated in HA

$
0
0

@stolevegen wrote:

Hi.

I’m using;
Hue hub for my Hue + Tradfri lights.
CC2531 + external antenna for sensors.

The CC2531 can’t reach all the sensors and I need some routers.
My son has a standalone(not integrated in HA) Tradfri light + remote that he bought himself. He wants to keep using the remote for controlling the light. The light is about halfway between the CC2531 and the furthest sensort

The question ;
Can I connect the Tradfri light to my CC2531 and still keep the normal function with the remote independantly of Home Assistant?

Posts: 1

Participants: 1

Read full topic

MQTT topic from arduino to Hassio issue

$
0
0

@Dmosq wrote:

Hi Guys, i’m new here and in hassio.
i’m following a tutorial to create an MQTT window sensor in arduino ESP01 and conect it to home assistant.

the thing is, i am getting the mqtt_topic in node red, the arduino is working as expected as you can see in the image i’m getting the toppic:

but i do not know how to publish it into an entity in the lovelace, i put this configuration in my configuration.yaml

sensor:
  platform: mqtt
  name: 'Window'
  state_topic: 'test/window1'
  unique_id: 'test/window1'

and indeed it is creating and entity called sensor.window_1 but the state doesn’t change, it shows “Unknown”

Capture

does anybody here can help me to solve this? is it something that i’m not doing?

thank you

code in arduino:

#include <PubSubClient.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
ADC_MODE(ADC_VCC);

//USER CONFIGURED SECTION START//
const char* ssid = "MY_SSID";
const char* password = "MY_WIFI_PASSWORD";
const char* mqtt_server = "192.168.1.100";
const int mqtt_port = 1883;
const char *mqtt_user = "mqtt_user";
const char *mqtt_pass = "mqtt_password";
const char *mqtt_client_name = "windows"; // Client connections cant have the same connection name
const char *mqtt_topic = "test/window1";
IPAddress ip(192, 168, 1, 50); 
IPAddress gateway(192, 168, 1, 1); 
IPAddress subnet(255, 255, 255, 0);
//USER CONFIGURED SECTION END//


WiFiClient espClient;
PubSubClient client(espClient);

// Variables
bool boot = true;
char batteryVoltageMQTT[50];

//Functions

void setup_wifi() 
{
  WiFi.config(ip, gateway, subnet);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) 
    {
      delay(50);
    }
}

void reconnect() 
{
  while (!client.connected()) 
  {
      int battery_Voltage = ESP.getVcc() + 600;
      String temp_str = String(battery_Voltage);
      String mqttString = temp_str + "mV Replace Battery";
      mqttString.toCharArray(batteryVoltageMQTT, mqttString.length() + 1);
      if (battery_Voltage <= 2900)
      {
        //boolean connect (clientID, username, password, willTopic, willQoS, willRetain, willMessage)
        if (client.connect(mqtt_client_name, mqtt_user, mqtt_pass, mqtt_topic, 0, 1, batteryVoltageMQTT)) 
        {
        
          if(boot == true)
          {
            client.publish(mqtt_topic,"open");
            boot = false;
          }
        } 
        else 
        {
          ESP.restart();
        }
      }
      if (battery_Voltage > 2900)
      {
        if (client.connect(mqtt_client_name, mqtt_user, mqtt_pass, mqtt_topic, 0, 1, "closed")) 
        {
          if(boot == true)
          {
            client.publish(mqtt_topic,"open");
            boot = false;
          }
        } 
        else 
        {
          ESP.restart();
        }
      }
  }
}

void setup() 
{
  setup_wifi();
  client.setServer(mqtt_server, mqtt_port);
}

void loop() 
{
  
  if (boot == true) 
  {
    reconnect();
  }
  else
  {
  ESP.deepSleep(0);
  }
}

Posts: 1

Participants: 1

Read full topic


ZeroConf always loads

$
0
0

@juched wrote:

Hello, running on a raspberry pi 3 and found recently that mDNS has been causing a large amount of traffic on my network, causing entities to go offline (mainly wemo, but harmony and a dlink camera too).

I moved all my google home device to a separate network, and then started to disable all I could in HA. I removed default_config, and added in the items I needed, ensuring not to include ssdp and zeroconf.

I turned off discovery in Wemo and turned off homekit.

The traffic is much much better, but with Wireshark I still see my pi broadcasting and responding to mDNS items, so something is still running.

Checking the Developer tool -> Info page I see that zeroconf is still loaded. I then checked the logs and sure enough it is still seen loading up. Turned on “debug” logs and see right off the bat that zeroconf is in the list:

2020-04-14 23:26:43 DEBUG (MainThread) [homeassistant.bootstrap] Setting up {'python_script', 'ios', 'config', 'sensor', 'script', 'emulated_hue', 'amcrest', 'myq', 'webhook', 'frontend', 'switch', 'harmony', 'zha', 'map', 'rachio', 'zeroconf', 'envisalink', 'binary_sensor', 'api', 'scene', 'device_automation', 'plex', 'nest', 'http', 'zone', 'zwave', 'sun', 'updater', 'group', 'onboarding', 'history', 'shell_command', 'system_health', 'neato', 'ffmpeg', 'websocket_api', 'lovelace', 'device_tracker', 'ecobee', 'wemo'}

Any ideas how to not get it to load? or what component is causing it to be added to the list?

Thank you!

Posts: 1

Participants: 1

Read full topic

Samba confusion Hass.io

$
0
0

@madhits wrote:

So I am trying to configure my hass.io running on synology box via synology virtual machine manager.

I wanted to add samba shares to make this a lil easier as I was having trouble using the webui adding custom components.

The problem is the shares never show up or dont allow me to login. Now this could be only come from something about how im running hass.io in a virtual machine or something else. I don’t believe its a VM thing but its possible. I have no issues reaching the VM even through SSH. So why samba?

Here is my samba share config.

workgroup: workgroup
username: hassio
password: hassio
interface: ''
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 'fe80::/10'
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes

Questions/issues:

  1. The allow hosts lines are sorta confusing I’ve left them as is and changed them but ultimately I just want hosts from my subnet which is 192.168.25.1-254. How do I do that? Yes I’ve tried just adding 192.168.25.0 and it does not work.

  2. Why are all my samba requests denied? I am trying this on both a mac 10.12 and windows 10 with the same results, requests for samba share access denied.

Here is my part of my log:

Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50110 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50111 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50112 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50114 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50115 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50116 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50121 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50125 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50126 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50128 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50129 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50130 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50144 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50145 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50146 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50147 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50148 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50149 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.16 (192.168.25.16)
Connection denied from ipv4:192.168.25.16:62279 to ipv4:192.168.25.61:445
Denied connection from 192.168.25.16 (192.168.25.16)
Connection denied from ipv4:192.168.25.16:62278 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.16 (192.168.25.16)
Connection denied from ipv4:192.168.25.16:62277 to ipv4:192.168.25.61:445
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
run_elections: >>> Won election for workgroup REALM on subnet 192.168.25.61 <<<
become_local_master_browser: Awaiting potential browser state. Current state is 4
Could not find child 321 -- ignoring 

Posts: 2

Participants: 2

Read full topic

Nanoleaf Aurora panels missing scene controls

$
0
0

@bazyr wrote:

Hi all!

I’m trying to get my two Nanoleaf Auroras (the triangle-shaped original ones) to play nice with HA.

I’m very new to HA, but the discovery component picked the panels up immediately and I was able to add them both very easily, using just the pairing codes they came with.

When I look at the entities created, though, the only available setting is on/off and a brightness slider. When they’re on, a colour wheel appears. I can’t find any way to select an effect – the panels have named lighting effects.

The old “nanoleaf aurora” component looks like it had the ability to do this, as in this post:

https://community.home-assistant.io/t/nanoleaf-aurora-component/21054/36

How do I go about selecting scenes? Can I use the old component? Why is the functionality no longer there in the new one?

Thanks!
Ben

Posts: 1

Participants: 1

Read full topic

Open, Close or Pause Template Cover with Google Assistant or HA UI (RF and Script)

$
0
0

@Terence_Ng wrote:

Hi, your suggestion/s please:

My set-up includes Xiaomi Remote Control + integrated RF433mhz which do not report open, close or position state.

I have created 3 RF actions (To send RF signal to open, close or pause the blinds in my study room) in script.yaml file as below:

studyroom_blinds_close:
  alias: Studyroom Blinds Close
  sequence:
  - data:
      command:
      - raw:XXXX
    entity_id: remote.livingroom_ir_controller
    service: remote.send_command
studyroom_blinds_open:
  alias: Studyroom Blinds Open
  sequence:
  - data:
      command:
      - raw:XXXX
    entity_id: remote.livingroom_ir_controller
    service: remote.send_command
studyroom_blinds_pause:
  alias: Studyroom Blinds Pause
  sequence:
  - data:
      command:
      - raw:XXX
    entity_id: remote.livingroom_ir_controller
    service: remote.send_command

Yes, I do not need the ‘state’ status to be remembered and basically just one way sending the RF command to the device; I want the device can be called open or close or paused and it will execute.

I created template as below so that i can control it with the UI in HA or Google assistant to control.

cover:
  - platform: template
    covers:
      stuyroom_blinds:
        friendly_name: "Studyroom Blinds"
# I am not sure what should be defined in the value_template to remain the status out of open, close or pause
        value_template: "{{ true }}" 
        open_cover:
          service: script.studyroom_blinds_close
        close_cover:
          service: script.studyroom_blinds_open
        stop_cover:
          service: script.studyroom_blinds_pause

I mainly use Google Assistant or the UI and with the current setting above, the state will stay “true” and i am not able to contro. Is there a way I can activate all 3 buttons in the UI for cover template? Appreciate any suggestion or guidance.
template conver

Thanks,
Terence

Posts: 2

Participants: 2

Read full topic

Display Node-Red values in HA frontend

$
0
0

@Fredrik_Jacobsson wrote:

Hi,
I would like to display a Node-Red value in HA frontend.
But I can’t get it to work, I have done following.
Node-Red:
image

HA
configuration.yaml:

 - platform: template
    sensors:
      # sensor for smooth cloudiness
      smooth_cloudiness:
        friendly_name: "Smooth Cloudiness"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('sensor.smooth_cloudiness', 'cloudiness') }}"

Get no value

What are I doing wrong?

Posts: 1

Participants: 1

Read full topic

Viewing all 107720 articles
Browse latest View live


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