benleb / ad-notifreeze Goto Github PK
View Code? Open in Web Editor NEW❄️ AppDaemon app which reminds to close windows if temperature difference inside/outside exceeds a specified threshold
License: Apache License 2.0
❄️ AppDaemon app which reminds to close windows if temperature difference inside/outside exceeds a specified threshold
License: Apache License 2.0
Hi,
it's me, again.
What about this ?
Do you think it makes sense?
For me it would be helpful because at the moment my entity_id is name is "Livingroom Door window) so the message says something like "Livingroom Door window in Livingroom is open" when a message like "Door window in Livingroom is open" is more readeble.
Please let me know your thoughts
Hi,
I would like to suggest to add the possibility to localize/personalize message on different languages-needs.
Hi,
I created 2 instances of notifreeze to have 2 different timout:
When using it I see a lot of warning in AppDaemon log and it is working more slowly (disappeared after commented the notifreeze app).
2022-01-29 15:57:15.168776 WARNING AppDaemon: Excessive time spent in utility loop: 11196.0ms, 11196.0ms in check_app_updates(), 0.0ms in other
2022-01-29 15:57:22.823897 WARNING AppDaemon: Excessive time spent in utility loop: 6529.0ms, 6529.0ms in check_app_updates(), 0.0ms in other
2022-01-29 15:57:33.672640 WARNING AppDaemon: Excessive time spent in utility loop: 9709.0ms, 9709.0ms in check_app_updates(), 0.0ms in other
2022-01-29 15:57:42.585131 WARNING AppDaemon: Excessive time spent in utility loop: 7730.0ms, 7730.0ms in check_app_updates(), 0.0ms in other
Here are the config:
notifreeze1:
module: notifreeze
class: NotiFreeze
notify_service: script.my_notify
always_notify: true
outdoor: sensor.dark_sky_apparent_temperature
max_difference: 10
#forked da fare pull request
locale: it_IT
delays:
initial: 30
reminder: 30
messages:
since: "La {entity_name} in {room_name} è aperta da {open_since}."
change: "La {entity_name} in {room_name} è aperta da {open_since}: la temperatura è cambiata di ({indoor_difference}°C)."
rooms:
- name: Soggiorno
door_window: binary_sensor.portafinestrasoggiorno
indoor: sensor.temperatura_soggiorno
- name: Studio
door_window: binary_sensor.001558a99d4529_state
indoor: sensor.temperatura_studio
- name: Camera da Letto
door_window: binary_sensor.001558a99d4a8d_state
indoor: sensor.temperatura_camera_da_letto
- name: Camera di Adele
door_window:
- binary_sensor.portafinestracameradiadele
- binary_sensor.001558a99ef4be_state
indoor: sensor.temperatura_camera_di_adele
notifreeze2:
module: notifreeze
class: NotiFreeze
notify_service: script.my_notify
always_notify: true
outdoor: sensor.dark_sky_apparent_temperature
max_difference: 10
#forked da fare pull request
locale: it_IT
delays:
initial: 60
reminder: 45
messages:
since: "La {entity_name} in {room_name} è aperta da {open_since}."
change: "La {entity_name} in {room_name} è aperta da {open_since}: la temperatura è cambiata di ({indoor_difference}°C)."
rooms:
- name: Cucina
door_window:
- binary_sensor.finestra_cucina
- binary_sensor.portafinestracucina
indoor: sensor.temperatura_cucina
- name: Bagno Principale
door_window: binary_sensor.001558a99d4e50_state
indoor: sensor.temperatura_bagno_principale
- name: Bagno Secondario
door_window: binary_sensor.001558a99ef07a_state
indoor: sensor.temperatura_bagno_secondario
any suggestion?
Hi,
Is it possible to add a „disable“ button?
(Specialy for the Summer)
thx
Hi there,
thank you for this add on!
Will you be able to add feature to pull list of notify services from configuration
Now it seems to get only one?
2021-11-01 12:40:04.952856 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:40:04.954232 WARNING notifreeze: Unexpected error running initialize() for notifreeze
2021-11-01 12:40:04.955583 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:40:04.976749 WARNING notifreeze: Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 163, in initialize_app
await init()
File "/config/appdaemon/apps/ad-notifreeze/notifreeze.py", line 176, in initialize
since = own_messages.pop("since", self.msgs.get("since"))
AttributeError: 'str' object has no attribute 'pop'
2021-11-01 12:40:04.978141 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:41:32.232052 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:41:32.233346 WARNING notifreeze: Unexpected error running initialize() for notifreeze
2021-11-01 12:41:32.234421 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:41:32.236805 WARNING notifreeze: Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 163, in initialize_app
await init()
File "/config/appdaemon/apps/ad-notifreeze/notifreeze.py", line 176, in initialize
since = own_messages.pop("since", self.msgs.get("since"))
AttributeError: 'str' object has no attribute 'pop'
2021-11-01 12:41:32.238747 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:43:45.992600 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:43:45.995026 WARNING notifreeze: Unexpected error running initialize() for notifreeze
2021-11-01 12:43:45.996732 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:43:45.999166 WARNING notifreeze: Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 163, in initialize_app
await init()
File "/config/appdaemon/apps/ad-notifreeze/notifreeze.py", line 176, in initialize
since = own_messages.pop("since", self.msgs.get("since"))
AttributeError: 'str' object has no attribute 'pop'
2021-11-01 12:43:46.000660 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:44:22.543925 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:44:22.546171 WARNING notifreeze: Unexpected error running initialize() for notifreeze
2021-11-01 12:44:22.548099 WARNING notifreeze: ------------------------------------------------------------
2021-11-01 12:44:22.561108 WARNING notifreeze: Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 163, in initialize_app
await init()
File "/config/appdaemon/apps/ad-notifreeze/notifreeze.py", line 176, in initialize
since = own_messages.pop("since", self.msgs.get("since"))
AttributeError: 'str' object has no attribute 'pop'
2021-11-01 12:44:22.562737 WARNING notifreeze: ------------------------------------------------------------
my conf
notifreeze:
module: notifreeze
class: NotiFreeze
messages: en_US
#messages: "ciao c'è una finestra aperta"
notify_service: notify.telegram #script.notify
always_notify: false
outdoor: sensor.temperatura_esternna
max_difference: 2.2
delays:
initial: 3
reminder: 7
rooms:
- Schlafzimmer
- Bad
- name: Wohnzimmer
alias: livingroom # entity ids contain livingroom but not wohnzimmer
- name: Keller
door_window: binary_sensor.finestra_salone
indoor:
- sensor.temperature_media_interna
Hello,
I just can't get on, I always get the following error message:
2021-05-14 23:54:10.367246 WARNING notifreeze: ------------------------------------------------------------
2021-05-14 23:54:10.366495 WARNING notifreeze: Unexpected error running initialize() for notifreeze
2021-05-14 23:54:10.364998 WARNING notifreeze: ------------------------------------------------------------
2021-05-14 23:40:45.272436 WARNING notifreeze: ------------------------------------------------------------
2021-05-14 23:40:45.271884 WARNING notifreeze: Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 159, in initialize_app
await init()
File "/config/appdaemon/apps/ad-notifreeze/notifreeze.py", line 176, in initialize
if own_messages := self.args.pop("messages"):
KeyError: 'messages'
Unfortunately I have no idea what is wrong, attached my config:
#Notifreeze Fenstersensoren
notifreeze:
module: notifreeze
class: NotiFreeze
notify_service: notify.mobile_app_iphone_xxxxxxx
always_notify: true
outdoor: sensor.outdoor_temperature
max_difference: 4
delays:
initial: 1
reminder: 2
rooms:
Can you help me?
Big thanks for your help!
What do you mean with "then add the configuration to enable the notifreeze module."
I have installed with hacs but i get the message "No card type configured"
Hi, it's me again.
I wanted to test your app now but when I tried I see these errors in log:
WARNING AppDaemon: Unable to find class Notifreeze in module notifreeze - 'notifreeze' is not initialized
WARNING AppDaemon: Unable to find module notifreeze - initialize() skipped
This is my config in apps.yaml
notifreeze:
module: notifreeze
class: Notifreeze
notify_service: notify.xxxxxxxxxxxxxx
outdoor_temperature: sensor.daikinapxxxxx_outside_temperature
Hi, my AppDeamon doesn't load the app for an unknown reason.
Below is my config
notifreeze:
module: notifreeze
class: NotiFreeze
locale: en_US
notify_service: notify.all_phones
always_notify: true
outdoor: sensor.home_realfeel_temperature
max_difference: 5.2
delays:
initial: 5
reminder: 7
rooms:
- bedroom
- bathroom
- living_room
This is AppDeamon log
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: AppDaemon
Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
Add-on version: 0.14.0
You are running the latest version of this add-on.
System: Home Assistant OS 11.1 (aarch64 / odroid-n2)
Home Assistant Core: 2023.11.0
Home Assistant Supervisor: 2023.10.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-appdaemon: starting
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
[00:36:27] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
2023-11-08 00:36:31.922818 INFO AppDaemon: AppDaemon Version 4.4.2 starting
2023-11-08 00:36:31.923096 INFO AppDaemon: Python version is 3.11.6
2023-11-08 00:36:31.923268 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2023-11-08 00:36:31.923443 INFO AppDaemon: Added log: AppDaemon
2023-11-08 00:36:31.923729 INFO AppDaemon: Added log: Error
2023-11-08 00:36:31.924019 INFO AppDaemon: Added log: Access
2023-11-08 00:36:31.924287 INFO AppDaemon: Added log: Diag
2023-11-08 00:36:32.171428 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2023-11-08 00:36:32.424349 INFO HASS: HASS Plugin Initializing
2023-11-08 00:36:32.424570 WARNING HASS: ha_url not found in HASS configuration - module not initialized
2023-11-08 00:36:32.424739 INFO HASS: HASS Plugin initialization complete
2023-11-08 00:36:32.425285 INFO AppDaemon: Initializing HTTP
2023-11-08 00:36:32.425727 INFO AppDaemon: Using 'ws' for event stream
2023-11-08 00:36:32.429598 INFO AppDaemon: Starting API
2023-11-08 00:36:32.432562 INFO AppDaemon: Starting Admin Interface
2023-11-08 00:36:32.433197 INFO AppDaemon: Starting Dashboards
2023-11-08 00:36:32.455631 INFO HASS: Connected to Home Assistant 2023.11.0
2023-11-08 00:36:32.458508 INFO AppDaemon: Starting Apps with 0 workers and 0 pins
2023-11-08 00:36:32.459634 INFO AppDaemon: Running on port 5050
2023-11-08 00:36:32.537735 INFO HASS: Evaluating startup conditions
2023-11-08 00:36:32.552784 INFO HASS: Startup condition met: hass state=RUNNING
2023-11-08 00:36:32.553107 INFO HASS: All startup conditions met
2023-11-08 00:36:32.594386 INFO AppDaemon: Got initial state from namespace default
2023-11-08 00:36:34.468592 INFO AppDaemon: Scheduler running in realtime
2023-11-08 00:36:34.470511 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2023-11-08 00:36:34.470863 INFO AppDaemon: Adding /config/appdaemon/apps/ad-notifreeze to module import path
2023-11-08 00:36:34.472197 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/ad-notifreeze/notifreeze.py - ignoring
2023-11-08 00:36:34.472935 INFO AppDaemon: App initialization complete
2023-11-08 00:36:36.857321 INFO AppDaemon: New client Admin Client connected
2023-11-08 00:36:56.308502 INFO AppDaemon: Client disconnection from Admin Client
2023-11-08 00:36:56.486540 INFO AppDaemon: New client Admin Client connected
What could be the problem?
Log within AppDaemon4
2021-12-08 09:46:10.706731 WARNING notifreeze: ------------------------------------------------------------
2021-12-08 09:46:10.706559 WARNING notifreeze: Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 163, in initialize_app
await init()
File "/config/appdaemon/apps/ad-notifreeze/notifreeze.py", line 176, in initialize
if own_messages := self.args.pop("messages"):
KeyError: 'messages'
2021-12-08 09:46:10.706178 WARNING notifreeze: ------------------------------------------------------------
2021-12-08 09:46:10.705960 WARNING notifreeze: Unexpected error running initialize() for notifreeze
2021-12-08 09:46:10.705743 WARNING notifreeze: ------------------------------------------------------------
my config:
notifreeze:
module: notifreeze
class: NotiFreeze
locale: de_DE
notify_service: notify.notify
always_notify: false
outdoor: sensor.lumi_lumi_weather_temperature
max_difference: 4.2
delays:
initial: 3
reminder: 7
rooms:
- name: Kinderzimmer
door_window: binary_sensor.lumi_lumi_sensor_magnet_aq2_eafbc306_on_off
indoor: sensor.lumi_lumi_weather_d2387507_temperature
- name: Wohnzimmer
#alias: livingroom # entity ids contain *livingroom* but not *wohnzimmer*
door_window: binary_sensor.lumi_lumi_sensor_magnet_aq2_8aede406_on_off
indoor:
- sensor.fritz_dect_rep_100_oben
- sensor.lumi_lumi_weather_07381107_temperature
Hi,
just an idea: why don't you create the opposite component? An appdaemon that notifies you when outside temperature is higher than the one inside a room. I think it would be useful for spring or autumn.
:)
Hi,
in my house each room has a climate control, which also reports the current temperature as an attribute. The state of the entity just informs if the heating is on or off.
So it would be great, if it would be possible to reference an attribute of an entity.
What do you think?
Regards
Joerg
Moin,
sorry ich will echt nicht nerven ^^. Hattest du mal Zeit, dir den Fehler anzuschauen? Seit dem neuen AppDaemon spinnt es total.
Bestimmt ist das nur eine Kleinigkeit, leider kenne ich mich dafür zu wenig aus :(
Merci
Hi, it's me, your nightmare!
Here's the idea. I live in a very polluted zone in Italy and here air quality is often bad : in my opinion this should be considered where deciding to leave the windows open for a certain period of time.
So my idea should be to add another sensor like "outdoor" called "outdoor_air_quality" when people can add for example sensor using WAQI integration. If this sensor's value is > 100 (this should be default value) timers for "initial" and "reminder" value should be lower.
The final output should be something like this:
notifreeze:
module: notifreeze
class: NotiFreeze
notify_service: notify.me
always_notify: true
outdoor: sensor.dark_sky_apparent_temperature
outdoor_air_quality: sensor.waqi_airquality_location
max_difference: 3
max_airquality: 100
delays:
initial: 30
reminder: 15
airpolluted_initial: 15
airpolluted_reminder: 5
it is worth for you?
Let me know your thoughts
PS: I created a local for it_IT if you want to add to your repo
"it_IT": {
"since": "La {entity_name} in {room_name} è aperta da {open_since}. La temperatura attualmente è di {initial}°C",
"change": "La {entity_name} in {room_name} è aperta {open_since}: la temperatura è passata da {initial}°C a {indoor}°C con una differenza di {indoor_difference}°C",
},
Hi,
I have several outdoor-temperature-sensors installed (each side of the house has one).
It would be cool if you make it possible to have the ability to override the default-outdoor-sensor for each room.
So a room located at the north can be left longer open in the summer, than a room located at the south.
What do you think?
Regards
Joerg
Can you add also that sensors can be added manualy not by the name. In my config I have sensors named like "door_window_sensor_158d0002c908bc" .. and I cant use this plugin because of that..
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.