Getting error when trying to email snapshot Topic is solved
Moderator: leecollings
-
- Posts: 24
- Joined: Sunday 17 February 2019 10:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Contact:
Getting error when trying to email snapshot
Hello,
I am currently trying to integrate an old Foscam C1 Lite into Domoticz.
I added it int cameras and when I click onto the photo camara icon a snapshot gets downloaded to my PC download folder.
When I click onto the video camera icon I the video output of the camera is getting displayed in a frame on the screen.
But when I try to relate the camera to a switch in the lower section of the camera page I only get the following error messages in the domoticz log:
2022-11-28 17:18:10.793 Error: SMTP Mailer: Error sending Email to: <[email protected]> !
2022-11-28 17:18:10.793 Error: libcurl: (56)
2022-11-28 17:18:10.793 Error: Failure when receiving data from the peer
2022-11-28 17:18:10.793
Text in the url field of the camera definition reads:
/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=adminpassword
Note: I omitted the http: in the following samples so the text will not be converted to a link:
From the internet browser I can enter //192.168.0.123:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=adminpassword"
and get a snapshot displayed in the browser.
Entering the following command in the shell of the domoticz server:
sudo curl '//192.168.0.123:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=adminpassword' --output /home/pi/domoticz/snapC1L.img
will write a snapshot to the directory.
Am I missing something here?
Any hints are welcome.
Best regards
Al
I am currently trying to integrate an old Foscam C1 Lite into Domoticz.
I added it int cameras and when I click onto the photo camara icon a snapshot gets downloaded to my PC download folder.
When I click onto the video camera icon I the video output of the camera is getting displayed in a frame on the screen.
But when I try to relate the camera to a switch in the lower section of the camera page I only get the following error messages in the domoticz log:
2022-11-28 17:18:10.793 Error: SMTP Mailer: Error sending Email to: <[email protected]> !
2022-11-28 17:18:10.793 Error: libcurl: (56)
2022-11-28 17:18:10.793 Error: Failure when receiving data from the peer
2022-11-28 17:18:10.793
Text in the url field of the camera definition reads:
/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=adminpassword
Note: I omitted the http: in the following samples so the text will not be converted to a link:
From the internet browser I can enter //192.168.0.123:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=adminpassword"
and get a snapshot displayed in the browser.
Entering the following command in the shell of the domoticz server:
sudo curl '//192.168.0.123:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=adminpassword' --output /home/pi/domoticz/snapC1L.img
will write a snapshot to the directory.
Am I missing something here?
Any hints are welcome.
Best regards
Al
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Getting error when trying to email snapshot
You can send emails from Domoticz? Google has changed its authentication method for Gmail. But if you already did that it should not be an issue.
Other possibility is that the location were Domoticz is saving the snapshot is not readable for the email function. Are you running Domoticz in a Docker container?
Other possibility is that the location were Domoticz is saving the snapshot is not readable for the email function. Are you running Domoticz in a Docker container?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 24
- Joined: Sunday 17 February 2019 10:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Contact:
Re: Getting error when trying to email snapshot
Hello waltervl,
yes, I can send emails, but I use another mail service (I put in gmail.com just to make it anonymous).
Apart from Domoticz I had my troubles setting up the camera to send me emails directly (which I only got to work with Gmail app password because the camera's hardware certificate is too old).
Cheers
Al
yes, I can send emails, but I use another mail service (I put in gmail.com just to make it anonymous).
Apart from Domoticz I had my troubles setting up the camera to send me emails directly (which I only got to work with Gmail app password because the camera's hardware certificate is too old).
Cheers
Al
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Getting error when trying to email snapshot
I see from your signature that you run Domoticz on synology (in Docker?).
So could be an Docker access issue. Or try the snapshot link within the Docker container.
So could be an Docker access issue. Or try the snapshot link within the Docker container.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 24
- Joined: Sunday 17 February 2019 10:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Contact:
Re: Getting error when trying to email snapshot
Sorry, my profile was not current. Domoticz is not on Synology any more.
I run Domoticz 2022.2 on Raspberry Pi 3B with Bullseye. Mosquitto is installed and zWave JS is up and running (snapd install, no Docker).
I avoided Docker as I saw not enough value in it to dig into a technology new to me.
If I can't get this snapshot sending working I'll leave it. The camera itself has a lot of functionality and so does Surveillance Station on the NAS. Just wanted to have the automation on one point and not one function here and the other over there...
Cheers
Al
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Getting error when trying to email snapshot
What if you do
Change camidx to the correct one.
Code: Select all
http://domoticz-ip:8080/json.htm?type=command¶m=emailcamerasnapshot&camidx=1&subject=test
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 24
- Joined: Sunday 17 February 2019 10:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Contact:
Re: Getting error when trying to email snapshot
Hi Walter,waltervl wrote: ↑Wednesday 30 November 2022 9:00 What if you doChange camidx to the correct one.Code: Select all
http://domoticz-ip:8080/json.htm?type=command¶m=emailcamerasnapshot&camidx=1&subject=test
thanks for your patience.
IDX is shown as 1 in my case. Entering the command in the browser gave the following result in the browser:
{
"status" : "OK",
"title" : "Email Camera Snapshot"
}
Domoticz log showed the following:
2022-11-30 09:58:05.625 Error: SMTP Mailer: Error sending Email to: <my email address> !
2022-11-30 09:58:05.625 Error: libcurl: (56)
2022-11-30 09:58:05.625 Error: Failure when receiving data from the peer
2022-11-30 09:58:05.625
I wonder where I can find what "libcurl: (56)" may mean.
.....
But after that I decided that the error can't really be in the emailcamerasnapshot function and began to think what I could change in my Domoticz setup.
I then changed the E-mail setup in domoticz to use not my usual e-mail gateway, but the new one via Gmail which I created for the camera directly (because of the old FOSCAM hardware certificate).
And voilà, it worked like a charm!
I can only assume the problem has to do with the the fact that I have to use TLS/STARTTLS which usually requires a certificate or that the emailcamerasnapshot function requires to use Gmail if you want to use an attachment.
For the time being I'll stay with this setup, but I would prefer not to use Gmail to email my important Domoticz messages.
Thanks!
Cheers
Al
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Getting error when trying to email snapshot
It also should work with other mail providers. Did you play with the email setting "Send Camera Snapshots as attachment (Gmail)"?
See also
viewtopic.php?p=287307#p287307
See also
viewtopic.php?p=287307#p287307
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 24
- Joined: Sunday 17 February 2019 10:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Contact:
Re: Getting error when trying to email snapshot
I did some tests and turning off the setting "Send Camera Snapshots as attachment (Gmail)" just changed that no snapshot was attached to the e-mail.waltervl wrote: ↑Wednesday 30 November 2022 11:12 It also should work with other mail providers. Did you play with the email setting "Send Camera Snapshots as attachment (Gmail)"?
See also
viewtopic.php?p=287307#p287307
The thing is, that my other e-mail providers do not accept e-mails from my old camera, no difference directly or via Domoticz because they all require TLS or STARTTLS and a valid certificate.
When trying sending an e-mail directly from the camera, I get an error message that there is a problem with the certifcate of the device. Trying it via Domoticz I just get that unclear error message mentioned before.
Gmail allows to create an application password which means that I can send an e-mail from a device via Gmail without requiring a certificate.
In Domoticz I know no way to use different e-mail settings just for the camera, so I have to stick to Gmail if I want to continue sending camera snapshots from this old camera via Domoticz.
Cheers
Al
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Getting error when trying to email snapshot
In latest beta a lot has changed with security settings see wiki https://www.domoticz.com/wiki/Security
I am no expert on this matter but perhaps in beta you can use it with certificates.
I am no expert on this matter but perhaps in beta you can use it with certificates.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 0 guests