zigbeefordomoticz / Domoticz-Zigbee

Zigbee plugin for Domoticz. Allow to connect various zigbee controllers like Zigate but also Texas Instrument CC2531, CC13x2, CC26x2 ; Silicon-Labs; deConz based chipset to be connected to Domoticz
GNU General Public License v3.0
99 stars 43 forks source link

Include Frient Motion sensor pro #816

Closed MLO881 closed 3 years ago

MLO881 commented 3 years ago

Hello,

Thanks for your tool it works fine for me

I have a request to include the Frient Motion sensor Pro It works but I have some alarm in the web app manager and in domoticz too. These alarms happen when the motion sensor is activated but the device is working fine. I use it to control light in a corridor with the light level as parameter.

domoticz log: 2021-05-27 13:54:16.008 Error: Zigate: (Zigate) Legrand unknown device MOSZB-140 Value: 00006f0018000100

joined (in txt): error.json + export.json (only controller and Frient device) export.txt errors.txt

Thanks for your help

MLO

pipiche38 commented 3 years ago

Interesting device. Can you confirm what you expect: Occupancy sensor -> Motion widget Light Sensor -> Lux widget Temperature sensor -> Temp widget Tamper protection -> Alarm widget

MLO881 commented 3 years ago

You summary is good...

All is working fine but errors in log (domoticz and plugin) I expect what you listed and to avoid error, have the good voltage and the tamper protection

the plugin (and the gateway also) created 8 devices in domoticz: 1 Switch Off - - 2 Zigate - MOSZB-140_Voltage-0015bc001a01a9b9-23 General Voltage 31 V 3 Frient - Temperature Temp LaCrosse TX3 17.8 C 4 Frient - Luxmetre Lux Lux 918 Lux 5 Zigate - Motion 1 Light/Switch Switch Off 6 Zigate - Motion 2 Light/Switch Switch Off 7 Zigate - Motion 3 Light/Switch Switch Off 8 Zigate - MOSZB-140_Door Light/Switch Switch Off

pipiche38 commented 3 years ago

[8] is the tamper , correct ? if I move it to Alarm would it better ? Which of the [5,6,7] Motion works ?

MLO881 commented 3 years ago

Motion sensor: [5,6,7] are motion sensors , stay ON during 5min on the rising edge ==> all are working but somtime one remain off [8] I think it is [5] OR [6] OR [7] but with a shorter delay (1min) on the rising Edge ==> working too

Tamper sensor: I just made a test ==> the tamper sensor is not available on Domoticz in this list (it's a switch at the back of the PCB that I "play with" but without updated status on domoticz side)

pipiche38 commented 3 years ago

Just to get a better understanding, there is only 1 Motion sensor on that device, cporrect ? So we should only have one Motion widget , no ?

From the investigation, it looks like the motion detection switch off after 24 secondes. Is that correct ?

pipiche38 commented 3 years ago

@MLO881 I have pushed some update on the beta branch.

I believe you are on a recent version of the plugin ( 4.11 or 5.x ) . If that is the case please switch to beta So if you are not on, please could you kindly switch to beta by git checkout beta.

Already by that the error message should be fixed and the Voltage as well. However it would be great if you could remove all of those widgets and redo the full device pairing.

For now, I'm still creating the 3 Motion widgets, but I think 1 should be enough

Please let me know how it goes

MLO881 commented 3 years ago

I checked the HW ==> only one PIR sensor the switch off is around 30-60s: correct but hard to be more accurate : this is not real time

You're true, Only one should be enought : the one with the switch off after 24s

I'm on the latest stable, I will update to the beta soon and keep you updated

pipiche38 commented 3 years ago

When you'll do the test, it would be interesting as well to see if the change of the OffDelay can be updated. For that you need to go in the Device Management of the Web UI and then go to the parameters section of this device ( left column) and then you change the period from 30 to 60

MLO881 commented 3 years ago

@pipiche38 Thanks a lot for your Job here are my feedback following the beta update yesterday evening

  1. Voltage (cluster 23) ==> OK : 3.1V

  2. Lux (cluster 26) ==> OK : data update frequency is now around every 10mn ==> OK

  3. Switch (cluster 01) ==> never worked, I don't know what it is for

  4. Motion (cluster 22, 28, 29) ==> Strange behavior :

    • before update these motion sentor swith ON and stay ON during 5mn (but sometime one of them stay OFF)
    • after update they switch ON and stay ON during 30s then switch OFF and no update possible for the next 10mn maybe linked to the 10mn frequency above (and sometime one of them stay off too) image
  5. Door (cluster 23) ==> work as expected : swich ON and the switch of 30s after the last movement image

  6. OffDelay : I tried to change the value==> no effect on the log and when I refresh Zigate interface, it comme back to 30 (default)

  7. Tamper ==> No Data, no visible effect

If you need log or data, no problem to send you

pipiche38 commented 3 years ago

yep, it would be great if you could provide me the "Plugin Device List (RAW)" export.json file . Normaly you should have only 1 Motion and NO switch, so could you kindly redo the pairing after having removed all devices

MLO881 commented 3 years ago

@pipiche38 Here is the export.json file export.json.txt

I will do the new pairing this evening and then I will send you the new version of the file

pipiche38 commented 3 years ago

Yes please try to repair, as it looks like there is one part of the pairing which doesn't succeed.

MLO881 commented 3 years ago

process used to unpaire/pair

  1. remove devices from the device list of domoticz
  2. Zigate noyification ==> Device fully removed Zigate - Motion-0015bc001a01a9b9-22 with IEEE: 0015bc001a01a9b9
  3. Check that device is fully removed in device magement in Zigate web interface (device list and Raw export)
  4. reset Frient module and check the devices is remove from network (red led blinking)
  5. Remove battery
  6. switch zigate in pairing mode
  7. then set the battery and Wait the end of pairing process

image

clusters and devices (domoticz side) are the same export.json.txt

but now, lux are sent very often (each 1s)

pipiche38 commented 3 years ago

This looks that it is not working as I would expect. Can you redo the pairing, but also enable some debug, so I understand what is going on

you should enable debugInput debugCluster debugPairing from the Tools->Debug menu and do the pairing like you did after having removed all devices from domotciz.

Which one did you buy ? is that https://marini24.de/smart-home/sensoren/rauch-feuer-wasser/frient-feuchtigkeitssensor or https://marini24.de/smart-home/sensoren/bewegungsmelder/frient-bewegungsmelder-pro

Please do make sure to use the latest beta ( 5.2.022 )

MLO881 commented 3 years ago

Hi, I took time to make tests, sorry.

  1. this is this one :https://marini24.de/smart-home/sensoren/bewegungsmelder/frient-bewegungsmelder-pro the Frient motion PRO : ref MOSZB-140

  2. I didn't succeed to record log's when pairing : I had to face domoticz crash or too heavy log that were erased during I check the pairing. I try a lot of time the week before but the behaviour is strange:

    • DOOR cluster stay always OPEN (ON)

    • MOTION cluster (x3) stay ON during 5 min

    • The onDelayParameter dispeared

    • Temps sensor seems OK (record frequency 5mn but every seconds in domoticz log)

    • lux sensor seems OK (record frequency 5mn)

    • no Tamper

    I think it will be OK to have only one motion sensir in domoticz devices, but 5min delay for the switch off delay is too long In the first version the most usefull device was liked to the door sensor with a 30s switch off delay and it was fine. but not working since the last beta version 5.2.026

    Please ask if you haver any requests to perform this device intégration. It is a realy nice device

pipiche38 commented 3 years ago

Hi,

Thanks for the tests, but I'm struggling to understand what is happening. I was thinking to purchase the device, but on the German site, the price is doubled with Shipment I believe (and may be some taxes)!

What I would suggest as a final test, is to simply remove the file Conf/Certified/Frient/MOSZB-140.json Then you restart, you remove all widgets from Domoticz and you redo the pairing.

You should expect the same behaviour as before (without the error messages), and with 3 Motion widgets

MLO881 commented 3 years ago

Hi, I proceeded as you wrote, Nothing different, I think the issue comme from the V5.2.026 previously I was on the 5.2.0.22 FYI I bought on A... Here is the link https://www.amazon.de/frient-20202500-Feuchtigkeit-Manipulationsschutz-Funktioniert/dp/B08WXSZ56Z?ref_=ast_sto_dp

Edit, following some comments and the use of the product I make ; lux, temperature, 1 motion (delay tunable), and Tamper (if available) are enought Lux update record seems OK (every 5mn) but too often in de log window (around each second)

pipiche38 commented 3 years ago

Ordered one.

pipiche38 commented 3 years ago

I have made very good progress today. Still some work to do.

(1) there is something strange of the firmware side, which makes that sometime the Tamper and a 30s off Motion (2) You can configure 3 Motions with a different delay to Off ( like 5s , 15s, 30s ) Motion-22,28,29

pipiche38 commented 3 years ago

@MLO881 if you want to try and play this is now available on beta-5.2.032

If you want to have only 1 Motion widget, just remove the others ;-)

Otherwise, the PIROccupiedToUnoccupiedDelay can be configured via the Device Parameter in the Device Management (don't forget to validate the change in the main window in order to apply the changes)

pipiche38 commented 3 years ago

moszb130.pdf

pipiche38 commented 3 years ago

Strange Lux measurement. This seems not to be matching the "Lux=10^((y-1)/10000)" rule When comparing Philips Hue, Lumi and OZW , the Frient get a much higher Lux value at high luminence

pipiche38 commented 3 years ago

This coud be related to The light sensor is a low-accuracy sensor reporting light level. The end point is configured as Home Automation profile „Light Sensor“.

MLO881 commented 3 years ago

Thanks for the update, I will swap today, and thank you for the doc. About Lux, I don't have another devices to compare. but for my use (switch light ON in a corridor) the data is enought.

MLO881 commented 3 years ago

I make a quick test this morning :

soon, I will try again a reset/pairing to have the tamper and check another time for the PIROccupiedToUnoccupiedDelay parameter FYI when I pair, the device is 1.5m from the gateway (wifi/zigbee zigate)

From my side the global behaviour of the device is better now for a well implementation into my IOT systems

pipiche38 commented 3 years ago

We are making progress. Issue has been found in the ZiGate firmware which prevent the IAS enrollment and consequently having the Tamper working.

From that, I'm getting a new issue it seems that when the Tamper is enable then we don't get the 3 motion any more, but a fourth one.

I'm trying to contact Developco to see if I'm missing one point, as we will get a different behaviour between the 2 firmware version (with fix, without fix)

So for now, stay tuned ;-)

MLO881 commented 3 years ago

I made some tests (before and after a full reset/restart/unpair/pair) Definitely, PIROccupiedToUnoccupiedDelay parameter doesn't work ==> data are saved into the plugin but sensors keep a 30s delay. exept this point and Tamper, all seem working fine.

pipiche38 commented 3 years ago

Try to get the latest version

Envoyé de mon iPhone

Le 11 juin 2021 à 15:59, MLO881 @.***> a écrit :

 I made some tests (before and after a full reset/restart/unpair/pair) Definitely, PIROccupiedToUnoccupiedDelay parameter doesn't work ==> data are saved into the plugin but sensors keep a 30s delay. exept this point and Tamper, all seem working fine.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

MLO881 commented 3 years ago

@pipiche38 I made several tests this until today, it's working fine for my usage. but It seems that PIROccupiedToUnoccupiedDelay_28 & _29 are linked to the PIRUnoccupiedToOccupiedDelay_29 (of the documentation) but hard to monitor

pipiche38 commented 3 years ago

Investigation in progress on firmware side. The Motion Configure Reporting trigger a wrong Default Response on the ZiGate side while the device response was ok.

pipiche38 commented 3 years ago

Fix on firmware side is ready. the end result is that if the motion is enrolled as a security device, then we don't get the flexibility on the vraious Ep. and we just have the 30s motion detection.

MLO881 commented 3 years ago

Thanks From my point of view it's OK, User can adjust it directly into its platform by adding a delay on the rising edge

pipiche38 commented 3 years ago

Final integration is done in beta 5.2.067

e64c8adc2231f91dd39e012650f6598467793651