Door Camera

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

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Door Camera

Postby oepi-loepi » Sun Feb 10, 2019 7:27 pm

I have connected my doorbell through a Wemos D1 mini board to my existing doorbell. When someone rings, a message is pushed by Domoticz to an app "Telegram". Works great. I also added the door camera to Toon so when i choose the camera tile i will see my door entrance.

Would it be possible to trigger the Toon from a http command to open the camera app? And from another http command to close the camera app?

In that case it will be possible that the camera shows all by itself when someone rings at the door.

I was searching all afternoon in the rooted linux files but maybe someone has it running already....??
oepi-loepi
Starting Member
Starting Member
 
Posts: 11
Joined: February 2019

Re: Door Camera

Postby Toonz » Sun Feb 10, 2019 8:19 pm

Not yet. Maybe in the future when we can compile the qt-gui executable ourselves, we hopefully can include the QtWebsockets module which allows qml applications to react on external triggers on certain TCP IP ports.
For now the only option is to write a camera app on Toon which queries domoticz every x seconds to check the status.
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1193
Joined: December 2016

Re: Door Camera

Postby oepi-loepi » Sun Feb 10, 2019 11:44 pm

Thanks for your answer. I can now stop looking in the software without any bad feelings. It just isn't there (yet). Hopefully there will be a nice websocket in the future. Indeed for now the only solution would be pulling trigger variables from a server (internal) like Domoticz server or something every .. seconds. Not too long, not too much.
oepi-loepi
Starting Member
Starting Member
 
Posts: 11
Joined: February 2019

Re: Door Camera

Postby TheHogNL » Mon Feb 11, 2019 9:14 am

You could also try to port this to the Toon https://gist.github.com/apk/2414478
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1154
Joined: August 2017

Re: Door Camera

Postby Toonz » Mon Feb 11, 2019 9:45 am

TheHogNL wrote:You could also try to port this to the Toon https://gist.github.com/apk/2414478

it is just a piece of the puzzle, you will still need to be able to trigger qml events....
The QtWebsockets module is basically doing the same but fully integrated into the Qt (qml) environment.
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1193
Joined: December 2016

Re: Door Camera

Postby oepi-loepi » Mon Feb 11, 2019 1:02 pm

Would it be possible to post a trigger file to Toon by ftp containing 'true' or 'false' which is read every x seconds by the camera app? In this case the app status will be triggered by the contents of the trigger file instead of a click event. I is a big puzzle i agree and i do not have all knowledge of linux and qml... (more VB6 and Javascript).
oepi-loepi
Starting Member
Starting Member
 
Posts: 11
Joined: February 2019

Re: Door Camera

Postby Toonz » Mon Feb 11, 2019 4:52 pm

oepi-loepi wrote:Would it be possible to post a trigger file to Toon by ftp containing 'true' or 'false' which is read every x seconds by the camera app? In this case the app status will be triggered by the contents of the trigger file instead of a click event. I is a big puzzle i agree and i do not have all knowledge of linux and qml... (more VB6 and Javascript).

that's easy, but not much different from Toon doing a http call to domoticz at regular intervals
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1193
Joined: December 2016

Re: Door Camera

Postby oepi-loepi » Tue Feb 12, 2019 11:08 am

Yesterday i did some qml with just a simple notepad from the Toon. It was the first time programming qml but must say that is is quite easy if you know some JavaScript.

This is what i have done so far (using the 1.0.4 Webcam app fom the ToonStore).

1. I added a new string variable to Domoticz "ShowDoorCamToon". Set to "150".
2. A new timer is created to the webcam widget (3 seconds).
3. Every timer instance a get HTTP is send to Domoticz requesting the variable status of "ShowDoorCamToon".
4. The result is JSON so JSON is parsed and the variable result.value is checked.
5. If result is "200" then the camera app is shown full screen on Toon.
6. After the camera app is full screen a get HTTP is send to Domoticz setting the value of "ShowDoorCamToon" to 150.
7. The widget is still checking the Domoticz variable "ShowDoorCamToon" every 3 seconds.
8. If result is "100" then the camera app is closed (hidden).

Next to do is to modify the config/setup screens.

I will keep you all informed and thanks for the basic ideas. They were really a great help allready.
oepi-loepi
Starting Member
Starting Member
 
Posts: 11
Joined: February 2019

Re: Door Camera

Postby Xavier » Mon Mar 18, 2019 9:25 pm

oepi-loepi wrote:Yesterday i did some qml with just a simple notepad from the Toon. It was the first time programming qml but must say that is is quite easy if you know some JavaScript.

This is what i have done so far (using the 1.0.4 Webcam app fom the ToonStore).

1. I added a new string variable to Domoticz "ShowDoorCamToon". Set to "150".
2. A new timer is created to the webcam widget (3 seconds).
3. Every timer instance a get HTTP is send to Domoticz requesting the variable status of "ShowDoorCamToon".
4. The result is JSON so JSON is parsed and the variable result.value is checked.
5. If result is "200" then the camera app is shown full screen on Toon.
6. After the camera app is full screen a get HTTP is send to Domoticz setting the value of "ShowDoorCamToon" to 150.
7. The widget is still checking the Domoticz variable "ShowDoorCamToon" every 3 seconds.
8. If result is "100" then the camera app is closed (hidden).

Next to do is to modify the config/setup screens.

I will keep you all informed and thanks for the basic ideas. They were really a great help allready.


Nice, looping forward to new developments! Looking for exactly the same!!
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: 80
Joined: January 2019

Re: Door Camera

Postby oepi-loepi » Sat Apr 06, 2019 9:28 am

For anyone who is looking for the same option (connect Toon to Domoticz to show a doorcam when a doorbell is triggered), i have made some tutorial.

I am not a programmer and only adapted the Webcam App from makkie2002 (https://www.domoticaforum.eu/viewtopic. ... 38&start=0). Because of i am not a programmer, please feel free to use the code or parts of it. Please do not expect any kind of other service or updates.

To find the snap link of your camera, visit ispyconnect.com.

How it works:

1. There must be added a new string variable to Domoticz "ShowDoorCamToon". Set this to "150".
2. A new timer is created to the webcam widget (3 seconds).
3. Every timer instance a get HTTP is send to Domoticz requesting the variable status of "ShowDoorCamToon".
4. The result is JSON so JSON is parsed and the variable result.value is checked.
5. If result is "200" (set by Domoticz when doorbell is rung) then the camera app is shown full screen on Toon.
6. After the camera app is full screen a get HTTP is send to Domoticz setting the value of "ShowDoorCamToon" to 150.
7. The widget is still checking the Domoticz variable "ShowDoorCamToon" every 3 seconds.
8. If result is "100" then the camera app is closed (hidden).

What to do to make it work:

There must be added a new string variable to Domoticz "ShowDoorCamToon". Set this to "150".
Image

Make sure that when the doorbell rings, the Domoticz variable will be set to "200".
Image

Configuration od the doorcam App in Toon:
"camURL" : this is the url of the camera to the snapshot (e.g. "http://admin:admin@192.168.10.188/snap.jpg")
"domURL" : this is the path to Domoticz including port (e.g. "http://192.168.10.186:8080)
"idx" : this is the number of the variable made in Domoticz (e.g. "27")
"var" : this is the name of the variable made in Domoticz (e.g. "ShowDoorCamToon")
Attachments
doorcam-1.0.0.zip
(42.53 KiB) Downloaded 63 times
oepi-loepi
Starting Member
Starting Member
 
Posts: 11
Joined: February 2019

Re: Door Camera

Postby maikelvds » Mon Jul 01, 2019 8:32 pm

Really great! Thanks!
maikelvds
Starting Member
Starting Member
 
Posts: 15
Joined: January 2018

Re: Door Camera

Postby roykaandorp » Wed Jul 10, 2019 6:38 pm

Really great! This was what I'm looking for, but somehow I can't get the tile visible.
I just unzipped it in os x, after that I first edited the variables and copied it by scp to Toon within the right directore (/qmf/qml/apps/) and after that a "shutdown -r now"
But it doesn't appear, I've also tried to unzip in linux and then scp to toon.
What am I missing?
roykaandorp
Starting Member
Starting Member
 
Posts: 7
Joined: April 2018

Re: Door Camera

Postby Toonz » Wed Jul 10, 2019 8:25 pm

roykaandorp wrote:Really great! This was what I'm looking for, but somehow I can't get the tile visible.
I just unzipped it in os x, after that I first edited the variables and copied it by scp to Toon within the right directore (/qmf/qml/apps/) and after that a "shutdown -r now"
But it doesn't appear, I've also tried to unzip in linux and then scp to toon.
What am I missing?

Is the foldername 'doorcam' (no capitals)?
What is your firmware version? The app above works only on firmware 5 (can be adapted for version 4 of course)
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1193
Joined: December 2016

Re: Door Camera

Postby roykaandorp » Wed Jul 10, 2019 8:30 pm

Toonz wrote:Is the foldername 'doorcam' (no capitals)?

Yes that fixed the problem indeed, thank you!
Tried that before I updated the (old) firmware, it didn't work then and forgot to try again
roykaandorp
Starting Member
Starting Member
 
Posts: 7
Joined: April 2018

Re: Door Camera

Postby TheHogNL » Thu Jul 11, 2019 5:48 am

With older firmware you needed to change a file manually to allow to add a custom app. Since when the firmware uses resource file for the native Toon apps the custom files are automatically loaded if they are in the right place.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1154
Joined: August 2017

Next

Return to Toon miscellaneous

Who is online

Users browsing this forum: No registered users and 0 guests

cron