problems with script rasp1b to rasp3 with stretch doorbel telegram

Moderator: leecollings

Post Reply
BigDog
Posts: 82
Joined: Tuesday 17 September 2013 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.9269
Location: The Netherlands
Contact:

problems with script rasp1b to rasp3 with stretch doorbel telegram

Post by BigDog »

hi guys
when i was using the old rasp with linux whezzy all is good but when i use the script on my new rasp3 with stretch i dont work anymore :(
meby someone can help me with it

i run in in shell and is says this

Code: Select all

pi@raspberrypi:~/domoticz/scripts $ ./door.sh
{"ok":true,"result":{"message_id":2541,"from":{"id":xxxxxx,"is_bot":true,"first_name":"DomoticzDog","username":"Domoticzdog    bot"},"chat":{"id":-xxxxxxxxx,"title":"domoticz thuis","type":"group","all_members_are_administrators":true},"date":xxxxxxxx,    "text":"Er is zojuist aangebeld!"}}--2018-04-21 16:03:47--  http://127.0.0.1:8080/camsnapshot.jpg?idx=1
Verbinding maken met 127.0.0.1:8080... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 200 OK
Lengte: 0 [image/jpeg]
Wordt opgeslagen als: ‘STDOUT’

-                                   [ <=>                                                  ]       0  --.-KB/s    in 0s

2018-04-21 16:03:47 (0,00 B/s) - geschreven naar standaarduitvoer [0/0]

{"ok":true,"result":{"message_id":XXXX,"from":{"id":XXXXX,"is_bot":true,"first_name":"DomoticzDog","username":"Domoticzdog    bot"},"chat":{"id":-XXXXXX,"title":"domoticz thuis","type":"group","all_members_are_administrators":true},"date":xxxxxxxxx,    "text":"Kijk wie er aangebeld heeft:"}}{"ok":false,"error_code":400,"description":"Bad Request: file must be non-empty"}
the script that i use and always had worked is below

Code: Select all

   #!/bin/sh
    #################################################################
    IP="192.168.178.13"                                     # IP address Camera
    ##########################################################
curl "https://api.telegram.org/botXXXXXXXXX:XXXXXXXXX/sendMessage?chat_id=-XXXXXXX&text=Er is zojuist $
    if ping -c 1 $IP > /dev/null ; then  # if IPCAM is online then:
       wget -O - http://127.0.0.1:8080/camsnapshot.jpg?idx=1 > /tmp/snapshot.jpg
curl "https://api.telegram.org/botXXXXX:XXXXX/sendMessage?chat_id=-XXXXXX&text=Kijk wie er aa$
     sleep 1
curl -s -X POST "https://api.telegram.org/botXXXXXX:XXXXXXX/sendPhoto" -F chat_id=-XXXXXXX -F pho$

       /bin/rm /tmp/snapshot.jpg
    else
curl "https://api.telegram.org/botXXXX:XXXXX/sendMessage?chat_id=-XXXXXX&text=IP-cam niet be$
    fi

1X Raspberry4B : Domoticz Version 2023.1 [Linux 5.10.63-v7l+ armv7l]
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
User avatar
jvdz
Posts: 2335
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: problems with script rasp1b to rasp3 with stretch doorbel telegram

Post by jvdz »

Are you sure the CAM is defined in Domoticz running on that raspberry?
What happens when you use this url from your browser: http://domoticz-ip:8080/camsnapshot.jpg?idx=1 ?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BigDog
Posts: 82
Joined: Tuesday 17 September 2013 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.9269
Location: The Netherlands
Contact:

Re: problems with script rasp1b to rasp3 with stretch doorbel telegram

Post by BigDog »

that isnt working indeed when i put the info in it and press test then i see 1 second the camera feed and then nothing

the snapshot shows this

<img src="http://192.168.178.21:8080/camsnapshot.jpg?idx=1" alt="De afbeelding ‘http://192.168.178.21:8080/camsnapshot.jpg?idx=1’ kan niet worden weergegeven, omdat deze fouten bevat.">
1X Raspberry4B : Domoticz Version 2023.1 [Linux 5.10.63-v7l+ armv7l]
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
User avatar
jvdz
Posts: 2335
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: problems with script rasp1b to rasp3 with stretch doorbel telegram

Post by jvdz »

What is the url in domoticz for this camera in the Setup/More Options/Cameras window when you hover the mouse of the "take snapshot" icon?
... and what happens when you click that?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BigDog
Posts: 82
Joined: Tuesday 17 September 2013 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.9269
Location: The Netherlands
Contact:

Re: problems with script rasp1b to rasp3 with stretch doorbel telegram

Post by BigDog »

the icon says the link

http://192.168.178.21:8080/camsnapshot.jpg?idx=1
is there maby a package missing ?
it looks like domoticz cant reed the feed correct
in jessy is worked ok
1X Raspberry4B : Domoticz Version 2023.1 [Linux 5.10.63-v7l+ armv7l]
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest