@lolouk44 Sorry if this has been asked somewhere in the thread, I had trouble finding a direct answer.
If I do implement the XiaomiFang hack on my WyzeCam V2s, in the simplest of instructions, how can I integrate it to Home Assistant AND still have the ability to get Motion detection alerts (and have HA react to said alerts)?
Also, would live recording and storage work as expected if I have the SD card in? So, I’d be able to access the motion-triggered x-second clips and continuously recorded hours from the card via HA or my phone?
(This should be an easy answer). Also, I imagine that I could easily create a script in HA to toggle between nightvision & regular to make up for the lack of automatic switching on the XiaomiFang software?
If I do implement the XiaomiFang hack on my WyzeCam V2s, in the simplest of instructions, how can I integrate it to Home Assistant AND still have the ability to get Motion detection alerts (and have HA react to said alerts)?
Easiest is to set up MQTT and use the discovery.
Also, would live recording and storage work as expected if I have the SD card in? So, I’d be able to access the motion-triggered x-second clips and continuously recorded hours from the card via HA or my phone?
Not sure if this is available from bog standard hacked firmware, I personally use motion for this and save recordings to dropbox
(This should be an easy answer). Also, I imagine that I could easily create a script in HA to toggle between nightvision & regular to make up for the lack of automatic switching on the XiaomiFang software?
Once point 1. has been completed you’ll have full access to the camera functions
I’ve yet to take a look at MQTT, but it’ll be able to react to the motion triggers?
Also haven’t looked into Motion, but how does it work? And How do you cap the number of videos or storage space allowed for the uploaded videos before having the older ones overwritten?
I’ve yet to take a look at MQTT, but it’ll be able to react to the motion triggers?
Yes
Also haven’t looked into Motion, but how does it work? And How do you cap the number of videos or storage space allowed for the uploaded videos before having the older ones overwritten?
Motion itself doesn’t manage video storage but I have a script that will delete any video that’s over 7 days: find /home/cctv/Dropbox/RPi/motion/ -maxdepth 1 -type f -mtime +7 -exec rm '{}' -f \;
First, I want to say thank you so much for being some forth-coming, helpful, and just generally willing to answer my questions
Last follow-up (until I progress further on my project), how would you modify the script to save videos to a NAS (and so it stores new & deletes older recordings) instead of Dropbox?
Sorry if any other the questions sound silly or newb-ish. I’m very new to the community, but like to get a full understanding of the interactions and workings before I dive deep into my projects. I’ve yet to receive most of my components, so I figured now would be the best time to get thoroughly antiquated with them and the functionality that I want to implement with them.
I use the motion application to detect motion on a video feed and record the video feed (I know it can be a bit confusion). in motion, there is a setting to tell is where to save the videos.
If you prefer, you can use ZoneMinder which does pretty much the same thing.
Once you’ve decided where to save the videos, you can adjust the script to point at the same location
Need help. Where should I add this code- as a switch, sensor or script? Also Dafang Living Room Left Right gives and error and is requiring a state topic. should be it be state_topic: “LivingRoom/DaFang/status”
I’ve set them as switches
You code (which you really should format using that blue bar on top) does not have a state_topic for Living Room.
Check the Kitchen code and you’ll see the missing line
I made a small app that subscribes to motion topics of the camera via MQTT and detects objects in the snapshot. Detected objects are then published via MQTT. Object detection is based on Yolo network (darkflow implementation).
Will upload the stuff on GitHub, in case anyone is interested.
Well this does not work for me. So I played around and found the file were mqtt topics and commands available. It is in \firmware_mod\scripts folder and file is mqtt-autodiscovery.sh. Just a text editor and open the file and you will see command topics and state topics for each item.
The code that work for me (I want to add seperate key for each movement) is given below. I have included these as swtiches.yaml and add these to group.yaml to get to the frontend
Note: “dafang2” is the DEVICE_NAME and “myhome” is the LOCATION I defines in config/mqtt.conf
my config given above work. What I said is what @lolouk44 provided does not work for me. I written here the solution that work for me so that if someone need it they could use it. Not sure why a bullet point replace - . It should be “-”
Sorry for a very basic question, but Ihave a couple of Dafang Camera I would like to integrate into HA.
I can see two hacks in this thread. One by EliasKotlyar and the samtap hack, which is first mentioned i this thread. Which one i recommened?