Door Camera
Moderators: marcelr, TheHogNL, Toonz
-
- Advanced Member
- Posts: 636
- Joined: Sat Feb 09, 2019 7:18 pm
Door Camera
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....??
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....??
Re: Door Camera
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.
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
-
- Advanced Member
- Posts: 636
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Door Camera
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.
Re: Door Camera
You could also try to port this to the Toon https://gist.github.com/apk/2414478
Member of the Toon Software Collective
Re: Door Camera
it is just a piece of the puzzle, you will still need to be able to trigger qml events....TheHogNL wrote:You could also try to port this to the Toon https://gist.github.com/apk/2414478
The QtWebsockets module is basically doing the same but fully integrated into the Qt (qml) environment.
member of the Toon Software Collective
-
- Advanced Member
- Posts: 636
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Door Camera
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).
Re: Door Camera
that's easy, but not much different from Toon doing a http call to domoticz at regular intervalsoepi-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).
member of the Toon Software Collective
-
- Advanced Member
- Posts: 636
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Door Camera
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.
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.
Re: Door Camera
Nice, looping forward to new developments! Looking for exactly the same!!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.
Toon2 with 6.0.2 firmware TSC 2.1.7
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
Apps: Sonos, Calender, garbagecalender, webcam, doorcam, Onkyo, Domoticzboard, Solar and weather app.
-
- Advanced Member
- Posts: 636
- Joined: Sat Feb 09, 2019 7:18 pm
Re: Door Camera
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 (viewtopic.php?f=99&t=12138&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".
Make sure that when the doorbell rings, the Domoticz variable will be set to "200".
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")
I am not a programmer and only adapted the Webcam App from makkie2002 (viewtopic.php?f=99&t=12138&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".
Make sure that when the doorbell rings, the Domoticz variable will be set to "200".
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 586 times
Re: Door Camera
Really great! Thanks!
-
- Starting Member
- Posts: 8
- Joined: Tue Apr 24, 2018 11:42 pm
Re: Door Camera
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?
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?
Re: Door Camera
Is the foldername 'doorcam' (no capitals)?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?
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
-
- Starting Member
- Posts: 8
- Joined: Tue Apr 24, 2018 11:42 pm
Re: Door Camera
Yes that fixed the problem indeed, thank you!Toonz wrote:Is the foldername 'doorcam' (no capitals)?
Tried that before I updated the (old) firmware, it didn't work then and forgot to try again
Re: Door Camera
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