bkbilly / AlarmPI

🚨 Home Security Intrusion Detection for Raspberry PI or any other linux OS
http://bkbilly.github.io/AlarmPI/
MIT License
105 stars 13 forks source link

Mqtt and Home assistant #28

Closed Amorphous88 closed 1 year ago

Amorphous88 commented 1 year ago

Describe the problem

OS Version

AlarmPI version

Error Logs

Configuration

HI. could you be clearer how to configure the anti-theft and the mqtt file in home assistant to have all the features? i managed to interface it once but after a raspberry reboot, mqtt communication was lost and never came back. when there was communication, every time I entered as home assistant, the burglar alarm automatically excluded any sensor programmed inside it. i installed the latest updated version on raspberry pi os lite 64 bit ( Raspberry Pi 3a+) I am not getting any errors from the OS

Amorphous88 commented 1 year ago

update: I installed the AlarmPi device on Raspberry pi OS lite 32 bit and the problem remains the same.

Amorphous88 commented 1 year ago

Screenshot_2023-06-01-13-38-12-96_40deb401b9ffe8e1df2f1cc5ba480b12

Amorphous88 commented 1 year ago

Screenshot_2023-06-01-13-38-36-03_c3a231c25ed346e59462e84656a70e50

bkbilly commented 1 year ago

For MQTT to work and Home Assistant to discover it as a device you will have to configure AlarmPI like this: image

Make sure the HomeAssistant Integration is true and the button for MQTT on the top right is green. On Home assistant, the newly discovered device will be under the MQTT integration on the devices.

Amorphous88 commented 1 year ago

Screenshot_2023-06-02-15-37-33-14_40deb401b9ffe8e1df2f1cc5ba480b12 Hi, thankyou. I did as you say, but there are problems that I wrote to you. when I insert from the home assistant it excludes all the sensors in any type of insertion. if I restart Raspberry with OS alarmPi, the integration doesn't work anymore

bkbilly commented 1 year ago

Try changing the Authentication field to true, even though you might not have username/password authentication on your mqtt server.

Amorphous88 commented 1 year ago

Screenshot_2023-06-02-16-13-44-53_40deb401b9ffe8e1df2f1cc5ba480b12

I don't have active authentications. in fact, as soon as the system is installed and mqtt started with the credentials with home assistant, I have the states and commands, even if every time I insert from the home assistant all the sensors are automatically excluded in AlarmPi. it's when I restart alarmPi that everything is lost. This problem I'm experiencing is really strange and I haven't found a solution

bkbilly commented 1 year ago

I can't seem to understand what could be the reason for the problem you have. You could try, if possible, connect radpberry with ethernet.

Amorphous88 commented 1 year ago

of course, my Raspberry is always connected to the internet. if you want I can give you my email and let you connect with anydesk to my system

Amorphous88 commented 1 year ago

could it be the mqtt script in yaml configuration? i tried many times but nothing changed. when it works, however, the script is absent because home assistant detects everything automatically. do you enter it? how exactly do you write it to have all the states and commands?

bkbilly commented 1 year ago

You don't have to change anything on the yaml configuration, everything is changed by the UI. If you want to understand how the Home assistant discovers the commands, you will have to check their documentation. It's difficult to explain it here. I am curious about this problem so I could try connecting to your system to check why this is happening.

Amorphous88 commented 1 year ago

HI. my email is mario.naclerio@yahoo.it. let's get in touch so we can arrange the connection with anydesk

amorphous3004 commented 1 year ago

IMG_20230606_222626

amorphous3004 commented 1 year ago

IMG20230606222536

bkbilly commented 1 year ago

I didn't hear back from you, so I assume that the issue is fixed.