While messing around with my entities, I think I’ve deleted one of my Hue light that was auto discovered. Is there a simple way to get it back? I’m afraid of doing something that will duplicate all my other Hue lights and will have to clean that new mess.
Hopefully someone can help with this, as I’ve been driving myself mad for a few days now trying to get it to work.
Recently upgraded from an older version of hassio (around 0.9x) to version 0.103.4 and all my scenes that worked perfectly stopped working. Did some research with Google and realised things had changed in the update, and I needed to migrate them to scripts.
I have done this, but they just don’t work as expected, and by that I mean my puny brain can’t get them to work.
This is how I have one of the scripts setup. In the old scene setup, I changed colors using RGB values, but I tried color_name for this particular example as RGB didn’t seem to work either. They are Tuya lightbulbs (GU10 spotlights) that are setup as groups if that makes any difference.
In this example, I setup 3 different groups of lights in the kitchen as in some scenes I change the color / brightness of individual areas so they each need their own properties.
Problems :
If the light is turned off, the light does come on, but there is a long delay. If I have 3 groups to turn on in the script, then they are turned on one after the other, but there is a 3-6 second delay between each group making it seem clumsy and slow
The other problem is, the light color is not altered by the script. As an example, if I manually changed the light colour to red, the above script would not change the colour from red to white as expected
I’ve tried creating the scripts in the GUI, as well as in scripts.yaml, as well as different ways of formatting from here, Google and Reddit and I just can’t seem to make progress
Please can someone tell me what I’m doing wrong? This seems way more difficult than before, I setup all of my old scenes in about 20 mins and they all worked reliably until now.
Thanks for taking the time to read, any help or criticism would be welcome and appreciated.
If I restart HA I always end up with all my tasmota devices showing as entity not available.
To get these back, I have to publish a SetOption19 1 command to all devices and then they appear correctly in HA again. is there something I should be doing so that they dont become not availabel in the first place?
I have used the integrated OpenTherm gateway integration in 0.103.5 however the data taken from the OpenTherm GW seems unstable at best. The values appear in the display, but shift to unavailable / unknown. Then after about 20-30 seconds can appear again.
When looking at the data in the history view, it looks like little dot’s (single measurements) and it’s a dotted line.
I am using the NodeMCU / Serial integration over HTTP, directly integrating with HA.
The configuration is just a socket://192.168.88.123:6638 and the device is discovered. I had some isssues connecting to the device, but after a few attempts it connected.
I had set it up before, on Hass.IO and an older version of HA (from 3 months ago), there it worked fine and was very stable. Never saw any unknown data on the dashboard.
So any suggestions what is causing this intermittend behaviour?
I’m working on an automation that will change the brightness and temperature of lights during the day. I looked at other pre-built options (e.g., Flux and Circadian), but I wanted to see if I could build my own. When the Deconz daylight changes (slightly modified by the time), I want lights to change temp and brightness, but only if they’re already on. There are a few conditions, but the most relevant one for this automation is that a light must be on. I control my lights using Hue groups to smooth out lights coming on together, so I want to filter out the individual bulbs.
The problem is in the data template for entity ID in the action section. I have two selectattr() filters that should filter lights that are both on and Hue groups. When I include only one of these, it passes. But when I have both, it fails. I’ve been banging my head against the wall on this for 24 hours. After digging through posts from @petro and @pnbruckner, and reading the Jinja documentation on filters, I don’t see a reason why this fails.
What’s annoying is that when I test the template in dev tools, it produces the correct list of entity ids.
Here’s the code that’s causing an error:
- alias: 'Lights - Adjust if On'
description: 'If lights are on, adjust the brightness based on time'
hide_entity: true
trigger:
- platform: event
event_type: state_changed
entity_id: sensor.daylight
condition:
condition: and
conditions:
- condition: state
entity_id: 'group.people'
state: 'on'
- condition: state
entity_id: 'input_boolean.good_night'
state: 'off'
- condition: template
value_template: "{{is_state('group.all_lights','on')}}"
action:
- service: light.turn_on
data_template:
entity_id: >
{{ states.light
| selectattr('attributes.is_hue_group')
| selectattr('state','eq','on')
| map(attribute='entity_id')
| join(',')
}}
brightness: >
{% set time=(states('sensor.time').split(':')[0] |int * 60) + (states('sensor.time').split(':')[1] |int) %}
{%- if is_state('sensor.daylight', 'night_end') -%}
30
{%- elif is_state('sensor.daylight', 'nautical_dawn') -%}
30
{%- elif is_state('sensor.daylight', 'dawn') -%}
143
{%- elif is_state('sensor.daylight', 'sunrise_start') -%}
254
{%- elif is_state('sensor.daylight', 'sunrise_end') -%}
254
{%- elif is_state('sensor.daylight', 'golden_hour_1') -%}
254
{%- elif is_state('sensor.daylight', 'solar_noon') -%}
254
{%- elif is_state('sensor.daylight', 'golden_hour_2') -%}
254
{%- elif is_state('sensor.daylight', 'sunset_start') -%}
254
{%- elif is_state('sensor.daylight', 'sunset_end') -%}
254
{%- elif is_state('sensor.daylight', 'dusk') -%}
254
{%- elif is_state('sensor.daylight', 'nautical_dusk') -%}
254
{%- elif is_state('sensor.daylight', 'night_start') and time >= 0 and time < 480 -%}
143
{%- elif is_state('sensor.daylight', 'night_start') and time >= 480 and time < 600 -%}
254
{%- elif is_state('sensor.daylight', 'night_start') and time >= 600 and time < 1110 -%}
254
{%- elif is_state('sensor.daylight', 'night_start') and time >= 1110 and time < 1350 -%}
254
{%- elif is_state('sensor.daylight', 'night_start') and time >= 1350 and time < 1440 -%}
143
{%- elif is_state('sensor.daylight', 'night_start') -%}
254
{%- elif is_state('sensor.daylight', 'nadir') -%}
143
{%- else -%}
254
{%- endif -%}
color_temp: >
{% set time=(states('sensor.time').split(':')[0] |int * 60) + (states('sensor.time').split(':')[1] |int) %}
{%- if is_state('sensor.daylight', 'night_end') -%}
500
{%- elif is_state('sensor.daylight', 'nautical_dawn') -%}
500
{%- elif is_state('sensor.daylight', 'dawn') -%}
466
{%- elif is_state('sensor.daylight', 'sunrise_start') -%}
154
{%- elif is_state('sensor.daylight', 'sunrise_end') -%}
154
{%- elif is_state('sensor.daylight', 'golden_hour_1') -%}
154
{%- elif is_state('sensor.daylight', 'solar_noon') -%}
181
{%- elif is_state('sensor.daylight', 'golden_hour_2') -%}
181
{%- elif is_state('sensor.daylight', 'sunset_start') -%}
370
{%- elif is_state('sensor.daylight', 'sunset_end') -%}
370
{%- elif is_state('sensor.daylight', 'dusk') -%}
370
{%- elif is_state('sensor.daylight', 'nautical_dusk') -%}
370
{%- elif is_state('sensor.daylight', 'night_start') and time >= 0 and time < 480 -%}
500
{%- elif is_state('sensor.daylight', 'night_start') and time >= 480 and time < 600 -%}
154
{%- elif is_state('sensor.daylight', 'night_start') and time >= 600 and time < 1110 -%}
181
{%- elif is_state('sensor.daylight', 'night_start') and time >= 1110 and time < 1350 -%}
370
{%- elif is_state('sensor.daylight', 'night_start') and time >= 1350 and time < 1440 -%}
466
{%- elif is_state('sensor.daylight', 'nadir') -%}
466
{%- else -%}
370
{%- endif -%}
Here’s the error: Invalid config for [automation]: [entity_id] is an invalid option for [automation]. Check: automation->trigger->0->entity_id.
I have been searching the forums without much luck and I was wondering if someone can help point me in the right direction. I am trying to use a contact sensor to report to HA that our animals have been fed. I was hoping to have an automation that changed a picture of our pets from b&w to color or even just change text to notify they have been fed. I guess that really wouldn’t even work to well as they are fed twice a day so maybe have a card that displays the times the sensors have opened. I have the sensors already set up and the images accessable is HA. I’m guessing I need an automation to tell me when the sensor was opened and then have it reset nightly.
Im New in Home Assistant. Running on raspberry pi 4 hassio. I love it! Great work!
My question is: how can i integrate tcp/ip connection to connect to tcp server and send commands and recieve responses? Is there aby guide or examples? Just some clues…?
Let’s say I have some device with LAN API and I would like to control it with home assistant.
Hey guys, i’ve got this automation for my AC and for some reason it does not work. So far i can’t seem to find a way of making it work. Can one of you please take a look for me.
Hi i just rebuild all my home assistant and I added a lot of security ! in my router i specified witch ip adresse is allowed to use the port foward, I setup some vpn etc etc…
My issued is when I tried to activate google Assistant. I need to white list google if i don’t want to open my home assitant to everyone but i don’t know what to whitelist
Hello, I’m using HA 100.3 on hassbian with python 3.7 and I have mosquitto 1.5.7 on the same device. Today it stops working and I don’t know how to solve.
Looking at the mosquitto status I see:
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-12-30 17:46:30 UTC; 19min ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Main PID: 509 (mosquitto)
Tasks: 1 (limit: 2200)
Memory: 1.5M
CGroup: /system.slice/mosquitto.service
└─509 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Dec 30 17:46:30 hassbian systemd[1]: Starting Mosquitto MQTT v3.1/v3.1.1 Broker...
Dec 30 17:46:30 hassbian systemd[1]: Started Mosquitto MQTT v3.1/v3.1.1 Broker.
Looking at the mosquitto.log file, I see sometimes any repeated errors like these:
1523902373: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1523904174: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1523905390: Client home-assistant disconnected.
1523905390: Error in poll: Interrupted system call.
1523905390: mosquitto version 1.4.10 terminating
1523905399: mosquitto version 1.4.10 (build date Mon, 29 May 2017 13:43:29 +0100) starting
1523905399: Config loaded from /etc/mosquitto/mosquitto.conf.
1523905399: Opening ipv4 listen socket on port 1883.
1523905399: Opening ipv6 listen socket on port 1883.
1523905399: Opening ipv4 listen socket on port 8883.
1523905399: Opening ipv6 listen socket on port 8883.
1523905399: Connecting bridge cloudmqtt (m23.cloudmqtt.com:27618)
1523905399: Error creating bridge: Temporary failure in name resolution.
1523905399: Warning: Unable to connect to bridge cloudmqtt.
I have also this error, that’s more interesting imho:
1523986453: Client home-assistant-1 has exceeded timeout, disconnecting.
1523986453: Socket error on client home-assistant-1, disconnecting.
1523986455: Client home-assistant-2 has exceeded timeout, disconnecting.
1523986455: Socket error on client home-assistant-2, disconnecting.
1523986466: Client home-assistant-3 has exceeded timeout, disconnecting.
1523986466: Socket error on client home-assistant-3, disconnecting.
1523986518: New connection from 192.168.(localip1) on port 1883.
1523986518: New client connected from 192.168.(localip1) as home-assistant-1 (c1, k15, u'homeassistant').
1523986525: New connection from 192.168.(localip2) on port 1883.
1523986525: New client connected from 192.168.(localip2) as home-assistant-3 (c1, k15, u'homeassistant').
1523986528: New connection from 192.168.(localip3) on port 1883.
1523986528: New client connected from 192.168.(localip3) as home-assistant-2 (c1, k15, u'homeassistant').
1523986737: Socket error on client eporedieis, disconnecting.
1523986768: Connecting bridge cloudmqtt (m23.cloudmqtt.com:27618)
And at the end of the file I found:
1524415304: Client home-assistant disconnected.
1524415305: Error in poll: Interrupted system call.
1524415305: mosquitto version 1.4.10 terminating
In the configuration.yaml I have mqtt configuration:
All MQTT devices have Tasmota firmware, in the console, that are saying:
19:26:42 MQT: Attempting connection...
19:26:43 DNS: Query done. MQTT services found 0
19:26:43 MQT: Connect failed to :1883, rc -2. Retry in 10 sec
My opinion: I think Mosquitto is working correctly and the problem is the connection from it and the mqtt devices. The stranger thing is that I’ve not updated nothing and so I don’t know where I have to look for the solution. Could anyone help me please? Thank you very much!
Since a couple of days my yeelight is not working anymore.
on the frontend it says “entity not available: light.living_room”
I am able to control the yeelight from the yeelight app and lan control is on.
this is in my ui-lovelaceui.yaml
- type: light
entity: light.living_room
name: Woonkamer
Devices: 192.168.2.3
also when i look into the entities the lamp is not showing up, what is going wrong?
Running hassio on ubuntu, mysensors gateway with nodemcu mqtt gateway and having mysensor nodes. hassio version 0.103.3.
I had used this earlier (maybe 2-3 monts ago) and it worked fine. We had some renovation and the nodes were out of use for a long time.
The problem is that mysensor node sends all the info through gateway to HA but HA does not create the entities. I updated the mysensor libraries to 2.3.2 (currently latest) before starting. Maybe it was bad idea. But for now I have no idea what to do next. Deleting the persistence (pickle) file didnt help either. Tried restarting the homeassistant multiple times but didn’t help either.
I checked from the mosquitto broker that the messages are coming in. I could use just mqtt sensors in HA but that is not the idea with mysensors.
Added logging to home assistant and to me it seems fine again. I filtered the below to show only debug entries.
This is my arduino code. It works by sending integer 1-3 to HA so I know if the button was one, double or long press. I checked that this type should be supported (and it was working earlier).
#include "OneButton.h"
// Enable debug prints to serial monitor
//#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_RF24
// Define fixed numbers for the
// controller - MY_NODE_ID
// sensors - CHILD_ID_xxx
#define MY_NODE_ID 3
#define CHILD_ID_JUHA_BUTTON1 20
#define CHILD_ID_JUHA_BUTTON2 21
#define CHILD_ID_TIINA_BUTTON1 22
#define CHILD_ID_TIINA_BUTTON2 23
#include <MyConfig.h>
#include <MySensors.h>
MyMessage MSjuhaButton1(CHILD_ID_JUHA_BUTTON1, V_LEVEL);
MyMessage MSjuhaButton2(CHILD_ID_JUHA_BUTTON2, V_LEVEL);
MyMessage MStiinaButton1(CHILD_ID_TIINA_BUTTON1, V_LEVEL);
MyMessage MStiinaButton2(CHILD_ID_TIINA_BUTTON2, V_LEVEL);
// Button locations
bool buttonDefault = LOW;
const int juhaButton1Pin = 5;
const int juhaButton2Pin = 6;
const int tiinaButton1Pin = 7;
const int tiinaButton2Pin = 8;
//classes for buttons
OneButton juhaButton1(juhaButton1Pin, buttonDefault);
OneButton juhaButton2(juhaButton2Pin, buttonDefault);
OneButton tiinaButton1(tiinaButton1Pin, buttonDefault);
OneButton tiinaButton2(tiinaButton2Pin, buttonDefault);
// Heartbeat times
unsigned long heartbeat_timer = 0;
void presentation()
{
// Register all sensors to gateway (they will be created as child devices)
present(CHILD_ID_JUHA_BUTTON1, S_VIBRATION, "Juha button 1", false);
wait(200);
present(CHILD_ID_JUHA_BUTTON2, S_VIBRATION, "Juha button 2", false);
wait(200);
present(CHILD_ID_TIINA_BUTTON1, S_VIBRATION, "Tiina button 1", false);
wait(200);
present(CHILD_ID_TIINA_BUTTON2, S_VIBRATION, "Tiina button 2", false);
wait(200);
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Bedcontrol", "0.1", false);
}
void setup()
{
// Attach button click functions
juhaButton1.attachClick(juhaClick1);
juhaButton1.attachDoubleClick(juhaDoubleclick1);
juhaButton1.attachLongPressStart(juhaLongPressStart1);
tiinaButton1.attachClick(tiinaClick1);
tiinaButton1.attachDoubleClick(tiinaDoubleclick1);
tiinaButton1.attachLongPressStart(tiinaLongPressStart1);
juhaButton2.attachClick(juhaClick2);
juhaButton2.attachDoubleClick(juhaDoubleclick2);
juhaButton2.attachLongPressStart(juhaLongPressStart2);
tiinaButton2.attachClick(tiinaClick2);
tiinaButton2.attachDoubleClick(tiinaDoubleclick2);
tiinaButton2.attachLongPressStart(tiinaLongPressStart2);
}
void loop()
{
juhaButton1.tick();
tiinaButton1.tick();
juhaButton2.tick();
tiinaButton2.tick();
if( heartbeat_timer + 60000 < millis() )
{
heartbeat_timer = millis();
sendHeartbeat();
}
}
// Functions for acting to button press
void juhaClick1()
{
send(MSjuhaButton1.set(1));
wait(400);
send(MSjuhaButton1.set(0));
}
void juhaClick2()
{
send(MSjuhaButton2.set(1));
wait(400);
send(MSjuhaButton2.set(0));
}
void juhaDoubleclick1()
{
send(MSjuhaButton1.set(2));
wait(400);
send(MSjuhaButton1.set(0));
}
void juhaDoubleclick2()
{
send(MSjuhaButton2.set(2));
wait(400);
send(MSjuhaButton2.set(0));
}
void juhaLongPressStart1()
{
send(MSjuhaButton1.set(3));
wait(400);
send(MSjuhaButton1.set(0));
}
void juhaLongPressStart2()
{
send(MSjuhaButton2.set(3));
wait(400);
send(MSjuhaButton2.set(0));
}
void tiinaClick1()
{
send(MStiinaButton1.set(1));
wait(400);
send(MStiinaButton1.set(0));
}
void tiinaClick2()
{
send(MStiinaButton2.set(1));
wait(400);
send(MStiinaButton2.set(0));
}
void tiinaDoubleclick1()
{
send(MStiinaButton1.set(2));
wait(400);
send(MStiinaButton1.set(0));
}
void tiinaDoubleclick2()
{
send(MStiinaButton2.set(2));
wait(400);
send(MStiinaButton2.set(0));
}
void tiinaLongPressStart1()
{
send(MStiinaButton1.set(3));
wait(400);
send(MStiinaButton1.set(0));
}
void tiinaLongPressStart2()
{
send(MStiinaButton2.set(3));
wait(400);
send(MStiinaButton2.set(0));
}
// Message received functions from the central node
void receive(const MyMessage &message)
{
if (message.type == V_LIGHT)
{
if (message.sensor == CHILD_ID_JUHA_BUTTON1)
{
if (message.getBool()== 1)
{
}
else
{
}
}
}
}
Hi guys,
my name is Sebastian and i am new to this community. I am looking for some help with smarthome-stuff but i am not really experienced with that kind of stuff (noob ;)) Sorry for this wall of text, but my problem is kinda “complicated…”
Here is the situation and what i am trying to do:
We bought a house with A LOT of Smarthome features. So far everything runs pretty okayish. We have two PIs runnig homebridge-servers which are then integrated into IOS and Homekit. We have EnOcean and KNX devices all over the Place (garden, windows, lights …).
Here the reason why i want to mess with the running system (i know… never touch it…)
I want to get into this, so i know what my house is doing
I want to controll the devices with IOS, Android and Windows, cause we got different devices
These homebridges sometimes crash and i need to manually reboot them (not possible on vacation).
Homebridge is not supported any longer (?)
So here is my plan:
I wanna try and set up a brand new PI (PI 4b) with Home Assistant and be able to mess around with it until it works, so i dont have to touch the existing (and working) system on the Homebridge-PIs (Pi 3). This way i have a fallback in case i screw up First step for me is trying to get access to the KNX-Devices.
Here is my setup and what i have done:
Pi4b is running HA and is connected directly to the router. The SSH-Connection is working and i am able to get to the HA-UI. I found the KNX/IP interface which is connected to the same network, too. I changed the HA-config following the official manual here: https://www.home-assistant.io/integrations/knx/. I even tried the tunneling-method.
When i boot up HA it says:
“The following components and platforms could not be set up: knx
Please check your config.”
I have been working on this for the last three days, getting a little frustrated
So any help or hint would be really appreciated, thank you so much in advance!
I’m running Hassio on Rpi3B+ and my Conbee II is on it’s way. I got 2 questions_
1- Should Conbee II placed in a central location where it’s visible to most of my Hue lamps, or is it ok for it to see just 1 active hue lamp to control the rest of the zigbee mesh involving Hue and Aqara sensors.
2- Can i run Conbee II on a 2nd Rpi in a central location in my home? How can i setup 2nd Rpi to work with my main hassio in peace?
2 weeks old HA freshman here, any help will be much appreciated
Cheers
Using customization hidden: true on all my switches of a certain format before, I forgot about that and now added these to a Lovelace view through the auto-entities card.
because of the non formatted icon with which they are displayed I had a look if I hadn’t set any icons or templates. Which reminded me I had set the hidden to true for all of them.
nonetheless, I can see them in all of their glory in Lovelace…
I’m using this software https://github.com/zewelor/bt-mqtt-gateway with a raspberry p0 and some NUT BLE Dongle to open my gate when i arrive with the car and it works very well but i have this problem and i’m tryng to ask here hoping that someone can give me some hints:
Actually i have one raspberry at the gate and the gate opens when the nut is detected from bt-mqtt-gateway. after enter the gate i can park the car near the bt-mqtt-gateway receiver or also in the garage and the problem is here: the garage is too distant from the bt-mqtt-gateway and sometimes the nut disconnects and reconnects causing the gate to open, even with high not home delay…
This happens because the distance beetwen the raspberry receiver and the garage is too much.
So i’m thinking to put a second raspberry in the garage but i don’t know how to manage it in the automation…