Door Camera

If you don't know where to post, post here.

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Door Camera

Postby Xavier » Mon Sep 02, 2019 10:54 pm

Picking up this post again.
Trying to get this to work.
I uploaded the folder "doorcam" to /qmf/qml/apps
I set the right webcam url + domoticz URL + IDX + VAR.

In domoticz I created via Setup -->More Options --> Events a new script/event
The name is "ShowDoorCamToon"
I exactly created the if do statement.
I saved the script with trigger "User variable" (is this ok?)

One other question:
What does the variable "SendtoToon"means?
What does this variable? What is behind this? What should it do?
Toon2 with 5.13.12 firmware TSC 2.1.0
Apps: Calender, garbagecalender, traffic information, webcam, doorcam, public transport and weather app.
Xavier
Member
Member
 
Posts: 81
Joined: January 2019

Re: Door Camera

Postby mAiden » Tue Sep 03, 2019 8:47 am

SendToToon is a variable, if this one is set to 1, then Domoticz will be send it to Toon.
If this one is set to 0, Domoticz won't send it to Toon :)
mAiden
Member
Member
 
Posts: 258
Joined: July 2017

Re: Door Camera

Postby Xavier » Tue Sep 03, 2019 9:09 am

mAiden wrote:SendToToon is a variable, if this one is set to 1, then Domoticz will be send it to Toon.
If this one is set to 0, Domoticz won't send it to Toon :)


Do you mean as an user variable, like the "ShowDoorCamToon"?
What would be the setup of this?
Is the Variable type then "String"?
Is the Variable Value then "0" ?
Toon2 with 5.13.12 firmware TSC 2.1.0
Apps: Calender, garbagecalender, traffic information, webcam, doorcam, public transport and weather app.
Xavier
Member
Member
 
Posts: 81
Joined: January 2019

Re: Door Camera

Postby mAiden » Tue Sep 03, 2019 11:25 am

Do you mean as an user variable, like the "ShowDoorCamToon"?
yes
What would be the setup of this?
dontknow, don't use this one. Im been on Home Assistant for a few months now, only know what I know about 4 years of Domoticz.
Is the Variable type then "String"?
yes
Is the Variable Value then "0" ?
0 or 1. By 1 it will be send to Toon. By 0 it dont send it to Toon.
mAiden
Member
Member
 
Posts: 258
Joined: July 2017

Re: Door Camera

Postby Xavier » Wed Sep 04, 2019 7:01 pm

Today I found some time to try and test but with no succes.
When triggering my doorbell I see this in the logging:
2019-09-04 19:46:34.087 Status: User: Admin initiated a switch command (143/Kaku Deurbel/On)
2019-09-04 19:46:34.089 Status: RFLink Sending: 10;NewKaku;14ea2b6;c;ON;
2019-09-04 19:46:35.074 (RFLink Gateway USB) Light/Switch (Kaku Deurbel)
2019-09-04 19:46:35.413 EventSystem: Event triggered: ShowDoorCamToon_1
2019-09-04 19:46:35.308 Status: Executing script: /usr/local/domoticz/var/scripts/deurbel.sh
2019-09-04 19:46:55.418 Status: Set UserVariable ShowDoorCamToon = 100

But nothing on my Toon happens. There is no pop-up.
What am I doing wrong?
Attachments
showdoorcamtoon-script-as-bloc.png
showdoorcamtoon-script-as-bloc.png (82.79 KiB) Viewed 870 times
Toon2 with 5.13.12 firmware TSC 2.1.0
Apps: Calender, garbagecalender, traffic information, webcam, doorcam, public transport and weather app.
Xavier
Member
Member
 
Posts: 81
Joined: January 2019

Re: Door Camera

Postby mAiden » Thu Sep 05, 2019 4:02 pm

Xavier wrote:Today I found some time to try and test but with no succes.
When triggering my doorbell I see this in the logging:
2019-09-04 19:46:34.087 Status: User: Admin initiated a switch command (143/Kaku Deurbel/On)
2019-09-04 19:46:34.089 Status: RFLink Sending: 10;NewKaku;14ea2b6;c;ON;
2019-09-04 19:46:35.074 (RFLink Gateway USB) Light/Switch (Kaku Deurbel)
2019-09-04 19:46:35.413 EventSystem: Event triggered: ShowDoorCamToon_1
2019-09-04 19:46:35.308 Status: Executing script: /usr/local/domoticz/var/scripts/deurbel.sh
2019-09-04 19:46:55.418 Status: Set UserVariable ShowDoorCamToon = 100

But nothing on my Toon happens. There is no pop-up.
What am I doing wrong?


ShowDoorCamToon is set to 100.. That means: If result is "100" then the camera app is closed (hidden).
ShowDoorCamToon must be set to 200, then Toon will be show it full screen!! :)
mAiden
Member
Member
 
Posts: 258
Joined: July 2017

Re: Door Camera

Postby Xavier » Thu Sep 05, 2019 7:59 pm

mAiden wrote:
Xavier wrote:Today I found some time to try and test but with no succes.
When triggering my doorbell I see this in the logging:
2019-09-04 19:46:34.087 Status: User: Admin initiated a switch command (143/Kaku Deurbel/On)
2019-09-04 19:46:34.089 Status: RFLink Sending: 10;NewKaku;14ea2b6;c;ON;
2019-09-04 19:46:35.074 (RFLink Gateway USB) Light/Switch (Kaku Deurbel)
2019-09-04 19:46:35.413 EventSystem: Event triggered: ShowDoorCamToon_1
2019-09-04 19:46:35.308 Status: Executing script: /usr/local/domoticz/var/scripts/deurbel.sh
2019-09-04 19:46:55.418 Status: Set UserVariable ShowDoorCamToon = 100

But nothing on my Toon happens. There is no pop-up.
What am I doing wrong?


ShowDoorCamToon is set to 100.. That means: If result is "100" then the camera app is closed (hidden).
ShowDoorCamToon must be set to 200, then Toon will be show it full screen!! :)


For testing purpose I set all on 200 but no reaction/popup on Toon
Toon2 with 5.13.12 firmware TSC 2.1.0
Apps: Calender, garbagecalender, traffic information, webcam, doorcam, public transport and weather app.
Xavier
Member
Member
 
Posts: 81
Joined: January 2019

Re: Door Camera

Postby Xavier » Thu Sep 05, 2019 10:07 pm

I got it fxed!

So for everybody who is looking for this to work see instruction below.
Startingpoint is you already have automated your doorbell in Domoticz as a trigger.

Step 1:
Download the doorcam app on the first page of this thread

Step 2:
Unzip files

step 3:
Rename folder to "doorcam"

Step 4:
Copy folder to Toon in folder: /qmf/qml/apps

Step 5:
Reboot Toon

Step 6:
After reboot, on Toon add a Tile by clicking on "Tegel toevoegen" under "Algemeen" you will now see the tile "doorcam", click on it to add the tile

Step 7:
Open Domoticz, go to Setup--> more options --> User variables
Add a new variable with the following information:
Variable Name: ShowDoorCamToon
Variable type: String
Variable value: 150

Add a second variable with the following information:
Variable Name: SendtoToon
Variable type: String
Variable value: 0

Step 8:
In Domoticz go to setup --> more options --> events
Click on the "+" To add an automation script
Select "Blockly"
Now rebuild the "if-do statement" like in the screenshot on page 1 of this thread.

Step 9:
Open with, for example, WINSCP the folder doorcam on your Toon

Step 10:
Edit the file "Variables1.txt" with your specs.
Change {"camURL" : "URL+COMMAND for your doorcam", "domURL":"http://DOMOTICZ IP:DOMOTICZ PORT", "idx":"IDX number of the created User Variable ShowDoorCamToon in Domoticz", "var":"ShowDoorCamToon"}
Save the file (make sure it is saved on your Toon and not local)

Step 11:
Edit the file "selectedImageURL1.txt"
Change "http://admin:sateliet@192.168.10.188/snap.jpg" to URL+COMMAND for your doorcam (the same as in step 10)
Save the file (make sure it is saved on your Toon and not local)

Step 12:
Edit the file "DoorcamApp.qml"
Look for the rows where:
property string doorcamImageURL1 : "URL+COMMAND for your doorcam"
property string domoticzURL1 : "http://DOMOTICZ IP:DOMOTICZ PORT"
property string domoticzIDX : "IDX number of the created User Variable ShowDoorCamToon in Domoticz"
property string domoticzVAR : "ShowDoorCamToon"
Save the file (make sure it is saved on your Toon and not local)

Step 13:
Reboot Toon again.

Step 14:
Test by triggering the doorbell

If all steps are followed correctly you should now see an image of your doorcam on Toon as pop-up.

First time I had the issue that there was no pop-up.
On Toon ga to the tile and click on doorcam. Go to "Configuratie" and validade if the settings are correctly like in Domoticz.
Somehow the settings were not saved.

One thing I changed was the duration of the popup screen instead of 20 seconds to 30 seconds.

Good luck!
Toon2 with 5.13.12 firmware TSC 2.1.0
Apps: Calender, garbagecalender, traffic information, webcam, doorcam, public transport and weather app.
Xavier
Member
Member
 
Posts: 81
Joined: January 2019

Re: Door Camera

Postby oepi-loepi » Mon Sep 09, 2019 10:01 pm

After a long long time i took a look at this topic i have started a long time ago. Xavier figured it all out. Thanks for the walk-through!
oepi-loepi
Starting Member
Starting Member
 
Posts: 13
Joined: February 2019

Re: Door Camera

Postby Micha_123 » Sun Sep 15, 2019 11:15 am

nice its working, is it possible to stretch video to 16:9

my camera is 720P but makes screenshots in 704x576

stretch to 16:9 wil be realy nice
Micha_123
Starting Member
Starting Member
 
Posts: 13
Joined: September 2019

Re: Door Camera

Postby Toonz » Sun Sep 15, 2019 1:49 pm

Micha_123 wrote:nice its working, is it possible to stretch video to 16:9

my camera is 720P but makes screenshots in 704x576

stretch to 16:9 wil be realy nice

can you edit DoorcamFullscreen.qml?

change 2 times:
Code: Select all
      fillMode: Image.PreserveAspectFit

into:
Code: Select all
      fillMode: Image.PreserveAspectCrop


Haven't been able to test this as not having a doorcam myself ;-)

Kind regardz,

Toonz
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1234
Joined: December 2016

Re: Door Camera

Postby Micha_123 » Wed Sep 18, 2019 10:59 am

Nice i have fix it thank you.



Another question


If someone ring the doorbel
Toon shows first an old picture from camera and then it updates. Is that to fix? After reboot toonit shows the first time directly live picture, acter second bel i see first old picture (drom the first bell) ant then it updates the picture on live.


Is that to fix?
Micha_123
Starting Member
Starting Member
 
Posts: 13
Joined: September 2019

Re: Door Camera

Postby Toonz » Wed Sep 18, 2019 5:55 pm

I would say clear the source property of the image when going into dim state and fill it again when you open the screen.
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1234
Joined: December 2016

Re: Door Camera

Postby Micha_123 » Thu Sep 19, 2019 10:05 am

How can i do that?
Micha_123
Starting Member
Starting Member
 
Posts: 13
Joined: September 2019

Re: Door Camera

Postby Toonz » Thu Sep 19, 2019 10:50 am

someone needs to code that, best to ask oepi-loepie, it is his app.......
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1234
Joined: December 2016

PreviousNext

Return to Toon miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest