Multipurpose sensor

Hi i have a Samsung Multipurpose sensor, i like to have on My garage port. I hav not Mounted yet, I can see on ZHA_events that it do come out with readings on movement.
I do have my setup for zigbee (not mqtt), can somebody help me out to set up a node, so when it’s moving out of a position when my port is open so I can activate a light I have in my garage

If you are using zigbee then I highly recommend using zigbee2MQTT. It works extremely well and is almost trivial to setup. With that running you use the standard MQTT nodes to access the devices.

1 Like

I have try to learn how to setup mqtt, but I don’t get it :confused: There is to much different documentation, I have my setup in docker (iotstack)on a raspberrypi 4 8gb with a conbee2 my zigbee devices I have setup runs to zha deconz (do I comment it out with# in my docker-compose.yml file I have the container mqtt and zigbee2mqtt. Do I setup a user under my user in Ha (user_mqtt)?? I have try to find mqtt files, but for all of them it returns with ‘no assess’ (idk if it because I do my search on my win laptop over terminal) or do I just add something to cd ./IOTstack/docker-compose.yml file
I’m kinda lost in it, I have try to read a lot of instructions and watch many YouTube videos. And mabye to much to keep it simple

I don't use Docker or HA so I can't help much if you want to go that route.

For an excellent tutorial that will tell you everything you need to know about working with MQTT (but not installing it) see MQTT Essentials - All Core Concepts explained

I use Mosquitto as the MQTT broker which is usually trivial to install.

1 Like

It's worth learning, MQTT is the bee's knees.

1 Like

OK showus your docker compose so we can see which containers out of the iotstack you are running and can then give some better advice.

I would also suggest that you rcheckout the iotstack discord server as they are pretty good on there with Newbies

Craig


OK so you have got all the necessary containers running (including MQTT) and Node Red.

So can you take us through what you have done ?

  1. Assume you have some form of Zigbee Hub/receiver running - if so which one and where is it connected ?

  2. Assume you have registered the Samsung Sensor on the Zigbee network ?

thank you :slight_smile:
yes i have a conbee2 stick on dev/ttyACM0 connected to my rpi 4.
yes the sensor is connected to my ZHA, all of my devices are connected to zha. I don't mind if i have to move all to MQTT if neede :slight_smile:
I thing all of them are run through deconz container, even if I have not setup Phoscon/Deconz (do I mark it out the container out with #)??

Well it looks like you have everything you need to get your data into MQTT - it should be automatically happening

Can you load up MQTT explorer (I assume you are on Windows) and then point it to the IP Address of the PI on Port 1883 and see what it is seeing ?

Craig

when I go to 192.168.50.15:1883 it say can not connect to page??

Is that using MQTT explorer ?

You can not connect using a browser etc to that address

Craig

I don’t know how to use mqtt or set it up :face_with_peeking_eye::face_with_peeking_eye:

MQTT is already setup as part of your IOTSTACK - it is called Mosquitto

I am asking you to install in windows a program called MQTT explorer

Craig

To learn more about MQTT then see this essential reading MQTT Essentials - All Core Concepts Explained

hehe yes okey, it is installed on windows and connectede via my ip 192.168.50.15 :slight_smile: :+1:
do I reconnect my devices here??

Well based on the IOTSTACK that you have deployed your devices should be communicating through the MQTT broker (Mosquitto) now.

So what you want to do is setup a connection in MQTT Explorer to point to that IP address on the correct port as i stated and in the left hand window you should be able to see a whole heap of topics that these devices are talking on - here is mine for instance

image

mine is look like this, but there is no devices in it :upside_down_face: :upside_down_face

Yes there is - look at the load under broker - expand that p what are the 63 messages about ?

Craig

Do you also have HA running on the Pi? If so, is the Conbee stick already talking to HA? If it is, then you can filter the events all node in the HA add-on to listen to the Conbee traffic, then pull out what you need from there. No need to go down the MQTT route if you don't want to.



image

I use the above to monitor simple Zigbee remote push buttons. With a little trial and error you can easily filter out the commands or sensor outputs you need to trigger your outbound flow (Turn a light on)