Announcement

Collapse
No announcement yet.

Sending an Email or Text of a Snapshot

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by skozin View Post
    Because I don't know scripting well and I don't know how to use stringvalue in a script.
    Well you are doing good so far. If you can do it the hard way, doing it the easy way should be easier
    This line should do it (assuming 460 is the feature reference for the snapshot feature


    Attach = hs.GetAppPath & "/html/" & hs.devicestring (460)

    Comment


      #32
      Thanks dcorsus. That is what I was looking for!!! I was having the hardest time trying to get it to work this way and couldn't figure out how to send the picture.

      Will your plugin be able to do this with video clips? For example, if there was motion at the door, Ring will record the video.

      Comment


        #33
        Originally posted by skozin View Post
        Will your plugin be able to do this with video clips? For example, if there was motion at the door, Ring will record the video.
        This is actually a really good question, I hadn't given it any thought.
        There are a few challenges I see:

        1. I would have to add a video feature
        2. This would mean that you automatically download the video to the HS PC (this already exists in the PI), which takes a bit ... after ... the video is available. The latter takes another at least 60 seconds. This means that the feature would change a minute and a half after the event.
        3. Looking at my setup, the videos are in the 10 to 20Mbyte size range, so most email systems will not allow such a big attachment.


        Thoughts?

        Comment


          #34
          Oh I see. That would definitely be an issue. Also, I am using the HSPI box which would not be fast enough to do all of that. Definitely not like a PC with no speed and not much space or memory!

          Comment


            #35
            Changing the topic a little. Since you are getting pictures and possibly video, I use Blue Iris 5 software and can't get the video from my Ring doorbell camera. How are you able to get it and is it possible to get it on Blue Iris by using an ip address or rtsp?

            Comment


              #36
              Originally posted by skozin View Post
              Changing the topic a little. Since you are getting pictures and possibly video, I use Blue Iris 5 software and can't get the video from my Ring doorbell camera. How are you able to get it and is it possible to get it on Blue Iris by using an ip address or rtsp?
              Without being 100% sure, here is what I think is the problem:

              1. Ring cameras do no support the standard camera interfaces, they interface ONLY with the ring-server. So any video access, whether stored or real-time actually streams from their server.
              2. To retrieve or setup a live-stream (I think SIP is used), the client application needs to be authenticated with the ring-server and an accessToken needs to be shared (and refreshed) in any and all communication with the ring server. So .... unless blueIris makes some extension to their SW package to support the Ring camera/api, I doubt it can be made to work. That's also the reason I cannot just publish a URI in a feature, so you could directly retrieve it from the ring server, you would need all the HTTP authentication headers to be present for it to work. a Curl command would do it but that is useless for most people, not to mention that the token is only valid for an hour so that Curl info would be stake quickly.

              There are some authors (for homeassistant/hubitat) that have figured out how to set up a live-stream, but that is some serious advance stuff and low on my list, perhaps never

              Comment


                #37
                Ok, thanks for the quick response. Now back to the previous topic. Something doesn't seem right. I made an event that will take a snapshot when there is motion detected or the doorbell rings. It will run the script, however, it shows the previous picture not the current snapshot. In my log I have this location:

                3/20/2023 5:40:17 PM
                Script
                Attach
                /usr/local/HomeSeer/html/Ring/snapshots/snapshot_16046093_03-20-2023_17-39-02.jpg​

                the timestamp on the file should be 17:40:17PM

                What am I doing wrong?

                Click image for larger version

Name:	Untitled.png
Views:	123
Size:	96.7 KB
ID:	1599519
                Click image for larger version

Name:	1Untitled.png
Views:	82
Size:	100.6 KB
ID:	1599520

                Comment


                  #38
                  There is a delay between the event being received and the video and snapshot to be available. My advice is to tee of your event when the snapshot feature changes value (any value that is). That is the best trigger to know a new snapshot was "posted".

                  Comment


                    #39
                    Originally posted by dcorsus View Post
                    There is a delay between the event being received and the video and snapshot to be available. My advice is to tee of your event when the snapshot feature changes value (any value that is). That is the best trigger to know a new snapshot was "posted".
                    What do you mean by "tee of your event"?

                    Are you saying to create a virtual device for that?

                    Comment


                      #40
                      Originally posted by skozin View Post

                      What do you mean by "tee of your event"?

                      Are you saying to create a virtual device for that?
                      Nope use that as the trigger instead of using the motion state

                      Comment


                        #41
                        Is this is what you are saying?

                        Click image for larger version  Name:	Untitled.png Views:	0 Size:	106.7 KB ID:	1599536

                        Because if so I get nonstop texts sent. Sorry I am a little confused.

                        Thanks for working with me.

                        Comment


                          #42
                          It would be change its value and it would be the only trigger not 3 triggers . I’m not at home but I thought is is called “has its value changes”, therefore it will only trigger when there is a different snapshot. See why it make sure that each new snapshot has a unique name, so it can be used to trigger an event

                          Comment


                            #43
                            The correct trigger is "This device just had its Value Set or Changed" and ONLY for the snapshot feature.
                            edit: I just looked at the rest of the event, you are taking a snapshot when the snapshot changes, that indeed would be an endless loop. When you have a motion or ring event, AND you have set notifications, the PI (at least the version I'm about to release) will take a snapshot for each and any event, so NO need for you to take a snapshot when there is motion or ringing.
                            Now if that's what you want to do, you need to make at least 2 events:
                            1. first event that takes a snapshot on some trigger
                            2. second event triggers when the snapshot string changes and composes and sends an email

                            Comment


                              #44
                              I think there is an issue running the 1st event. If I trigger the snapshot it doesn't update the date/time on the device page. What I did to try to rectify the problem was to take the snapshot, wait 5 seconds then take another snapshot. Then I ran the 2nd event a few seconds later. Can you see if the same thing happens to you on your end?


                              Click image for larger version

Name:	Untitled.png
Views:	94
Size:	93.6 KB
ID:	1599567
                              Click image for larger version

Name:	1Untitled.png
Views:	80
Size:	83.2 KB
ID:	1599568Click image for larger version

Name:	2Untitled.png
Views:	89
Size:	102.5 KB
ID:	1599569

                              Comment


                                #45
                                Originally posted by skozin View Post
                                I think there is an issue running the 1st event. If I trigger the snapshot it doesn't update the date/time on the device page. What I did to try to rectify the problem was to take the snapshot, wait 5 seconds then take another snapshot. Then I ran the 2nd event a few seconds later. Can you see if the same thing happens to you on your end?
                                I think you better wait for a few more days till I release this next version. I don't think I had the snapshots "under control" in the version you have but I made a lot of progress understanding how things work in this undocumented API.

                                Comment

                                Working...
                                X