h4de5 / home-assistant-vimar

VIMAR by-me integration into home-assistant.io
GNU General Public License v3.0
44 stars 7 forks source link

Ir Sensor #18

Open lupinve opened 4 years ago

lupinve commented 4 years ago

hi, i'm testing again Vimar IR sensor for check presence of someone on the room. https://www.vimar.com/en/int/catalog/product/index/code/20485

at the moment it is not working correctly because once the sensor is detected the presence of someone is always on

i have found this playod when i try of on/off the sensor:

soapenv:BodyNO-PAYLOADNO-HASCHODENO-OPTIONALWEB-DOMUSPAD_SOAP5f82f98d8a3ca5DML-SQLSELECTSELECT ID,NAME,STATUS_ID,CURRENT_VALUE FROM DPADD_OBJECT WHERE ID IN (229,265,399,595,1106);92 soapenv:Body1NO-HASHCODENO-OPTIONALSWEB-DOMUSPAD_SOAP5f82f98d8a3ca10595SETVALUE ON soapenv:BodyNO-PAYLOADNO-HASCHODENO-OPTIONALWEB-DOMUSPAD_SOAP5f82f98d8a3ca5DML-SQLSELECTSELECT ID,NAME,STATUS_ID,CURRENT_VALUE FROM DPADD_OBJECT WHERE ID IN (229,265,399,1106);88 soapenv:Body0NO-HASHCODENO-OPTIONALSWEB-DOMUSPAD_SOAP5f82f98d8a3ca10595SETVALUE OFF soapenv:BodyNO-PAYLOADNO-HASCHODENO-OPTIONALWEB-DOMUSPAD_SOAP5f82f98d8a3ca5DML-SQLSELECTSELECT ID,NAME,STATUS_ID,CURRENT_VALUE FROM DPADD_OBJECT WHERE ID IN (229,265,399,1106);88 soapenv:Body1NO-HASHCODENO-OPTIONALSWEB-DOMUSPAD_SOAP5f82f98d8a3ca10595SETVALUE ON soapenv:BodyNO-PAYLOADNO-HASCHODENO-OPTIONALWEB-DOMUSPAD_SOAP5f82f98d8a3ca5DML-SQLSELECTSELECT ID,NAME,STATUS_ID,CURRENT_VALUE FROM DPADD_OBJECT WHERE ID IN (229,265,399,595,1106);92 Thanks for your help Matteo
h4de5 commented 4 years ago

I guess the iR Sensor is listed as a normal light switch currently in HA? If you trigger the sensor from the web server, does it automatically go back to the "off" state?

lupinve commented 4 years ago

Yes, in HA is like a normal light

In the web server the sensor goes ON at the first detection but then always stays ON . could it be a problem of sensor detection by the web server?

Thanks

Matteo

Il sab 24 ott 2020, 04:51 Andi notifications@github.com ha scritto:

I guess the iR Sensor is listed as a normal light switch currently in HA? If you trigger the sensor from the web server, does it automatically go back to the "off" state?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/18#issuecomment-715661727, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOYLXEZLNX5RVOONV3FSEADSMI6MHANCNFSM4S5ADQEA .

lupinve commented 4 years ago

Yes, in HA is like a normal light

In the web server the sensor goes ON at the first detection but then always stays ON . Could it be a problem of sensor detection by the web server?

Thanks Matteo

h4de5 commented 4 years ago

Is this the normal behavior on the web server? So that it stays on? Maybe thss device has some extra attributes that I do not handle at the moment. I'll add some debug code as soon as I have time.

lupinve commented 4 years ago

It's not a correct behavior , in the web server the sensor should turn off if it does not detect movement this is xml imported

`

` Thanks for your help
h4de5 commented 4 years ago

@lupinve : I added some debugging code for entities having " IR " in it's names. please set your logging settings to debug and let me know the outcome.

see: https://github.com/h4de5/home-assistant-vimar#troubleshooting

besides of this - if there are no new attributes, then I am afraid I can't fix this using the integration. you may need to setup an automation that resets the state to off as soon as it detects a turn on. The problem will be, that the integration may not read out any short interactions with the motion sensor - because it does only read out states every 6-8 seconds. so any movement that is shorter than this, may be overseen.

this is one of the reasons why I do not really want to tap into the SAI/alarm systems thing at the moment.

lupinve commented 4 years ago

hi, this is my logging

2020-10-26 09:36:50 DEBUG (SyncWorker_9) [custom_components.vimar_platform.vimarlink] IR Sensor object returned from web server: CH_Main_Automation / SENSORE IR CORRIDOIO INTERRATO 2020-10-26 09:36:50 DEBUG (SyncWorker_9) [custom_components.vimar_platform.vimarlink] IR Sensor object has states: {'on/off': {'status_id': '596', 'status_value': '1', 'status_range': 'min=0|max=1'}} 2020-10-26 09:36:50 DEBUG (SyncWorker_9) [custom_components.vimar_platform.vimarlink] IR Sensor object returned from web server: CH_Main_Automation / SENSORE IR SALOTTO 2020-10-26 09:36:50 DEBUG (SyncWorker_9) [custom_components.vimar_platform.vimarlink] IR Sensor object has states: {'on/off': {'status_id': '599', 'status_value': '1', 'status_range': 'min=0|max=1'}}

Thanks

h4de5 commented 4 years ago

As i thought. It just has an on/off state. As i said, i am afraid i can't fix that :( Try out an automation that unsets the switch as soon as it is activated.

lupinve commented 4 years ago

Ok thanks, i will try out an automation

lupinve commented 4 years ago

Hi, the ir switch works fine with turn off automatically.

if it can help you with the integration, I will pass you another type of interface that I used before between vimar and HA. Here you find information from its creator https://github.com/papergion/scsknxgate