Closed lupinve closed 4 years ago
Yes unfortunately this is known. I have to delay the update requests from home-assistant to the webserver, otherwise the webserver goes into an unresponsive state and requires a cold restart.
I currently have version 2.3 of the webserver. I'd like to try to change the delay of update requests. I can try testing if you tell me where I can change the delay. Thanks Matteo
in each platform (light.py, cover.py, switch.py, climate.py) you will find two consts:
SCAN_INTERVAL = timedelta(seconds=20)
PARALLEL_UPDATES = 2
the first one is the time for how long each entity waits until it polls the webserver for new data. the second defines how may parallel requests can run at the same time.
you can play around with those numbers - but be informed, that the webserver may become unresponsive. i havn't got time to test out the limits as I am trying to fix this issue using a different approach.
Hi,
I'm still testing the delay and for now it seems to work well with this setting, only for light.py:
SCAN_INTERVAL = timedelta(seconds=6) PARALLEL_UPDATES = 3
I also wanted to ask you if Vimar's IR sensor integration is already possible. In my xml it is detected but in HA it is considered light and does not work properly.
index index="120" label="SENSORE IR SALOTTO " number="0" room="SALOTTO" type="SENSORE IR" zone=""> datapointtypes channel="CH_Main_Automation"> datapointtype mode="rw" name="DPTSwitch"> groupobject address="0EF9"/> /datapointtype> /datapointtypes> device address="1108" manufacturer="002C" name="ConvimarSAISensoreIR" type="0001" version="8"> properties/> functionalblock channel="CH_Main_Automation" classification="sensor" index="2" main="True" name="ConvimarSensoreIR"> groupobjects> datapointtype mode="rw" name="DPTSwitch"/> /groupobjects> properties/> /functionalblock> /device>
Do I have to change any data? Thanks so much !!!!!
I see. An IR sensor would be like a switch or like a sensor (without the possibility to change its state from ha?)
like a switch https://www.vimar.com/en/int/catalog/product/index/code/20485 i can use it for turn on the light when people show up
at the moment it is detected as a light that once activated does not turn off anymore
Ah i see. Maybe setting its state simply to 1 is wrong for that device. Can you have a look at contributing.md (the second part about setting a value) ?
i try it, there seems to be no movement variation i find this value
this seems to be the read state - no the set state. I would need to request/payload that is sent to the webserver- not the answer. but I guess - as this still does only have a normal on/off state, the timer is somehow realized differently. You could have those timers within ha automations like this:
"some_uniqe_name":
alias: büro rollos öffnen
sequence:
- data: {}
entity_id:
- light.id_of_light1
- light.id_of_light2
service: light.turn_on
- delay: 0:00:15
- data: {}
entity_id:
- light.id_of_light1
- light.id_of_light2
service: light.turn_off
this is just a script (for script.yaml) that will turn off those given lights after 15sec. you could play around with automations.
@lupinve with the latest code push, the updates should be comming in much faster. the entity states will be updated once every 6 seconds.
I am closing this issue as the original issue seems to be working already. Please let me know if that's not the case.
switching lights off after a given time, needs to be added through hass automations, i guess. also let me know if you made progress there.
Hi,
I recently purchased a Vimar 01946 web server and easily managed to use your project with home assistant version 0.112.3 on Raspberry 4. Lights and thermostats were detected. For thermostats I have yet to try to test them. For the lights I have a lag problem when I turn the light on or off from the Vimar device. The state on HA has a delay of approximately 30 seconds. Is it a known problem or a configuration problem of my system?
Thanks for your help Matteo