I am just starting my journey with Home Assistant and have some ideas that might or might not be feasible. Any Input is much appreciated!
What is my Plan?
Well, we have ordered a Heat Pump for our house (Vaillant Arotherm Plus 55 with SensoComfort 720 Controller) and also a Solar array (7.7KWp with a Huawei Sun2000 Inverter and Huawei Power Sensor).
These components should arrive within the next 6 Months or so. Supply Shortages and so on…we all know the story…
What we already have is an older Ventilation System (Vaillaint Recovair Var/3 275) that doesn’t have any kind of automatic adjustment and a small test-bed solar Setup with a 600W Growatt MIC 600 Inverter.
Our current (and future) heating is controlled by Homematic IP room thermostats that regulate a floor heating system).
I also have a Powerfox energy metering thingy that allows me to read and document my current energy Input/Output.
My aim is to use Home Assistant to knit the various systems together in a way that makes them as efficient as possible. Theoretically the new Heat Pump Controller could mesh with the Solar system, but AFAIK that only works with Inverters that support EEBUS which Huawei doesn’t.
I installed HomeAssistant on a RPI 4 with 8GB of Ram this afternoon and have added some Devices and Sensors. As a little Test I have made the following Automation:
When the Powerfox dongle measures excess energy then it turns one of my Hue Lamps in the kitchen on and makes it show a steady blue light. As soon as the energy consumption rises above what the 600W mini solar array can provide the light turns off.
This is’t very useful but allows me to learn a little about HA and how to set things up.
For now the only thing I can work on (since Solar+Heat Pump are still a few months out) is the Ventilation system.
My idea would be to make it react to one or more Sensors and turn airflow up and down accordingly. I know that it has an analogue Input that you can connect a “dimmer switch” to and regulate the airflow smoothly by applying a 0-10V signal. Initially I could use the “Humidity” reading from my HomematicIP Thermostats as triggers for this Automation.
That is as far as my knowledge goes though…and this is where I would like to ask for help:
How could I manage the 0-10V Input Signal to control the airflow? Any ideas?
Thanks!
Additionally…and ideas on how to best link a Vaillant SensoComfort 720 and a Huawei Inverter…would be very much appreciated!
I am building a RPi doorbell and, apart from the SIP integration (another thread), I would like to be able to capture a video image when someone rings. After a specific amount of time, or when the SIP call ends, I would like to terminate the video feed.
Please note that I am not able to send video via the SIP, so I have setup a picamera2 python script that gets invoked when I detect the GPIO event.
Using the MJPEG Camera integration, I can get image just fine. The problem is what happens when the stream is terminated.
The image gets stuck in the last frame that was streamed
It doesn’t seem that there’s a if then else mechanism, so that the stream is not available it would use the static image
In these situations, if the stream is resumed, I have to force a refresh in the browser, or the companion app.
3.1. Actually, in the companion app, it seems that after 60 seconds it resumes the new stream, but I need to first change into a new section and then come back.
Is it possible to modify the timeout of a retry? Is it possible to switch to the static image if the stream is no longer available?
I’ve tried configuring the camera in “auto” vs “live”, but in auto in never shows the feed, unless I click on the image, which opens a popup with the stream (not necessarily a bad solution or workaround). And in the live mode, it gets stuck, as mentioned above.
I need to create an automation which notifies me when a sensor has not been updated in X amount of minutes but not sure how to formulate the automation, i.e. what trigger to use
I assume it is the state trigger but how to set it up?
After pairing an RWL021 Hue switch and an LCT015 Hue light to HA, I bound them together using TouchLink, which is when you press the On button on the switch while holding it next to the bulb.
Now the switch is able to control the light directly, independently of the coordinator (a ConBee II) or HA. I’m able to toggle and dim the lights, and also cycle through default scenes for the light.
Now just to be clear, those aren’t HA scenes. I’ve paired the devices through ZHA, but I don’t think this is relevant because these scenes exist independently of the coordinator and HA, they are stored on-device.
This can be confirmed with ZigBee cluster attributes on the light device:
cluster ID 5 (scenes)
attribute ID:
0 (count: 5, although there are 4 scenes)
1 (current_scene: 0 to 3 depending which scene is selected)
2 (current_group: 4654)
The scenes 0 to 3 seem to correspond, in that order, to the Relax, Read, Concentrate & Energize scenes as seen in the Hue app when using that to pair the lights.
I was hoping to perform CRUD operations on these scenes, but I don’t have the spec…
I’ve been playing a bit, but I got as far as running a command to get details for the scene, i.e.
service: zha.issue_zigbee_cluster_command
data:
ieee: <ieee>
endpoint_id: 11
cluster_id: 5
cluster_type: in
command: 1
command_type: server
args:
- 4654
- 0
This command with ID 1 is called view.
What I get in the logs from that command is this:
2022-07-31 00:18:18 WARNING (MainThread) [zigpy.zcl] [0x6C53:11:0x0005] Data remains after deserializing ZCL frame: b'\x06\x00\x01\x01\x08\x00\x01\x90\x00\x03\x04k\x80Fj'
That’s good because I expect data to come back from it, but I don’t know what this data means, or what I could change it to use the various other commands in the cluster (I’ve got add, remove, store…). It’s binary data (the characters k, F and j are there just because that binary data accidentally matched with readable ASCII codes).
So I 've got these hex values for the scene ids 0 to 3:
The 8th byte with values 90 (144d) and fe (254d) is almost certainly the brightness. I suspect the last 4 to be RGB plus something? In any case, it doesn’t tell me what the input parameters could be to modify or add scenes…
Hey there. I have a Mitsi ducted heat pump system controlled by HA. The main outlet and wall controller are mounted in the rumpus room where my son does his gaming. There are two other vents in each of the bedrooms. When installed, I got the heat pump guys to put two dampers in to control the air to each bedroom and I can control these using Shelly PM1’s in cover mode.
To protect the system as this is a DIY zone controller, the fan speed for the ducted system must be reduced if any dampers are closed to control the pressure. The code below is an attempt to address that.
Essentially, when my son turns on the ducted system in the rumpus, the dampers in the bedrooms close if the bedroom temperature is above 17°C (63F). This is done using two generic thermostats and a Xiaomi zigbee thermometer in each bedroom. This prevents the bedrooms from overheating when he’s gaming late at night.
What I’m trying to ensure below is that if he turns it on and sets the fan speed to anything other than low, it checks and resets it back to low without him knowing. The secondary protection is for if the dampers are actually open when turns on the rumpus heat (bedrooms are below 17°C (63F), then there is a mechanism to again adjust the speed back to low if and when any of the dampers do close once the bedroom temperature reaches 17.5°C (64F).
I’ve tried to cram everything in to one automation but maybe I need to split it up? Any advice would be appreciated.
- alias: 'Force fan speed to low if adjusted while dampers closed'
id: dd31e88a-6cc0-45de-90cf-72fd246125a1
trigger:
- platform: state
entity_id: climate.rumpus
attribute: fan_mode
not_to: "low"
- platform: state
entity_id: cover.damper_control_master
to:
- "closed"
- "closing"
- platform: state
entity_id: cover.damper_control_david
to:
- "closed"
- "closing"
condition:
or:
- condition: state
entity_id: climate.rumpus
attribute: fan_mode
state:
- "medium"
- "high"
- "auto"
- condition: state
entity_id: cover.damper_control_master
state:
- "closed"
- "closing"
- condition: state
entity_id: cover.damper_control_david
state:
- "closed"
- "closing"
action:
- delay:
seconds: 15
- service: climate.set_fan_mode
target:
entity_id: climate.rumpus
data:
fan_mode: 'low'
I am building out energy monitoring in HA: I’ve ended up with a few template sensors summing categories of individual devices, which I then include as grid consumption in the energy dashboard.
I have a new smart plug which has the annoying feature of having all its energy sensors reset on various cadences. If I add any of these plug’s sensors to my category sensor, I now have negative contributions at the reset (say midnight every day. Is there a good way to compensate for this?
Both the plug’s sensor and my template have state_class of total_increasing, but this doesn’t seem to help.
I’ve been trying to set up an automation based on both me and my partners phones not being home where it will send us a notification if we are both “away” to arm the alarm if it is currently in disarmed state, I’ve set up an automation but it doesn’t seem to trigger when we both have left and I just can’t work out why…
alias: Notify to arm when nobody home
description: ''
trigger:
- platform: device
device_id: 0793e13e8ba65fbce762960e48b561b4
domain: device_tracker
entity_id: device_tracker.sophies_iphone
type: leaves
zone: zone.home
- platform: device
device_id: ddfe6dba49fd39f7b41b0c04abe604ec
domain: device_tracker
entity_id: device_tracker.iphone
type: leaves
zone: zone.home
condition:
- condition: not
conditions:
- condition: device
device_id: 96d6e167acf8351208fdaf6e82615dae
domain: device_tracker
entity_id: device_tracker.sophies_iphone_2
type: is_not_home
- condition: not
conditions:
- condition: device
device_id: ddfe6dba49fd39f7b41b0c04abe604ec
domain: device_tracker
entity_id: device_tracker.iphone
type: is_not_home
- condition: time
after: '06:00:00'
before: '21:00:00'
- condition: state
entity_id: alarm_control_panel.alarmo
attribute: arm_mode
state: disarmed
action:
- service: notify.alarm_notify_group
data:
message: 'Everybody left home, arm the alarm ? '
title: Nobody is Home
mode: single
Hi
I have a button to open gate. Button calls script which open gate and send command to dahua vto.
Everything works perfect for admin user. Regular users see failed to call service script/furtka-cancel-ring-send-voice unauthorized.
Here is my script
alias: furtka-cancel-ring-send-voice
sequence:
- service: dahua_vto.open_door
data:
entity_id: sensor.furtka
channel: 1
short_number: HA
- service: dahua_vto.send_command
data:
entity_id: sensor.furtka
method: console.runCmd
params:
command: hc
event: false
mode: single
error log
Logger: homeassistant.components.websocket_api.http.connection
Source: helpers/service.py:746
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:18:41 PM (1 occurrences)
Last logged: 12:18:41 PM
[140240864539888] Unauthorized
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 290, in service_handler
await script_entity.async_turn_on(
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 398, in async_turn_on
await coro
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 428, in _async_run
return await self.script.async_run(script_vars, context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 746, in admin_handler
raise Unauthorized(context=call.context)
homeassistant.exceptions.Unauthorized: Unauthorized
I have difficulties in getting the below automation to output a value to ‘input_datetime.drip1_next_run_time’. The template gives the right values when testing in Jinja2.
It is supposed to output the next time for the drip irrigation based on the time of the day. If the sun is above horizon and the drip irrigation is enabled it just add the interval time and if the sun is below horizon and the drip irrigation is enabled the next drip time will be at sun rise next day as it is not supposed to run in the night.
I haven’t been able to figure it out by searching the forum.
- alias: Set drip1 next scheduled run time
trigger:
- platform: state
entity_id: input_boolean.drip1_valve
to: "off"
for: "00:00:05"
action:
- service: input_datetime.set_datetime
entity_id:
- input_datetime.drip1_next_run_time
- service: >
{% if is_state('input_boolean.drip1_enable' , 'on') and is_state('sun.sun' , 'above_horizon') %}
{{(state_attr('input_datetime.last_drip1_time', 'timestamp') + (states('input_select.drip1_interval_time') | int * 3600)) | timestamp_custom('%d-%m-%Y at %H:%M') }}
{% elif is_state('input_boolean.drip1_enable', 'on') and is_state('sun.sun', 'below_horizon') %}
{{ (as_timestamp(states.sun.sun.attributes.next_rising)) |float| timestamp_custom('%d-%m-%Y at %H:%M')}}
{% else %}
None
{% endif %}
i have an automation for my stair lighting based on my motion detectors.
However, I have a problem with this, namely the light on stairs 1 / 2 does not go out again if, for example, only BM1 is activated and BM2 is not.
it stops every time at the timeout of 1 minute, so I would have to set a condition beforehand and see if BM1 / BM2 have no more movement and then switch off the stairs again.
I tried to write the shutdown at the end of the automation but that never works because the timeout above then stops directly.
Intro
Recently I’ve been in the market for a new doorbell, and I think I’ve finally found one I can live with. As we know, the smart doorbell tech is less than perfect when it comes to integrating with Home Assistant and I’ve tried several over the last year without much success.
Nest Hello – No RTSP feed therefore no frigate with hacky solutions
EZViZ DB* - Tricky to capture button press and fisheye video
Amcrest AD110 – Poor quality video (glare), Poor night-vision, couldn’t get casting to my Google Hub working without delay
Amcrest AD410 – No idea but expensive and hard to source in the UK
Wishlist
The following are the features I was after
RTSP / Frigate
Ability to capture button presses
Cast to my Google Hub / Alexa Show
Foscam Video Doorbell 2K VD1 / DBW5
The Foscam met all of my requirements and then some. Below is the feature list
2k Video
RTSP H264/5
MJPEG
2.4Ghz / 5Ghz / Ethernet
Google Assistant / Alexa Compatible
API
What we will get working
I’ll show you how we can capture button presses using node-red and then trigger an automation to
announce on your smart speakers that someone is at the door and cast a live video to your devices. I’ll also show you how to get the RTSP stream into Home Assistant
Prerequisites
First of all you will have to download the foscam app and setup your device. Make sure to remember your device username / password as we will use that later to setup the stream.
Perform any pending firmware updates, the latest version 1.17.2.9_2.134.2.31 is required to get the correct API working correctly. Interestingly I had to do 2 upgrades to get on the latest version.
Download and install the desktop software VMS. I used this to set the url to call when the doorbell is pressed. Note: You can also set this up using CGI commands but using the VMS software is easier and allows you to play with some of the advanced settings. https://www.foscam.com/downloads/app_software.html
Install the Home Assistant node-red addon.
Configuring the cameras in Home Assistant
There are 2 urls we can use to video the video feed
This is the high res video. Note, by default this is set to H265. If you want this to be H264 you have to turn this option on in the mobile app
rtsp://username:password@cameraip:88/videoSub
This is the sub stream, now to get the video to cast to my google hub I had to set the format to MJPEG, to do this you paste the link below into your web browser, changing the username/pass etc
You can now add this cameras to home assistant using the generic camera / MJPEG camera integrations
Capturing button presses
OK so this isn’t as easy as I would like because we have to work around a limitation in home assistant. Foscam allows us to call a webhook when the doorbell is pressed but only sends a GET request rather than a POST request that Home Assistant expects. The workaround is to use Node-Red to capture this webhook and then call an automation. You could also have Node-Red toggle a switch or whatever you prefer.
First of all fire up the VMS app, connect to your doorbell and then navigate to the following in the setup page
Here I have added a url that points to my node-red server, and I’ve added an endpoint called ‘doorbell-alarm’. Note, I had to disable SSL in Node-Red for this work - you might not need to.
Next, import the following flow into Node-Red
There is an automation trigger in this flow, edit it to point towards whatever automation you want to run when the doorbell button is pressed.
Automation
The final step is to create an automation. Here is mine that announced on my google devices that someone is at the door when the bell is pressed and then stream the video to my google hub.
Team,
I’ve succesfully connected Home Assitant with my Tado via the HomeKit component. The issue I have is that the “open window” binary switch is not visible. Is there anything I can do?
I need it to control other actions.
The “open window” switch is visible via the tado cloud connection (but it has other issues, this is why I’m using the HomeKit integration)
I have a simple switch (outlet) I would like to turn on at a certain time and off at another time. Since I want to be sure, that the switch turns on/off when it should, I’d like to repeat that, until it says it’s on.
What happens is: The switch turns on at 10:00 … but when I manually turn it off (it’s a ZigBee-Switch integrated view the Zigbee2MQTT Add-On), I expected it to stay off… but the automation kept turning it on every 15 seconds. I expected it to stop repeating, once the switch turned on.
Did I do something wrong here? I checked the state of the switch and it’s updating correctly.
I am using the deprecated Ngrok integration cause I have access to a paid account there.
After an update of the client today I could not connect anymore and had to add an “Auth” tag in the config to get it to work. I have tried everything and then some but can’t get it to work, have anyone got this working lately?
Hi, I have a RPi and for power supply reasons, I want to add an external USB port that can deliver more power.
(How) can I move the z-stick to that USB hub and get zwaveJS to work again?
I am researching/preparing to migrate from Deconz/Phoscon to ZHA (as ZHA is integrated in Home-assistant and seems more future proof)
I am running Home Assistant OS (core-2022.7.7) with ConBee-2 stick on: generic-x86-64
Is there a preferred migration path to ZHA from Deconz/Phoscon without re-installing Home Assistant?
Can I, for instance, disable the intergration and the Addon, reboot, remove addon and integration and add ZHA ?
I know i probably have to repair the devices i have running that is no problem.