Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


peejayw

1913 posts

Uber Geek
+1 received by user: 123


#311755 12-Feb-2024 10:14
Send private message

I am trying to use an Aqara Zigbee Vibration sensor to monitor a letterbox door opening.

 

LHA only exposes a vibration sensor, not the tilt sensor I need to use.

 

If I listen to zha_events I can see two events I could possibly use........

 

event_type: zha_event
data:
  device_ieee: 00:15:8d:00:09:d3:44:20
  unique_id: 00:15:8d:00:09:d3:44:20:1:0x0500
  device_id: b5f6a6803fe24e090ff5a333a71ca516
  endpoint_id: 1
  cluster_id: 1280
  command: current_orientation
  args:
    rawValueX: 111
    rawValueY: 64613
    rawValueZ: 146
    X: 0
    "Y": 90
    Z: 0
  params: {}
origin: LOCAL
time_fired: "2024-02-11T20:53:42.656317+00:00"
context:
  id: 01HPCZ4ZM01YP8X1W1SGA16A7X
  parent_id: null
  user_id: null

 

and

 

event_type: zha_event
data:
  device_ieee: 00:15:8d:00:09:d3:44:20
  unique_id: 00:15:8d:00:09:d3:44:20:1:0x0500
  device_id: b5f6a6803fe24e090ff5a333a71ca516
  endpoint_id: 1
  cluster_id: 1280
  command: Tilt
  args:
    degrees: 113
  params: {}
origin: LOCAL
time_fired: "2024-02-11T20:53:38.470496+00:00"
context:
  id: 01HPCZ4VH6JMDV6DZGMM5090XE
  parent_id: null
  user_id: null

 

In Automations I can select Manual Event as a trigger and then I have to provide Event Type and Event Data, this is where I am totally lost, what do I need to put in here?
Thanks.





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


Create new topic
allio
895 posts

Ultimate Geek
+1 received by user: 529


  #3194224 12-Feb-2024 10:32
Send private message

It's probably possible but what you're trying to do is the hardest task to accomplish in HA (in my experience). Unless you're an absolute regex whizz you really want to use states rather than events wherever possible.

 

Have you tried using zigbee2mqtt instead of ZHA? It looks like it will properly expose the tilt measurements as states. Then you can do a straightforward "angle of sensor X > Y" automation.




peejayw

1913 posts

Uber Geek
+1 received by user: 123


  #3194227 12-Feb-2024 10:37
Send private message

No I havent tried it, only ZHA. I have quite a few zigbee devices set up under ZHA, is it possible to install Z2MQTT alongside ZHA nad just use for this sensor? Then if everything looks good I could convert my other devices bit by bit.





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


allio
895 posts

Ultimate Geek
+1 received by user: 529


  #3194243 12-Feb-2024 11:16
Send private message

You certainly can't use them simultaneously unless you have two different coordinators. You'd have to fully disable ZHA before installing and using Z2M. But there shouldn't be any problem with doing that, and if Z2M doesn't solve your problem it would be easy enough to just reenable ZHA and be back where you were.

 

Just make sure you take a fresh backup before you start fiddling.




huckster
886 posts

Ultimate Geek
+1 received by user: 460

ID Verified
Lifetime subscriber

  #3194296 12-Feb-2024 12:33
Send private message

Reddit says there is a Device tilted automation trigger?


peejayw

1913 posts

Uber Geek
+1 received by user: 123


  #3194324 12-Feb-2024 13:57
Send private message

I assume in that example he is using z2mqtt because ZHA (at least for me) does not expose a tilt sensor, only a vibration sensor.





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.