Navigation

    Home
    All Categories
    • KEEN Trail Camera
    • Top #ReolinkCaptures Awards
    • Announcements and News
    • Wishlist
    • #ReolinkTrial
    • Discussion About Products
    • Reolink Captures
    • Reolink Client & APP
    #ReolinkTrial
    Reolink Captures
    Log in to post
    Guest
    • Guest
    • Register
    • Login

    Learn More

    Reolink updates Learn More

    Meet Reolink at IFA 2024! Learn More

    Reolink Q&A Learn More

    Some Reolink API commands not working after upgrading NVR to v3.1.0.211_22102413

    Reolink Client & APP
    api home assistant setpushv20
    2
    5
    1393
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Balimelón_362138258030731
      Balimelón last edited by

      Dear All,

      I have been using some Reolink API commands for quite a long time with no issues. I have integrated such commands in Home Assistant through cURL commands. However, I upgraded my NVR to the latest version a few days ago. Since then, some commands are still working but some are not. Specifically, I am missing the command to enable/disable PUSH notifications, which is a very useful option to be automated upon leaving and returning home.

      These are the commands I issued until it stopped working:

      TO ENABLE:

      curl -H "Content-Type: application/json" -X POST -d ''[{"cmd":"SetPushV20","param":{"Push":{"enable":1}}}]'' "http://[NVR_IP]/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]"


      TO DISABLE:

      curl -H "Content-Type: application/json" -X POST -d ''[{"cmd":"SetPushV20","param":{"Push":{"enable":0}}}]'' "http://[NVR_IP]/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]"


      According to latest API version v7, these commands haven't changed. However, the response to such cURL commands is now the following:

      curl: (3) bad range in URL position 2:
      [param:{Push:{enable:1}}]
       ^


      Taking into the account such error, I have been trying different command parameters order. If I issue the following command, response is different (I am adding the --insecure option because it seems that Reolink new firmware accepts https requests only, and the certificate is a self-signed one):

      curl -X POST -H "Content-Type : application/json" -d "[{"cmd": "SetPushV20","param": {"Push": {"enable": 1}}}]" "https://[NVR_IP]/cgi-bin/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]" --insecure


      RESPONSE:

      [
        {
           "cmd" : "SetPushV20",
           "code" : 1,
           "error" : {
              "detail" : "please login first",
              "rspCode" : -6
           }
        }
      ]


      It seems this command works. But, response is asking to login first, although the credentials are passed in the command in the same way it used to work before latest firmware upgrade. I know there is a TOKEN option, but I'd rather to use the "short-session" access option, because it is more convenient for the purpose. Nevertheless, I have tried the token option and behaviour is the same.

      In order to compare with another command, the response of the following command is fine:

      curl "https://192.168.0.55/api.cgi?cmd=GetPushV20&user=admin&password=Cabanillas2015" --insecure


      RESPONSE:

      [
        {
           "cmd" : "GetPushV20",
           "code" : 0,
           "value" : {
              "Push" : {
                 "enable" : 0,
                 "schedule" : {
                    "channel" : 0,
                    "table" : {
                       "AI_DOG_CAT" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
                       "AI_PEOPLE" : "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
                       "AI_VEHICLE" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
                       "MD" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                    }
                 },
                 "scheduleEnable" : 1
              }
           }
        }
      ]


      As you can see, the command response is the expected, and no "please loging first" message is issued, so I think there is a specific issue with certain commands, or the SetPushV20 one at least.

      Typing some NVR information below for reference:

      NVR Model: RLN8-410
      NVR Hardware Version: N2MB02
      Config Version: v3.0.0.0
      Firmware Version: v.3.1.0.211_22102413

      For the moment, I think I will downgrade the NVR, because this feature is quite important for me.

      In the meantime, is anyone experiencing the same problem? Any way to fix this, please?

      Thanks in advanced.

      Sésar

      Reply Quote
      Share
      • Share this Post
      • Facebook
      • Twitter
      • copy the link
        Copied!
      0
        • Reolink Fiona
          Reolink Fiona @Balimelón last edited by

          @balimelón_362138258030731 Hi there, there is some problem with the command you used. The symbol after -d is a single quote. You can use this one.

          curl -H "Content-Type: application/json" -X POST -d '[{"cmd":"SetPushV20","param":{"Push":{"enable":1}}}]' "http://[NVR_IP]/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]"


          Parameter:
          "enable" means the main switch and scheduleEnable means the switch of the NVR channel. Only when enable is on can scheduleEnable take effect.
          For example, if you want to enable push, it can be "enable":1. "channel' is decided by you.

          [{
                  "cmd": "SetPushV20",
                  "param": {
                          "Push": {
                                  "enable": 1,
                                  "scheduleEnable": 1,
                                  "schedule": {
                                          "channel": 0
                                  }
                          }
                  }
          }]
          Reply Quote
          Share
          • Share this Post
          • Facebook
          • Twitter
          • copy the link
            Copied!
          1
          • Balimelón_362138258030731
            Balimelón @Reolink Fiona last edited by Balimelón_362138258030731

            @reolink-fiona Thank you! Managed the command to work using the single quote between the brackets section. Home Assistant gave a validation error with such single quotes, but I found a way to fix this and make Home Assistant compliant. I don't understand why this was working before, but I don't really care as it is working fine now. 🙂

            Problem now is that, when I issue the following SetPushV20 command, the { "Push" : { "enable" : state changes from 0 to 1 as expected. I Check response with https://[NVR_IP]/api.cgi?cmd=GetPushV20&user=admin&password=[PASSWORD]

            COMMAND

            curl -H "Content-Type: application/json" -X POST -d '[{"cmd":"SetPushV20","param":{"Push":{"enable":0}}}]' "https://[NVR_IP]/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]" --insecure


            RESPONSE

            [ { "cmd" : "GetPushV20", "code" : 0, "value" : { "Push" : { "enable" : 1, "schedule" : { "channel" : 0, "table" : { "AI_DOG_CAT" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "AI_PEOPLE" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "AI_VEHICLE" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "MD" : "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" } }, "scheduleEnable" : 1 } } } ]


            However, neither the Reolink Mobile App PUSH switch nor the NVR interface change. I don't receive notifications when I issue the command above like I used to do.

            It is strange that, if I enable the PUSH command from the App or the NVR interface, the response to the GetPushV20 is the same than the curl command ("enable" changes to 1). However, notifications work in this case.

            EDIT: Actually, it happens the same from the Web Interface. If I login in the Web interface and enable PUSH, I don't receive notifications, and push switch is not updated in the mobile App. If I enable the switch in the mobile App, switch is not updated in the Web Interface either. However, in this case (enable/disable from the App) notifications work.

            How can I make the curl command to actually work and enable the "real" notifications, in addition to the GetPushV20 response? How can I make all PUSH switches to be sync'ed?

            Kind regards,
            Sésar

            Reply Quote
            Share
            • Share this Post
            • Facebook
            • Twitter
            • copy the link
              Copied!
            0
            View 2 replies
          • First post
            Last post
          All Categories
          Announcements and News Reolink Client & APP Discussion About Products #ReolinkTrial Reolink Captures Wishlist KEEN Trail Camera
          Never miss Reolink hot deals, news, and updates tailored for you.

          Thanks for your subscription!

          Please enter a valid email address.

          Oops… Something went wrong. Please try again later.

          You are already subscribed to this email list. :)

          Submission failed. Please try again later.

          Reolink Store|Support|About Us|Privacy Policy|Terms and Conditions

          Copyright 2025 © Reolink All Rights Reserved.

          Welcome Back!

          Hi there! Join the Commnunity to get all the latest news, tips and more!

          Join Now