ZigBee Arrival Sensor For Car

@mbishop, It is strange that you can go back to the old antenna show some information. Sometime old antenna loose its integrity. In this case, you may have some good connection for sometime. And, in some other time, you have bad connection.

Please turn on your logs. You will know whether your sensor is paired sooner. The sensor that joined successfully will have logs comes in once every 10 or 40 seconds. I would do this first. If you are seeing this, I would not do any joining process again. Your sensor is in the Zigbee mesh.

If you are not seeing any logs, you should start another paring process without resetting the sensor. If you do not see the sensor is discovered again, it could have joined successfully. You can try to click configure on the device page. It seems that you may have some issue with the antenna. Not all packets needed during the join process went through.

If you do not have luck getting paired on that location, you can try to move the sensor to different locations. There may be repeaters around the area where the repeater drops important packets during joining procedure.

1 Like

Yes, I am seeing events. After re-pairing (before I saw your message), shock appeared as well. I think I'm in business!

1 Like

Thank you. BTW, while you have your logs, may I have a favor from you? If you catch one log like below with the green arrow, let me know if you are seeing any error. It is the temperature data. The cluster is 402.

I see the cluster:0402 events, but I don't see an error from them. I did get an error when it was first paired, though:

dev:16692022-05-12 08:59:27.028 pm infoparse [raw:BC510100010820002018, dni:BC51, endpoint:01, cluster:0001, size:08, attrId:0020, encoding:20, command:0A, value:18, clusterInt:1, attrInt:32]

dev:16692022-05-12 08:59:20.236 pm errororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_iharyadi_Arrival_Sensor_HA_1485.isNotPresent() is applicable for argument types: () values: [] (method isNotPresent)

dev:16692022-05-12 08:58:45.584 pm infoparse [raw:BC510104020C0000291501, dni:BC51, endpoint:01, cluster:0402, size:0C, attrId:0000, encoding:29, command:01, value:0115, clusterInt:1026, attrInt:0]

Haven't seen any repeats of it since.

2 Likes

Thank you.

1 Like

@iharyadi

Would it be possible to decrease the sensitivity of the shock sensor?

Not from software.

There is a capacitor that you can install. It is on C9. However, the value of the capacitor must be carefully selected. Otherwise, it would be too insensitive. If you are doing this, you may need either collection of capacitor to install it to your liking. Or, we can calculate the RC time constant to estimate some sort of detection sensitivity.

Is there specific scenario that require you to adjust the sensitivity?

Well at first I thought the vibration from my pc was setting it off, as I am powering it on an old desktop while I attempt test and see if everything is working. I however moved the module and shock sensor still is not clearing.

Is there anything in these logs that indicates it is constantly sensing a shock?

image

It should print cluster 0x000F. Please turn on your log for sometime. Then, we can search for cluster 0x000F.

It will send data the vibration has stop. Now, I am not immediately set the attribute to clear. I wait for 2 minutes to clear it in the DTH (not in the form firmware)

1 Like

Well got to test a little today... 1st time driving since I've been sick. Was about a block away when I got notification I was gone (I'll put that down to the default 7 min time out) The moment I pulled up in front of my house it notified me I was back.... I'd say first test success.

2 Likes

Thank you for the update. I am glad the first test went successfully.

I want to double check with you about the timeout. There are 2 timeouts. One when the sensor is on DC. The other is when the sensor on battery. When your car started, the sensor should be in DC mode. The timeout while you are leaving should be 1 minute by default. The sensor is designed to have a power supply that is switched on when the car started.

Thanks
Iman

I only had it on battery. Haven't tested dc

1 Like

Got it. Just FYI, the sensor designed to use DC power in its workflow. It cannot be used with the battery primarily.

While on battery, the sensor will attempt to connect back home for only 15 minutes after it lost connection to parent. After that, it will sleep. This is done to conserve battery. While we are not home and the car is park for hours (perhaps days, like if we park the car in airport while we are off to some other city), the battery will not get drained in this type of case.

In a parked case like above, as soon as the car is started and DC power is available, then, the reconnection attempt is continued. At this point, it is reasonable to assume that the car may on the way back home. Therefore, the sensor should try to connect back to home Zigbee network.

2 Likes

Oh, I get that... This was just a small test for me... I'll be setting it up normally.

1 Like

Thanks -- these batteries work perfectly if you're using the red/pink boxes recommended by @iharyadi.

2 Likes

Yes, this is how I understood it also. I was using the cigarette lighter, but apparently the cigarette lighter in this car is always on. Yuck.

1 Like

I never used the this converter. It is suggested by @Sebastien. The idea is to tap into fuse line for car peripheral that are switched on/off.

https://www.amazon.com/dp/B072J3L2JN

Another idea for your case is to modify the DTH. This is a software change. We can switch to more aggressive timeout in DTH when there is vibration. However, You would loose the capability to distinguished whether the car engine has been started. This is power event for me is important. I would not want to loose the event. For me, I can ignore notification such as vibration and motion. I can just turn on my porch light when this happen in the middle of the night. But, if the car is started, I know that I want to be woken up regardless what happen.

1 Like

Same with mine. So I just use an inline USB switch.

1 Like

_liveModern

2 Likes

New problem, with possible solution. The sensor is installed in the car and reliably reports power and shock. (And temperature, though the numbers seem a bit dubious and I don't much care.) However, it doesn't ever seem to change the present/away state. Having looked at the driver code, this appears to be handled by a periodic task. My guess would be that this task was not actually being executed, and indeed, there was nothing in the Scheduled Jobs section at the bottom of the device.

I see the timer gets set by the call to handlePresenceEvent(), but what happens if there never is a presence event to handle in the first place? I would suggest adding stopTimer() and startTimer() to the refresh() method -- after doing that in my local copy, the scheduled job is now present.

1 Like