Core: Philio Technology Motion Sensor State issues

Created on 23 Oct 2015  Â·  19Comments  Â·  Source: home-assistant/core

I have a "Philio Technology Corporation PSP01-1 Slim Multi-Sensor"

It's a 3-1 sensor with Motion, light and temperature sensors.
I thought there was a problem with OZW not reporting the Motion Sensor state, but it was the sensor that (mis)behaves. When a motion is detected HA gets the message from the dispatcher and do a state update. The problem is that the sensor never reports any off value just True values for when a motion is detected.

So to be able to do anything with this sensor I need to reset the state in HA after a specified time interval so that the incoming changes get triggered again. There is a re-arm setting (sec before a retrigger will occur) in the device that could be read when the sensor is added.

So I would like some help solving this issue because I don't know the right place to solve it or the correct way to reset the state value in the state machine.

enhancement

All 19 comments

Oh, a Z-Wave question! Any wisdom in how you got it working?

Probably have to add a new sensor to components/sensor/zwave.py that when triggered to on, will set itself to off after X time. A good example of this is the manual alarm control panel platform.

Hi! Yeah z-wave has always been working for me, installed the version from
your fork when it compiled. Newer versions compile as well but haven't
dared to install it, don't want to break the working version!

I will add this sensor as a new sensor, usually the motion sensors sends an
off event when they rearms so it will have to be device specific! When I'm
at it I will also add an door / window sensor to get better state names.
Open / closed instead of on / off. Is that ok?

lör 24 okt 2015 09:00 Paulus Schoutsen [email protected] skrev:

Oh, a Z-Wave question! Any wisdom in how you got it working?

Probably have to add a new sensor to components/sensor/zwave.py that when
triggered to on, will set itself to off after X time. A good example of
this is the manual alarm control panel platform
https://github.com/balloob/home-assistant/blob/dev/homeassistant/components/alarm_control_panel/manual.py
.

—
Reply to this email directly or view it on GitHub
https://github.com/balloob/home-assistant/issues/546#issuecomment-150771663
.

That sounds good. Z-Wave support has never evolved from some early experimentation by me.

If you have time and an extra machine, if you could write up some instructions how you got Z-Wave working or can figure out what is currently broken, that would be great.

@stefan-jonasson di you get this working. I'm trying to figure this phillio motion sensor out, but it doesn't make sense to me. I got the temp and open/closed states reported, but i don't know how to use the motion sensor. Do you have tips for me?

Yep, with the implemented workaround it works as it should. I have two variants, one with a magnetic switch and one with a motion sensor. So I don't have the same device as you and therefore the workaround is not enabled for your device.

Can you send me the section corresponding the device from your ./homeassistant/zwcfg_XXXXX.xml file?

Thnx for your Reply, i'm struggling with this a long time.

I have the pst042-a 4 in 1 multi sensor. IT shows op in HA as 8 sensors:

The working ones and changing states

  • temp: degrees
  • access control: 22 for open 23 for closed
  • luminance: 0-100

The following sensors never change state

  • alarm level :0
  • alarm type : 0
  • burglar: 8
  • sensor: 0
  • sourcenode: 0

Which one is The Motion sensor and how to report Motion and change state?

The problem you are expiring is because philio motion sensors triggers on movement but nothing is sent when the motion detection is resetted, so there will be no 'off' event.
The result is that home-assistant does not report a state change because it was changed from 'on' to 'on'.
We implemented a workaround that sets the state to off after a period of time so that a state change will be reported on the next movement detected.
To enable this for your device I need to know what device_id and sensor index you have in you zwcfg_XXXXX file.
Could you post the corresponding section from the xml so I can see the values?

They need to be added here:
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/binary_sensor/zwave.py#L30

If you would like to try to fix it by yourself.

I think this is the part you are looking for (correct?):

PST02-A 4 in 1 Multi-Sensor.xml.txt

There is also a second option to use for this:
The node_event. This is an event triggered by the command_class_basic, and can be utilized the same way as any binary_sensor to automate.
The data contains an object_id(in your case:philio_technology_corporation_pst02-a_4_in_1_multi-sensor_13) and a basic_level(0 equals off and 255 equals on)
Look in your logs for zwave.node_event

If you want it to work properly in the frontend, the change @stefan-jonasson suggested is the correct.

@opdoffer Could you try my updated version from my repository:
https://github.com/stefan-jonasson/home-assistant.git ?

I'll test it today. Let you know the outcome. Many thnx for your help in advance. Much appreciated :)

I couldn't notice much difference. No statechanges or what so ever. Will investigate more thorough.

@opdoffer Could you set the use_debug param to true for the z-wave component and watch the console output for when the sensor should be triggering?

Thx I didn't know this option. I will set it. I found this issue on another forum: http://www.domoticz.com/forum/viewtopic.php?t=10158

They can manage and solve it within Domoticz by changing the sensor type.

I'm sure now that the burglar sensor is the one I'm looking for. I will troubleshoot it with ozwcp maybe this will give me more info.

Tonight I have time tot test it. Again thnx for your help. I think we are close.

Hi, not so sure about that it's the burglar sensor you are looking for, that sensor is triggering when you remove it from the wall. The rest of the comments was describing the same problem that we're trying to solve here. It could be a combination of both problems. Anyway we'll know for sure when we get the debug output!

Hi Stefan. I did some debugging this evening and logged with Open Wave Control Panel and with HASS in debug mode for de zwave component. Please check the file (with both ozwcp and hass output combined). I grepped for 'zwave' keyword. Please note that node 4 and node 13 are sensors that should report PIR.

I hope that these logs are useful:

node13 node4- debug.txt

PS: still running your version 0.31.0.dev0

Hi! I couldn't see any triggering events in your debug output. They could still be there just that I missed it.
But it's a simpler way, if you just set both sensors that might be the PIR sensor to off in HA and then make the sensor trigger on motion if, one of them changes then my solution will work if I just change it to the right value index, If nothing happens, then I'm clueless how to fix it.

I have the same sensor. I've gotten it to work in an unmodified HA by changing a configuration value on the sensor, and adding some template rules to my HA configuration. Please see details at https://community.home-assistant.io/t/philio-output-explanation/3304/3.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raccettura picture raccettura  Â·  142Comments

aguilaair picture aguilaair  Â·  162Comments

gieljnssns picture gieljnssns  Â·  277Comments

Bergasha picture Bergasha  Â·  176Comments

abouelric picture abouelric  Â·  165Comments