YooSee SD-M5 doorbell: 1080p, PoE, RTSP, Onvif, only $66

Ryco

n3wb
Joined
Nov 9, 2019
Messages
9
Reaction score
0
Location
Bc canada
sorry just figured it out, you just use root as the login name.
 

flynreelow

Known around here
Joined
Dec 12, 2016
Messages
1,198
Reaction score
1,086
Thanks @sp00025, I didn't realize it was that easy. I copy all the files in SDcard to my SD card root like your github README.md instructs. Then I added executable permissions to the scripts and binaries.
Then I added this script I named set_time to /mnt/disc1
Code:
#!/bin/sh

# Sync with local ntp server

    while true;
    do
        ntpd -q -p 192.168.10.1
        /mnt/disc1/busybox sleep 15
        ntpd -q -p 192.168.10.1
        T=$(date +"%Y-%m-%d %H:%M:%S")
        TZ='EST-5EDT-4,M3.2.0/02:00:00,M11.1.0/02:00:00'
        export TZ
        date -s "$T"
        /mnt/disc1/busybox sleep 21600
    done
Then I edited the dhcp.script in /npc like this.
Code:
#!/bin/sh

# udhcpc script edited by Tim Riker <Tim@Rikers.org>

[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1

RESOLV_CONF="/mnt/ramdisk/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"

case "$1" in
    deconfig)
        /sbin/ifconfig $interface 0.0.0.0
        killall telnetd
        ;;

    renew|bound)
        /sbin/ifconfig $interface $ip $BROADCAST $NETMASK

        if [ -n "$router" ] ; then
            echo "deleting routers"
            while route del default gw 0.0.0.0 dev $interface ; do
                :
            done

            metric=0
            for i in $router ; do
                route add default gw $i dev $interface metric $((metric++))
            done
        fi

        echo -n > $RESOLV_CONF
        [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
        for i in $dns ; do
            echo adding dns $i
            echo nameserver $i >> $RESOLV_CONF
        done

        echo "** Start telnetd"
        /usr/sbin/telnetd
        echo "** Disable WLAN"
        /sbin/ifconfig wlan0 down
#       echo "** Start ftpd"
#       /mnt/disc1/busybox tcpsvd -vE 0.0.0.0 21 ftpd -w /
#       echo "** Start monitoring"
#       /mnt/disc1/MONITORING/parse_push &
        echo "** Start Cron"
        /mnt/disc1/busybox crond -L /mnt/disc1/CRON/cron.log -l 0 -c /mnt/disc1/CRON/
        echo "** Start ntpd"
        /mnt/disc1/set_time
        ;;
esac

exit 0
The line
Code:
echo "** Start ntpd"
/mnt/disc1/set_time
kicks off my script and syncs time every 6hrs to my local ntp server.
I was wrong about being able to use trial and error to set sleep(1) just right so UTC0 time would never be displayed and time sync would be seamless. Unfortunately ntp isn't able to sync in the same amount of time every time so I actually had to add extra time to sleep just to make sure ntpd had enough time to set UTC0 before running the rest of the script. This is why I chose to run the script every 6 hrs instead of every 15 mins, I don't think there is anyway to make the time sync seamless where UTC0 time is never displayed. UTC time is only displayed for a second or two every 6 hrs, no way around it I guess. ¯\_(ツ)_/¯

Maybe if I have more time I'll figure out Cron and use that instead of a while loop. Using while is a very inefficient why of creating a loop.

i know ZERO about coding and everything you are doing above. are you able to add all of this into a custom firmware that could be downloaded and loaded from the SD card?
 

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
I might be wrong about this, but it appears to me you can install the patched FW without the app by powering on the device with the SD card inserted with the npcupg.bin file on it and holding down the reset button on the back of the device for about 30 seconds then letting it run for a few mins.
 

flynreelow

Known around here
Joined
Dec 12, 2016
Messages
1,198
Reaction score
1,086
I might be wrong about this, but it appears to me you can install the patched FW without the app by powering on the device with the SD card inserted with the npcupg.bin file on it and holding down the reset button on the back of the device for about 30 seconds then letting it run for a few mins.
using the app would be fine too, but just wondering if all your time fixes would be added to the bin file that could easily be updated
 

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
just wondering if all your time fixes would be added to the bin file that could easily be updated
If your not comfortable with Linux in command line this will be a steep learning curve. I broke down exactly what I did in the post above, so if it doesn't make sense to you and you can't follow your probably going to have a really hard time.
We all have to start somewhere though. My first experience in a Linux shell was setting up a VPN on a remote server. What memories. I had no idea what I was doing. And vi isn't the easiest editor to figure out either.
 
Last edited:

mrxyz

Getting the hang of it
Joined
May 4, 2020
Messages
72
Reaction score
79
Location
Island
Thanks @sp00025, I didn't realize it was that easy. I copy all the files in SDcard to my SD card root like your github README.md instructs. Then I added executable permissions to the scripts and binaries.
Then I added this script I named set_time to /mnt/disc1
Code:
#!/bin/sh

# Sync with local ntp server

    while true;
    do
        ntpd -q -p 192.168.10.1
        /mnt/disc1/busybox sleep 20
        ntpd -q -p 192.168.10.1
        T=$(date +"%Y-%m-%d %H:%M:%S")
        TZ='EST-5EDT-4,M3.2.0/02:00:00,M11.1.0/02:00:00'
        export TZ
        date -s "$T"
        /mnt/disc1/busybox sleep 21600
    done
Then I edited the dhcp.script in /npc like this.
Code:
#!/bin/sh

# udhcpc script edited by Tim Riker <Tim@Rikers.org>

[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1

RESOLV_CONF="/mnt/ramdisk/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"

case "$1" in
    deconfig)
        /sbin/ifconfig $interface 0.0.0.0
        killall telnetd
        ;;

    renew|bound)
        /sbin/ifconfig $interface $ip $BROADCAST $NETMASK

        if [ -n "$router" ] ; then
            echo "deleting routers"
            while route del default gw 0.0.0.0 dev $interface ; do
                :
            done

            metric=0
            for i in $router ; do
                route add default gw $i dev $interface metric $((metric++))
            done
        fi

        echo -n > $RESOLV_CONF
        [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
        for i in $dns ; do
            echo adding dns $i
            echo nameserver $i >> $RESOLV_CONF
        done

#       echo "** Start telnetd"
#       /usr/sbin/telnetd
        echo "** Disable WLAN"
        /sbin/ifconfig wlan0 down
#       echo "** Start ftpd"
#       /mnt/disc1/busybox tcpsvd -vE 0.0.0.0 21 ftpd -w /
#       echo "** Start monitoring"
#       /mnt/disc1/MONITORING/parse_push &
#       echo "** Start Cron"
#       /mnt/disc1/busybox crond -L /mnt/disc1/CRON/cron.log -l 0 -c /mnt/disc1/CRON/
        echo "** Start ntpd"
        /mnt/disc1/set_time
        ;;
esac

exit 0
The line
Code:
echo "** Start ntpd"
/mnt/disc1/set_time
kicks off my script and syncs time every 6hrs to my local ntp server.
I was wrong about being able to use trial and error to set sleep(1) just right so UTC0 time would never be displayed and time sync would be seamless. Unfortunately ntp isn't able to sync in the same amount of time every time so I actually had to add extra time to sleep just to make sure ntpd had enough time to set UTC0 before running the rest of the script. This is why I chose to run the script every 6 hrs instead of every 15 mins, I don't think there is anyway to make the time sync seamless where UTC0 time is never displayed. UTC time is only displayed for a second or two every 6 hrs, no way around it I guess. ¯\_(ツ)_/¯

Maybe if I have more time I'll figure out Cron and use that instead of a while loop. Using while is a very inefficient why of creating a loop.
There is a bug in your script. If you call set_time like that setting environment variables won't work. You should "source" the set_time script and the npc binary should be called / sourced from the same script in order to use the environment variables. See for example.
 

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
There is a bug in your script.
You could be right, I'll have to research it some more. Calling a script from within a script is not something I usually do, but from what I can tell through testing it doesn't seem to matter whether I source /mnt/disc1/set_time or not from inside dhcp.script, it uses the variables consistently either way. ¯\_(ツ)_/¯ But from my understanding of what I've read so far regarding source it doesn't seem to apply to this situation, sourcing is used in the few cases where you want a script to affect the shell you are running it from, but I'm not trying to pass variables from set_time.sh to dhcp.script and I'm using the absolute path rather than a $PATH variable to execute the script. I also want it running as a separate process.

I did find two other issues with my script though... I needed to add a sleep 5 to the beginning of the script because sometimes the script runs before the network is up after a reboot. I also realized I needed to add unset TZ to the end of the the loop. Other wise it would subtract my TZ offset from the previously set TZ offset essentially doubling the offset once the script looped. I edited my set_time script in the post you quoted just incase someone tries to use it via copy paste before they get around to seeing this one.

This script below works for me repeatably. I tested by setting sleep 60 and let it loop every 60secs for an extended period of time, I also gave it about 20 reboots. If it doesn't work for you add a few more seconds to sleep. Your ntp server might take longer to respond than mine.
Bash:
#!/bin/sh

# Sync with local ntp server

    /mnt/disc1/busybox sleep 5

    while true;
    do
        ntpd -q -p 192.168.10.1
        /mnt/disc1/busybox sleep 8
        ntpd -q -p 192.168.10.1
        T=$(date +"%Y-%m-%d %H:%M:%S")
        TZ='EST-5EDT-4,M3.2.0/02:00:00,M11.1.0/02:00:00'
        export TZ
        date -s "$T"
        /mnt/disc1/busybox sleep 10800
        unset TZ
    done
 
Last edited:

u158291

n3wb
Joined
Aug 8, 2021
Messages
1
Reaction score
0
Location
UK
Thank you to @mrxyz for the detailed post on how to connect to the serial console and to fix the frame rate drop. I managed to muddle my way through with firmware version 13.1.1.36 and various free/trial software (IDA free did not want to do it). I was really hoping that this would have fixed the below problem which is what started me down this rabbit run but it didn't.

Would someone mind seeing if their YooSee doorbell camera has the below problem using ffprobe or ffplay and if you do not please could you tell me what firmware you are using? I get the below message repeated for a good few seconds before the ffplay manages to a valid frame then it seems to be stable. It is, however, causing a bigger problem for mpromonet/webrtc-streamer which simply can't get a valid stream at all.

FFPLAY:

[h264 @ 0x7fdbac0576c0] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4d5e40] mb_type 32 in P slice too large at 1 0
[h264 @ 0x7fdbac4d5e40] error while decoding MB 1 0
[h264 @ 0x7fdbac060b80] illegal modification_of_pic_nums_idc 8
[h264 @ 0x7fdbac060b80] decode_slice_header error
[h264 @ 0x7fdbac060b80] no frame!
[h264 @ 0x7fdbac4d5e40] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4ca6c0] reference overflow 17 > 15 or 0 > 15
[h264 @ 0x7fdbac4ca6c0] decode_slice_header error
[h264 @ 0x7fdbac4ca6c0] no frame!
[h264 @ 0x7fdbac4d1340] P sub_mb_type 13 out of range at 4 0
[h264 @ 0x7fdbac4d1340] error while decoding MB 4 0
[h264 @ 0x7fdbac4d5e40] illegal modification_of_pic_nums_idc 8
[h264 @ 0x7fdbac4d5e40] decode_slice_header error
[h264 @ 0x7fdbac4d5e40] no frame!
[h264 @ 0x7fdbac060b80] reference overflow 17 > 15 or 0 > 15
[h264 @ 0x7fdbac060b80] decode_slice_header error
[h264 @ 0x7fdbac060b80] no frame!
[h264 @ 0x7fdbac4d1340] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac0576c0] mb_type 27 in P slice too large at 2 0
[h264 @ 0x7fdbac0576c0] error while decoding MB 2 0
[h264 @ 0x7fdbac0576c0] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4ca6c0] P sub_mb_type 32 out of range at 18 0
[h264 @ 0x7fdbac4ca6c0] error while decoding MB 18 0
[h264 @ 0x7fdbac0576c0] illegal modification_of_pic_nums_idc 8
[h264 @ 0x7fdbac0576c0] decode_slice_header error
[h264 @ 0x7fdbac0576c0] no frame!
[h264 @ 0x7fdbac4ca6c0] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4d5e40] reference overflow 17 > 15 or 0 > 15
[h264 @ 0x7fdbac4d5e40] decode_slice_header error
[h264 @ 0x7fdbac4d5e40] no frame!
[h264 @ 0x7fdbac4d1340] top block unavailable for requested intra mode
[h264 @ 0x7fdbac4d1340] error while decoding MB 7 0
[h264 @ 0x7fdbac4d1340] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame




mpromonet/webrtc-streamer gives the below repeatedly and never starts playing (I believe this is using live555):

[041:501][2620] (h264_decoder_impl.cc:294): avcodec_send_packet error: -1094995529
[041:501][2620] (VideoDecoder.h:70): VideoDecoder::DecoderThread failure:-1
[h264 @ 0x7fa4b4013180] non-existing PPS 0 referenced
[h264 @ 0x7fa4b4013180] decode_slice_header error
[h264 @ 0x7fa4b4013180] no frame!




Does any one have an idea how to fix this?

Thank you
Mark


UPDATE
I found out that this was due to another RTSP stream already running on the camera (i.e. the NVR). When I stopped that ffprobe and ffplay no longer get the errors. As for webrtc-streamer, well that still fails with "no frame". live555ProxyServer complains of frame size exceeding the client's buffer size so perhaps that's webrtc-streamer's problem too... Doesn't make much sense and my other camera is much higher resolution and it plays nicely.
 
Last edited:

mrxyz

Getting the hang of it
Joined
May 4, 2020
Messages
72
Reaction score
79
Location
Island
Thank you to @mrxyz for the detailed post on how to connect to the serial console and to fix the frame rate drop. I managed to muddle my way through with firmware version 13.1.1.36 and various free/trial software (IDA free did not want to do it). I was really hoping that this would have fixed the below problem which is what started me down this rabbit run but it didn't.

Would someone mind seeing if their YooSee doorbell camera has the below problem using ffprobe or ffplay and if you do not please could you tell me what firmware you are using? I get the below message repeated for a good few seconds before the ffplay manages to a valid frame then it seems to be stable. It is, however, causing a bigger problem for mpromonet/webrtc-streamer which simply can't get a valid stream at all.

FFPLAY:

[h264 @ 0x7fdbac0576c0] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4d5e40] mb_type 32 in P slice too large at 1 0
[h264 @ 0x7fdbac4d5e40] error while decoding MB 1 0
[h264 @ 0x7fdbac060b80] illegal modification_of_pic_nums_idc 8
[h264 @ 0x7fdbac060b80] decode_slice_header error
[h264 @ 0x7fdbac060b80] no frame!
[h264 @ 0x7fdbac4d5e40] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4ca6c0] reference overflow 17 > 15 or 0 > 15
[h264 @ 0x7fdbac4ca6c0] decode_slice_header error
[h264 @ 0x7fdbac4ca6c0] no frame!
[h264 @ 0x7fdbac4d1340] P sub_mb_type 13 out of range at 4 0
[h264 @ 0x7fdbac4d1340] error while decoding MB 4 0
[h264 @ 0x7fdbac4d5e40] illegal modification_of_pic_nums_idc 8
[h264 @ 0x7fdbac4d5e40] decode_slice_header error
[h264 @ 0x7fdbac4d5e40] no frame!
[h264 @ 0x7fdbac060b80] reference overflow 17 > 15 or 0 > 15
[h264 @ 0x7fdbac060b80] decode_slice_header error
[h264 @ 0x7fdbac060b80] no frame!
[h264 @ 0x7fdbac4d1340] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac0576c0] mb_type 27 in P slice too large at 2 0
[h264 @ 0x7fdbac0576c0] error while decoding MB 2 0
[h264 @ 0x7fdbac0576c0] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4ca6c0] P sub_mb_type 32 out of range at 18 0
[h264 @ 0x7fdbac4ca6c0] error while decoding MB 18 0
[h264 @ 0x7fdbac0576c0] illegal modification_of_pic_nums_idc 8
[h264 @ 0x7fdbac0576c0] decode_slice_header error
[h264 @ 0x7fdbac0576c0] no frame!
[h264 @ 0x7fdbac4ca6c0] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x7fdbac4d5e40] reference overflow 17 > 15 or 0 > 15
[h264 @ 0x7fdbac4d5e40] decode_slice_header error
[h264 @ 0x7fdbac4d5e40] no frame!
[h264 @ 0x7fdbac4d1340] top block unavailable for requested intra mode
[h264 @ 0x7fdbac4d1340] error while decoding MB 7 0
[h264 @ 0x7fdbac4d1340] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame




mpromonet/webrtc-streamer gives the below repeatedly and never starts playing (I believe this is using live555):

[041:501][2620] (h264_decoder_impl.cc:294): avcodec_send_packet error: -1094995529
[041:501][2620] (VideoDecoder.h:70): VideoDecoder::DecoderThread failure:-1
[h264 @ 0x7fa4b4013180] non-existing PPS 0 referenced
[h264 @ 0x7fa4b4013180] decode_slice_header error
[h264 @ 0x7fa4b4013180] no frame!




Does any one have an idea how to fix this?

Thank you
Mark


UPDATE
I found out that this was due to another RTSP stream already running on the camera (i.e. the NVR). When I stopped that ffprobe and ffplay no longer get the errors. As for webrtc-streamer, well that still fails with "no frame". live555ProxyServer complains of frame size exceeding the client's buffer size so perhaps that's webrtc-streamer's problem too... Doesn't make much sense and my other camera is much higher resolution and it plays nicely.
I know ONVIF isn't implemented properly. Somewhere before I posted a patch for ffmpeg. In essence it adds a flag that forces TCP connections. Perhaps this is one of the problems (first trying UDP then TCP). Btw, this is just a wild guess without looking into the issue :)
 

sp00025

n3wb
Joined
Jul 26, 2020
Messages
27
Reaction score
13
Location
Madrid
You could be right, I'll have to research it some more. Calling a script from within a script is not something I usually do, but from what I can tell through testing it doesn't seem to matter whether I source /mnt/disc1/set_time or not from inside dhcp.script. It uses the variables consistently without error just by using the full path. ¯\_(ツ)_/¯ But from my understanding of what I've read so far regarding source it doesn't seem to apply to this situation, sourcing is used in the few cases where you want a script to affect the shell you are running it from, but I'm not trying to pass variables from the set_time.sh to dhcp.script and I'm the using absolute path rather than a $PATH variable to execute set_time.sh and running it as a separate process.

I did find two other issues with my script though... I needed to add a sleep 5 to the beginning of the script because sometimes the script runs before the network is up after a reboot. I also realized I needed to add unset TZ to the end of the the loop. Other wise it would subtract my TZ offset from the previously set TZ offset essentially doubling the offset once the script looped. I edited my set_time script in the post you quoted just incase someone tries to use it via copy paste before they get around to seeing this one.
@whoami thanks for sharing your further research. The key was to use dhcp.script for time sync rather then the /npc/npc replacement script. Now I was able to reproduce correct time readings. I used slightly different way, but including the timeout before and after ntpd indeed resolved the issue albeit using such a hack.

Code:
#!/bin/sh

# Sync time with local ntp server
/mnt/disc1/busybox sleep 5
ntpd -q -p 192.168.x.x
/mnt/disc1/busybox sleep 10
T=$(($(date +%s) + 3600))  # Adjust this for your timezone
date -s "@$T"
That script will also be run once a day at midnight when system reboots by cron job. I found that it is necessary as the system is not stable enough. I believe syncing once a day maybe sufficient, but will see more.
 

sp00025

n3wb
Joined
Jul 26, 2020
Messages
27
Reaction score
13
Location
Madrid
Using the IPC tool I was able to reupload the patched firmware (probably ran out of space/inodes because the system wouldn't let me save scripts anymore). Again using wget I was able to get mosquitto_pub and the doorbell.sh onto the device.
My question: using Telnet to start the doorbell.sh and testing a button press: everything works. Then exiting out of Telnet (doorbell.sh still running) and pressing the doorbell: no MQTT message anymore... How to overcome this situation?
I am using roughly the same script petervk made:
Code:
#!/bin/sh

while read line; do
    if (echo $line == *"sHiRegCmd.dwBaseAddr"*); then
        ./mosquitto_pub -h 192.168.x.x -p 1883 -u USER -P Password -t "Home/Groundfloor/Outside/Doorbell" -m "DINGDONG"
    fi
done < /proc/kmsg
I used this as @Florissilfhout suggested and it is indeed a better way. However, the string matching as suggested here produces fake alarms. The reason is seen from the post #527 where the following lines are found in dmesg with different values caused by other then ringing event:
Code:
<4>sHiRegCmd.dwBaseAddr = 0x20120000 0xc4
<4>sHiRegCmd.dwBaseAddr = 0x20120000 0xc4
<4>sHiRegCmd.dwBaseAddr = 0x20120000 0xc8
<4>sHiRegCmd.dwBaseAddr = 0x20120000 0xc8
With the following code the doorbell does not ring without reason:
Code:
# Alternative monitoring
while read line; do
  if (echo $line == "sHiRegCmd.dwBaseAddr = 0x20650000 0x2004"); then
    ....
  fi
done < /proc/kmsg
 

brommetje

n3wb
Joined
Apr 21, 2020
Messages
15
Reaction score
0
Location
Holland
Where can I find the latest bin file that is working together with all the scrips for the SDcard?
Do I have to update the bin through the app (ipad) or is there another way?
Has somebody already an manual for dummies like me :idk:
 

sp00025

n3wb
Joined
Jul 26, 2020
Messages
27
Reaction score
13
Location
Madrid
Where can I find the latest bin file that is working together with all the scrips for the SDcard?
Do I have to update the bin through the app (ipad) or is there another way?
Has somebody already an manual for dummies like me :idk:
You can get all you need if you follow the discussion starting from this post by @Florissilfhout. For flashing, place the FW binary npcupg.bin into your SD-card root. There are two easy ways to flash it then, depending on the access to the doorbell box. You either press the reset button on the back of the box while powering it up, and keep pressing for about 15 sec. Or you use your favourite app which will indicate an available update, once the FW file is on your SD. After flashing telnet should be possible to use to access doorbell with its IP using root as username without password. From the login shell you can modify your scripts, run ftpd to upload all necessary files to your SD. If desperate put files onto SD using your desktop. That's basically all, but you need to have some basic linux skills to deal with an embedded linux system such as the one used in this little box.
 
Joined
Mar 13, 2020
Messages
20
Reaction score
11
Location
London
I currently have Firmware 13.1.1.36 installed, using the Yoosee iphone app, I am trying to install this patched firmware version, but it's saying I am already on the latest, how can I get round this please?
 
Joined
Mar 13, 2020
Messages
20
Reaction score
11
Location
London
I currently have Firmware 13.1.1.36 installed, using the Yoosee iphone app, I am trying to install this patched firmware version, but it's saying I am already on the latest, how can I get round this please?
I couldn't get it to update using the Yoosee app, I ended up using the IPC Test Tool, and 'forced' upgrade.
 

brommetje

n3wb
Joined
Apr 21, 2020
Messages
15
Reaction score
0
Location
Holland
You can get all you need if you follow the discussion starting from this post by @Florissilfhout. For flashing, place the FW binary npcupg.bin into your SD-card root. There are two easy ways to flash it then, depending on the access to the doorbell box. You either press the reset button on the back of the box while powering it up, and keep pressing for about 15 sec. Or you use your favourite app which will indicate an available update, once the FW file is on your SD. After flashing telnet should be possible to use to access doorbell with its IP using root as username without password. From the login shell you can modify your scripts, run ftpd to upload all necessary files to your SD. If desperate put files onto SD using your desktop. That's basically all, but you need to have some basic linux skills to deal with an embedded linux system such as the one used in this little box.
@sp00025 thanks for the feedback after approval from my wife (just kidding) I will try this out.
 

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
Has anyone wrote a script to send a PushOver notification with image for a button press? I was going to start working on it but hoping someone else already has.

I cant seem to figure out the POSIX timezone strings with DST for timezones ahead of UTC0. POSIX full string format will set them for about 30 seconds, then they revert back to UTC0, or every once in a while they will actually hold. It makes no sense to me... All DST timezone strings behind UTC work repeatable 100% of the time. ¯\_(ツ)_/¯

This link HERE is the most complete collection of POSIX TZ strings I've found. The strings still need to be modified some ie: EST5EDT,M3.2.0/2:00:00,M11.1.0/2:00:00 needs to be like EST-5EDT-4,M3.2.0/02:00:00,M11.1.0/02:00:00 ect.

The autistic part of me would like to figure them out so I can finish this script with variables...
Bash:
#!/bin/sh

#==================================================#
##                __      __  .__                 ##
##   ______ _____/  |_  _/  |_|__| _____   ____   ##
##  /  ___/ __ \   __\ \   __\  |/     \_/ __  \  ##
##  \___ \\  ___/|  |    |  | |  |  Y Y  \  ___/  ##
## /____  >\___  >__|____|__| |__|__|_|  /\___  > ##
##      \/     \/  /_____/             \/     \/  ##
#==================================================#

## Script Name: set_time.sh
## Decription: Sets system time using user defined
##             NTP server & timezone string.

####################################################
## NTP Server IP        # Edit your server IP here
#===================================================
TIME_SERVER="192.168.10.1"
#===================================================

####################################################
## TimeZone Offset      # Uncomment your timezone
#===================================================
TIMEZONE="EST-5EDT-4,M3.2.0/02:00:00,M11.1.0/02:00:00"      #Eastern
#TIMEZONE="CST-6CDT-5,M3.2.0/02:00:00,M11.1.0/02:00:00"     #Central
#TIMEZONE="MST-7MDT-6,M3.2.0/02:00:00,M11.1.0/02:00:00"     #Mountian
#TIMEZONE="PST-8PDT-7,M3.2.0/02:00:00,M11.1.0/02:00:00"     #Pacific
#TIMEZONE="ASKT-9AKDT-8,M3.2.0/02:00:00,M11.1.0/02:00:00"   #Alaska
#TIMEZONE="HST-11HDT-10,M3.2.0/02:00:00,M11.1.0/02:00:00"   #Hawaii
#===================================================

# Sync with local ntp server

/mnt/disc1/busybox sleep 5

    while true;
    do
        ntpd -q -p $TIME_SERVER
        /mnt/disc1/busybox sleep 8
        ntpd -q -p $TIME_SERVER
        T=$(date +"%Y-%m-%d %H:%M:%S")
        TZ=$TIMEZONE
        export TZ
        date -s "$T"
        /mnt/disc1/busybox sleep 10800
        unset TZ
    done
 
Last edited:

whoami ™

Pulling my weight
Joined
Aug 4, 2019
Messages
230
Reaction score
224
Location
South Florida
I got PushOver working. I kept getting a SSL certificate error with curl while trying to use the cacert.pem so I could only get it to work with http://

Are the 5 or 6 of you others doing this programming communicating with each other somewhere else other than this thread? I swore I read this whole thread and never once read anything about how "alarm" got enabled to take a picture on button press. The only way I figured it out was by reverse engineering the "send_pic_telegram" script.

Bash:
#!/bin/sh

#================================================================#
## __________             .__     ________                      ##
## \______   \__ __  _____|  |__  \_____  \___  __ ___________  ##
##  |     ___/  |  \/  ___/  |  \  /   |   \  \/ / __ \_  __  \ ##
##  |    |   |  |  /\___ \|   Y  \/    |    \   /\  ___/|  | \/ ##
##  |____|   |____/____  >___|  /\_______  /\_/   \___  >__|    ##
##                      \/     \/         \/          \/        ##
#================================================================#

## Script Name: pushover.sh
## Decription: Sends a PushOver notifaction with an image
##             attachment. Alarm with taking snapshot
##             should be enabled in the doorbell.

##################################################################
## User Key                            # Edit your User Key here.
#================================================================#
USER_KEY="ueveujttxfakeuserkeyieg7777"
#==================================================

##################################################################
## APP Token                          # Edit your App Token here.
#================================================================#
APP_TOKEN="ak9gb9hdqfakeapptokena3oy7777"
#================================================================#

#Send PushOver notifaction

# Today's date - such dir should be created for alarm pics
DIR=`date +%Y-%m-%d`

# Alarm picture storage
PTH="/mnt/disc1/npc/push/alarm"

# Wait until snapshot is taken
/mnt/disc1/busybox sleep 5

# Find latest image in the current date folder
LATEST=`ls -t ${PTH}/${DIR} | /mnt/disc1/busybox head -1`

# Full filename with path
FILE=${PTH}/${DIR}/${LATEST}

# Timestamp of the file creation date
TS=`/mnt/disc1/busybox stat -c %Y ${FILE}`

# File creation date in readable format
FDATE=`date -d @${TS} +'%Y-%m-%d %H:%M:%S'`

# Send latest image
/mnt/disc1/MONITORING/curl -sk \
  --form-string "token=${APP_TOKEN}" \
  --form-string "user=${USER_KEY}" \
  --form-string "message=Doorbell Push Detected ${FDATE}" \
  -F "attachment=@${FILE}" \
  https://api.pushover.net/1/messages.json >/dev/null 2>&1


exit 0
 
Last edited:

mrxyz

Getting the hang of it
Joined
May 4, 2020
Messages
72
Reaction score
79
Location
Island
I got PushOver working. I kept getting a SSL certificate error with curl while trying to use the cacert.pem so I could only get it to work with http://

Are the 5 or 6 of you others doing this programming communicating with each other somewhere else other than this thread? I swore I read this whole thread and never once read anything about how "alarm" got enabled to take a picture on button press. The only way I figured it out was by reverse engineering the "send_pic_telegram" script.

Bash:
#!/bin/sh

#================================================================#
## __________             .__     ________                      ##
## \______   \__ __  _____|  |__  \_____  \___  __ ___________  ##
##  |     ___/  |  \/  ___/  |  \  /   |   \  \/ / __ \_  __  \ ##
##  |    |   |  |  /\___ \|   Y  \/    |    \   /\  ___/|  | \/ ##
##  |____|   |____/____  >___|  /\_______  /\_/   \___  >__|    ##
##                      \/     \/         \/          \/        ##
#================================================================#

## Script Name: pushover.sh
## Decription: Sends a PushOver notifaction with an image
##             attachment. Alarm with taking snapshot
##             should be enabled in the doorbell.

##################################################################
## User Key                            # Edit your User Key here.
#================================================================#
USER_KEY="ueveujttxfakeuserkeyieg7777"
#==================================================

##################################################################
## APP Token                          # Edit your App Token here.
#================================================================#
APP_TOKEN="ak9gb9hdqfakeapptokena3oy7777"
#================================================================#

#Send PushOver notifaction

# Today's date - such dir should be created for alarm pics
DIR=`date +%Y-%m-%d`

# Alarm picture storage
PTH="/mnt/disc1/npc/push/alarm"

# Wait until snapshot is taken
/mnt/disc1/busybox sleep 5

# Find latest image in the current date folder
LATEST=`ls -t ${PTH}/${DIR} | /mnt/disc1/busybox head -1`

# Full filename with path
FILE=${PTH}/${DIR}/${LATEST}

# Timestamp of the file creation date
TS=`/mnt/disc1/busybox stat -c %Y ${FILE}`

# File creation date in readable format
FDATE=`date -d @${TS} +'%Y-%m-%d %H:%M:%S'`

# Send latest image
/mnt/disc1/MONITORING/curl -s \
  --form-string "token=${APP_TOKEN}" \
  --form-string "user=$ {USER_KEY}" \
  --form-string "message=Doorbell ring !!! ${LATEST} - Created at ${FDATE}" \
  -F "attachment=@${FILE}" \
  http://api.pushover.net/1/messages.json >/dev/null 2>&1


exit 0
You might want to remove the values of USER_KEY and APP_TOKEN...
 
Top