edited
The main settings that you need would be (these are examples):
netcam_url rtsp://192.168.0.33:8554/unicast (IP of the Dafang) stream_port 8081(1 port per camera, so next cam would 8082 for example) stream_maxrate 5 this is the max frame rate for the stream (the recording would be at full frame rate) stream_localhost off this is to ensure you can also access the stream on a different machine than the one where motion is running.
The other options you can change to suit your needs (e.g. record on motion detection or not, whether you want text / timestamp etc to be displayed on the video, where you’ll save the recordings,…)
Probably best to check this page for more info on the config options.
if you get a connection refused it’s either before your stream is limited to localhost, so make sure you have stream_localhost off.
Another way to check is to log on the server that runs motion, open a web browser then see if you can access http://localhost:8080 and if you can access http://IP-Address:8080
If both fail, make sure you’ve restricted access to registered users (see here) at least for setup. You can always lock down later as you wish
Yea both are not working still “ERR_CONNECTION_REFUSED”.
So I have to set a passowrd for webcontrol_authentication? I have done that and it’s still not working… I am still thinking it’s not working cause off HTTPS?
Just invited you to discord for a chat, would be easier.
In the meantime, https from HA has nothing to do with motion
For now you need to forget HA while trying to set motion up.
I’m logged on discord now if you’re available.
Hi I have order a Dafang camera its in the way.
When I read the install it says:
The microSD card you have to format in FAT
I have a 8GB sdcard I can’t format in FAT but in FAT32 should it work?
Thanks
Can you help with mqtt config file in SD storage and configuration in HA ,
and problem with camera:
platform: ffmpeg
name: Cam
input: -rtsp_transport tcp -i rtsp://192.168.x.x:8554/unicast
if using motion in the middle, your config should look like this:
First I would suggest you try and use the MJPEG option on the camera itself if you’re going to integrate directly in HA.
This will be easier for first implementation.
You will also need to ensure you’ve installed ffmpeg on your HA server for this to work.
Make sure you stop the H264 stream first, as per the message on your screenshot.
(I take it 10.0.0.90 is the IP of your camera, not your HA server)
For your MQTT settings, make sure you’ve correctly populated the mqtt.dist file on on the SD card and renamed it into mqtt (no extension). This might be your issue here since MQTT Control comes up in red.
need to install ffmpeg .ok i will do it
2.ip for camera 10.0.0.90 ip for HA 10.0.0.201
3.i rename the mqtt.dist to mqtt but iam not sure what i put inside the file and the HA config for that
Inside the mqtt file you need to put the details of your mqtt broker. If you don’t have any yet, you can use your HA’s own broker, or you can sign up for a free account on www.cloudmqtt.com
I know this is a bit off-topic, but I hope this will help some people: As for people having issues getting the custom firmware to work, I have had the same problem. If you screw things up it is extremely annoying to debug this since you don’t have access to any log files if you need to find what you did wrong (also a lot of documentation is in Chinese).
What worked for me was creating a fat16 partition of 100mb (as some one suggested in this thread, thank you so much) on my fake Samsung sd-card I got with the camera (AliExpress). I used gparted for this. In the beginning I actually thought it was my SD card but I got it working anyway using this method. Please keep in mind that even with this SD card of shady quality flashing took less than a minute and not 5 (or even 10) minutes as is written in some guide.
For the reset button, hold it 10 seconds in advance and 10 seconds after plugging in (just to be sure, it will work when you press it for a shorter period of time).