wernerhp / ha.appdaemon.aqara_motion_sensors Goto Github PK
View Code? Open in Web Editor NEWAn AppDaemon app to reset Xiaomi Aqara motion sensors after a given timeout.
License: MIT License
An AppDaemon app to reset Xiaomi Aqara motion sensors after a given timeout.
License: MIT License
Greetings,
I have aqara sensor with ZHA integration but appdaemon_aqara_motion_sensors not resat my sensor to 5 second.
I have config in app.yaml with appdaemon 4.
Hi,
your appdaemon script doesn't work with ZHA, only the aqara integration.
But if you change:
for entity_id in motion_sensors:
# self.listen_event(self.motion_sensor_state_on, "xiaomi_aqara.motion", entity_id=entity_id)
self.listen_state(self.motion_sensor_state_on, entity_id, new = "on")
# def motion_sensor_state_on(self, event, data, kwargs):
def motion_sensor_state_on(self, entity, attribute, old, new, kwargs):
"""Set motion sensor state to on"""
entity_id = entity
it should probably work globally.
I can say that this works with ZHA, could you please test it with the aqara integration. If it works, too, you could think about changing those three lines in your code...
Seb
I get error:
Component error: aqara - Integration 'aqara' not found.
I'm currently using this addon to test the Aqara sensor before doing the hardware fix. Correct me if I'm wrong, but what the addon should do is change the state on the Binary Sensor from DETECTED to CLEAR after 5 seconds, correct?
When I go into AppDaemon I see:
Name | State | Callbacks (instance) | Callbacks (AD Lifetime) | Arguments
aqara | idle | 0 | 0 | {"module":"aqara","class":"Aqara","timeo...
The state just stays idle. I'm wondering if this signifies that there is something currently wrong?
My apps.yaml looks like this:
aqara:
module: aqara
class: Aqara
timeout: 5
motion_sensors:
- binary_sensor.lumi_lumi_sensor_motion_aq2_7e554b05_ias_zone
Do I have to do the hardware hack, in order to use this piece of code?
It looks like after an update (unfortunately I have no idea when) the sensor is not turning back to "clear" status after the given time, however, there is a refreshment every 5 seconds (can see it in the lux values) so partly it is working. (HACS 1.29.1; AppDaemon 0.11.0) I tried restarting it, removing and adding again, but none of those helped. Is there any idea what can I try to make it work again? Thanks!
I'm going to apologise in advance for this, because I feel like I must be missing something obvious - but I can't figure it out :-/
I'm trying to setup this module. I already use ControllerX, so I need to rename it (as per install guide and #11) to avoid module naming conflicts.
I've tried every combination of:
And I'm still getting "WARNING AppDaemon: Unable to find module aqaramotion - initialize() skipped" errors in the AppDaemon log.
Current config looks like:
aqaramotion:
module: aqaramotion
class: Aqara
timeout: 5
motion_sensors:
- binary_sensor.some_sensor_i_have
With aqara.py renamed to aqaramotion.py and "MODULE = 'aqara'" changed to "MODULE = 'aqaramotion'" in its contents.
Suggestions? And thanks.
Its still work ?
I facing with the issue
After state going off its cant trigger again after 5 sec
When using ControllerX together with Appdaemon Aqara Motion Sensors there will be a module name conflict. ControllerX has also a module named 'aqara' and a file names aqara.py. Both apps won't work when you try to use them together. I solved this by renaming this module to aqara2. Then it works again. Maybe the source code should use a different name so this won't occur, like 'aqaramotion'.
This is the message I'm getting when trying to install the repo manually.
Repostitory structure for v1.0.1 is not compliant
also I wasn't able to find this integration on the default HACS integrations.
К сожалению нет подробной инструкции как это настраивается и я не смог настроить. Пришлось спрашивать у знающих. Делюсь своим опытом, это может помочь вам. Сперва нужно убедиться, что у вас стоит аддон AppDaemon 4. Если не стоит, то ставим его.
После установки аддона AppDaemon 4 должна появиться папка appdaemon.
Внутри этой папки должны быть подпапки, если этих подпапок нет, значит что-то пошло не так, тогда нужно сделать следующее:
Вот так должно быть в папке appdaemon
Далее заходим в папку apps и открываем файлик apps.yaml
В этом файлике прописываем настройки для датчиков. Указываем время сброса статуса
Вот мой пример. Я решил разделить все датчики и не смешивать в одну кучу. Вы конечно можете смешать все в одну кучу как показал автор.
Unfortunately, there is no detailed instructions on how to configure this and I was not able to configure it. I had to ask the knowledgeable ones. I share my experience, it can help you. First you need to make sure that you have the addon Ap Daemon 4. If not, then put it.
After installing the Ap Daemon 4 addon, the app daemon folder should appear.
There should be subfolders inside this folder, if there are no subfolders, then something went wrong, then you need to do the following:
This is how it should be in the app daemon folder
Next, go to the apps folder and open the app.yaml file
In this file, we specify the settings for the sensors. Specify the time to reset the status
Here is my example. I decided to separate all the sensors and not mix them in one pile. You can certainly mix everything into one pile as the author showed.
The addon version 1.2.0 don't work not reset sensors to 5 second. :
It works with old version 1.0.1, do you know where the problem may be coming from ?
Thanks
As per the title I have dismissed the homeassistant xiaomi platform in favour of zigbee2mqtt.
Not really an issue but rather a request for improvment.
I read the code and I see it is based on that component.
My question / request is : would it be possible to extend the automation also to aquara through 2zmqtt ?
TX
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.