benleb / ad-notifreeze

❄️ AppDaemon app which reminds to close windows if temperature difference inside/outside exceeds a specified threshold
Apache License 2.0
18 stars 7 forks source link

Support for also manualy add sensors not by name #3

Closed accessone67 closed 4 years ago

accessone67 commented 4 years ago

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..

jokerigno commented 4 years ago

I have this issue too. @benleb you said that can be configured manually but how ? There's no trace in docs.

Moreover how the message is written ? In english I suppose. But how can we localize it?

TY

benleb commented 4 years ago

@accessone67 & @jokerigno if anyone of you wants to test the master? 🤪 And sure, you can configure your sensors directly or, maybe more convenient, use an alias for auto-discovery 🥳 Please read the readme about the new idea/concept and configuration! The example config is my currently running one, should work 👍

Yes, messages are in english... Localizing currently just via editing of the python code.

benleb commented 4 years ago

okay, v0.5.0 released with the requested feature :) closing here now as this issue is resolved. (if not. let me know ;))

jokerigno commented 4 years ago

OK I'll make some tests. In case I'm available to localize in Italian (just need to know which phrases I should translate)

jokerigno commented 4 years ago

Here I am.

I put this config

notifreeze:
  module: notifreeze
  class: NotiFreeze
  notify_service: notify.telegrammarco
  always_notify: true
  outdoor: sensor.daikinap73415_outside_temperature
  max_difference: 4.2
  delays:
    initial: 3
    reminder: 7
  rooms:
    - name: Cucina
      door_window: 
        - binary_sensor.portafinestracucina
        - binary_sensor.finestra_cucina
      indoor:
        - sensor.temperatura_cucina
    - 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

and then opened all the windows. Nothing appened (even if the temperature went down from 22 to 16 in a room with an external temp of 17 degrees.

accessone67 commented 4 years ago

Hei

Same here.

My config is:

notifreeze: module: notifreeze class: NotiFreeze notify_service: notify.me_telegram outdoor: sensor.weather_temperature max_difference: 5 delays: initial: 1 reminder: 2 rooms:

If I look in appdaemon log I see 2020-10-13 11:06:59.890406 INFO notifreeze: ❄️ Livingroom Living room window opened, -13.4°C → reminder in 1min

But the notification will never arrive. It just like stop the job. I think we are almost there need to fix this small bug.

benleb commented 4 years ago

sorry, seems like a c&p bug 🤦 can you confirm it's working in the master now? if so, I will release a new version :)

jokerigno commented 4 years ago

chenged to master on HACS. I'll do some test and let you know :)

benleb commented 4 years ago

Thanks! That's how it should look (with debug output enabled (and also AutoMoLi to manage the lights)) image

accessone67 commented 4 years ago

Thank you, the master is working for me and received notification on telegram.

benleb commented 4 years ago

fixed in v0.5.1, thanks!

jokerigno commented 4 years ago

Sorry @benleb but I still miss something.

I added this config:

notifreeze:
  module: notifreeze
  class: NotiFreeze
  notify_service: notify.telegrammarco
  outdoor: sensor.dark_sky_apparent_temperature #sensor.daikinap73415_outside_temperature
  max_difference: 4
  delays:
    initial: 1
    reminder: 2
  rooms:
  - name: Soggiorno
    door_window: binary_sensor.portafinestrasoggiorno
    indoor: sensor.temperatura_soggiorno
  - name: Cucina
    door_window:
    - binary_sensor.portafinestracucina
    - binary_sensor.finestra_cucina
    indoor: sensor.temperatura_cucina
  - 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
  - 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

And I see it's loading. But then nothing happens. I opened the window and the inside room was 22 while ext 13 and I waited for a notification that didn't arrived.

Any suggestion?

benleb commented 4 years ago

maybe I see the problem... did the indoor temperature change after you opened a door/window?

as long as the temp indoor stays the same as the temp outdoor, notifreeze will not send any notification. The idea behind notifreeze is to prevent rooms from getting too cold/hot and with this in mind, I don't care if a windows/door is open but the temperature in the room does not change. If you want to get a notification every time, regardless of the temperature indoor, you can put always_notify: true in your config 👍

If that's not the problem, we have to dig deeper... maybe the appdaemon debug logs (you have to enable it, see appdaemon docs) can tell us the problem

jokerigno commented 4 years ago

Well temperature changed but not so much. Maybe from 22 to 19 with an external temp of 14 degrees.

In this casa max_difference should be 2 to receive a notification right?