desiw
(Desiree Heckmann)
August 20, 2018, 7:31pm
1
Hi,
I need your help with a switch item and mqtt. I have a Xiaomi Dafang Camera and installed following hack:
I want use mqtt for the settings, but my switch item does not work.
Switch GF_Camera1_Motion “Camera1 Motion” (EnergyValues) {mqtt=">[mosquitto:GF_FF/Camera1/motion/detection:command:*:default], >[mosquitto:GF_FF/Camera1/motion/detection:state:default]"}
MQTT Lens shows:
The log shows:
Thank you in advance!
Désirée
123
(Taras)
August 20, 2018, 7:40pm
2
Switch GF_Camera1_Motion “Camera1 Motion” (EnergyValues) {mqtt=">[mosquitto:GF_FF/Camera1/motion/detection:command:*:default], >[mosquitto:GF_FF/Camera1/motion/detection:state:default]"}
The MQTT binding information uses “> ” twice. Try changing the second “> ” to “< ”.
Switch GF_Camera1_Motion “Camera1 Motion” (EnergyValues) {mqtt=">[mosquitto:GF_FF/Camera1/motion/detection:command:*:default], <[mosquitto:GF_FF/Camera1/motion/detection:state:default]"}
A question for you, what kind of motion detector is this that accepts commands? In other words, when you send it “ON”, what does it do with that command?
Would a Contact Item correctly represent the Dafang’s motion detector?
desiw
(Desiree Heckmann)
August 21, 2018, 7:25am
3
Hi Taras,
thank you very much for your tip. I will try tonight it (also as a contact item). In the dafang hack you have several settings like motion detedtion, led, night vision. I want set the settings via mqtt. Motion detection should be switched off when I am at home.
Kind regards
Désirée
job
(Joachim Boeddeker)
September 2, 2018, 6:00pm
4
Here are my items:
Switch CAM01_LEDS_BLUE "cam01 leds/blue [%s]" {mqtt=">[broker:cams/cam01/leds/blue/set:command:*:default], <[broker:cams/cam01/leds/blue:state:default]"}
Switch CAM01_LEDS_YELLOW "cam01 leds/yellow [%s]" {mqtt=">[broker:cams/cam01/leds/yellow/set:command:*:default], <[broker:cams/cam01/leds/yellow:state:default]"}
Switch CAM01_LEDS_IR "cam01 leds/ir [%s]" {mqtt=">[broker:cams/cam01/leds/ir/set:command:*:default], <[broker:cams/cam01/leds/ir:state:default]"}
Switch CAM01_IR_CUT "cam01 ir_cut [%s]" {mqtt=">[broker:cams/cam01/ir_cut/set:command:*:default], <[broker:cams/cam01/ir_cut:state:default]"}
Number CAM01_BRIGHTNESS "cam01 brightness [%s]" {mqtt="<[broker:cams/cam01/brightness:state:default]"}
Switch CAM01_RTSP_H264_SERVER "cam01 rtsp_h264_server [%s]" {mqtt=">[broker:cams/cam01/rtsp_h264_server/set:command:*:default], <[broker:cams/cam01/rtsp_h264_server:state:default]"}
Switch CAM01_RTSP_MJPEG_SERVER "cam01 rtsp_mjpeg_server [%s]" {mqtt=">[broker:cams/cam01/rtsp_mjpeg_server/set:command:*:default], <[broker:cams/cam01/rtsp_mjpeg_server:state:default]"}
Switch CAM01_NIGHT_MODE "cam01 night_mode [%s]" {mqtt=">[broker:cams/cam01/night_mode/set:command:*:default], <[broker:cams/cam01/night_mode:state:default]"}
Switch CAM01_NIGHT_MODE_AUTO "cam01 night_mode/auto [%s]" {mqtt=">[broker:cams/cam01/night_mode/auto/set:command:*:default], <[broker:cams/cam01/night_mode/auto:state:default]"}
Switch CAM01_MOTION_DETECTION "cam01 motion/detection [%s]" {mqtt=">[broker:cams/cam01/motion/detection/set:command:*:default], <[broker:cams/cam01/motion/detection:state:default]"}
Switch CAM01_MOTION_SEND_MAIL "cam01 motion/send_mail [%s]" {mqtt=">[broker:cams/cam01/motion/send_mail/set:command:*:default], <[broker:cams/cam01/motion/send_mail:state:default]"}
Switch CAM01_MOTION_TRACKING "cam01 motion/tracking [%s]" {mqtt=">[broker:cams/cam01/motion/tracking/set:command:*:default], <[broker:cams/cam01/motion/tracking:state:default]"}
String CAM01_VERTICAL "cam01 vertical" {mqtt=">[broker:cams/cam01/motors/vertical/set:command:*:default]"}
String CAM01_HORIZONTAL "cam01 horizonzal" {mqtt=">[broker:cams/cam01/motors/horizontal/set:command:*:default]"}
Switch CAM01_ACTION "cam01 action" {mqtt=">[broker:cams/cam01/set:command:*:default]"}
sitemap test label="test"
{
Frame label="test"
{
Switch item=CAM01_LEDS_BLUE
Switch item=CAM01_LEDS_YELLOW
Switch item=CAM01_LEDS_IR
Switch item=CAM01_IR_CUT
Text item=CAM01_BRIGHTNESS
Switch item=CAM01_RTSP_H264_SERVER
Switch item=CAM01_RTSP_MJPEG_SERVER
Switch item=CAM01_NIGHT_MODE
Switch item=CAM01_NIGHT_MODE_AUTO
Switch item=CAM01_MOTION_DETECTION
Switch item=CAM01_MOTION_SEND_MAIL
Switch item=CAM01_MOTION_TRACKING
Switch item=CAM01_HORIZONTAL mappings=["left"="links","right"="rechts"]
Switch item=CAM01_VERTICAL mappings=["up"="hoch","down"="runter"]
Switch item=CAM01_ACTION mappings=["reboot"="Reboot"]
//Video url="rtsp://10.10.10.25:8554/unicast" encoding="mjpeg"
}
}
I did not manage to get the video running. Did you?
Is this camera still recommended in 2019?
matt1
(Skinah)
May 20, 2019, 5:23am
7
That depends on the features that you wish to have without needing an extra server to process the video for motion detection. In most cases it is only $30-60 more for a camera that can do a whole lot more. See this post…
This binding is now merged into openHAB 2.5.9 and newer.
See below for more details on what each brand of camera has working as often choosing the right camera will save you from needing to purchase an extra video server (both the cost to purchase the server, plus the ongoing electricity costs) to process the video feeds.
Features for Generic cameras with only RTSP (no snapshot url):
Snapshots (jpg) can be created from RTSP with low CPU overhead but requires non stop network traffic to keep …
If you can DIY then these esp32 based cameras are cheap and appear to have ready made firmwares to flash to it as well as example source code built into the Arduino IDE.
Your my new best friend. PS do your friends get free cameras ?
Will have to check Zoneminder and also the Motion project out one day as they have advantages (as well as disadvantages like heat and cost of server) for sure especially when you have 15 cameras.