Smartphone at home, no time control?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Smartphone at home, no time control?

Post by ProjektC » Tuesday 26 December 2017 12:03

Hi

I have two electric lamps with scent.
The lamps are switched on and off several times a day.
The lamps always run for 1.5 hours and are then switched off for one hour.

Is there one possible that the lamps will not be turned on when one or two smartphones are not in the house?

If Domotoicz can request the WLAN IP from the smartphone, and if this IP is not available, the timer will be stopped.
If the WLAN IP is found by Smartphone 1 or 2, the time control continues to run normally.

Bye

Translated with www.DeepL.com/Translator

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Thursday 18 January 2018 13:58

If the German English translation has been bad, or no one has an idea how not to switch Time when the SmartPhone is not at home.

freijn
Posts: 387
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Smartphone at home, no time control?

Post by freijn » Thursday 18 January 2018 14:04

its resonable simple :-)

first step, in your DNS server ( router box) make sure the phones will ALWAYS get the same ip adresses.

In Domotics you can Ping this ip address for both phones. Make a or and a switch "somebody home"

Then in your on off script check if somebody home is true and stop switching on and off again.

Let me know how you are moving.

if its easier for you, reply in German , I keep the english though :-)

Cheers,

Frank

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Thursday 18 January 2018 14:37

Hallo Frank,

muss ich dafür ein Virtuellen Switch machen ?
Virtuellen Switch für Smartphone 1 mit somebody home ?
Virtueller Switch für Smartphone 2 mit somebody home ?

Szenario 1
Die beiden Duft Elektrokerzen gehen um 07:00 Uhr an und würden normal um 08:30 ausgehen.
Wenn beide Smarphone zb um 07:30 Uhr das Haus verlassen, müssten die Duft Kerzen nicht mehr laufen und könnten ausgeschalten werden.
Die Timer sollten nur laufen wenn ein oder beide SmartPhone anwesend sind.

Szenario 2
Normal würden die Duft Kerzen wieder von 10:00 Uhr bis 11:30 laufen bis Sie automatisch aubgeschalten werden.
Es sollte aber erst um 10:00 Uhr eingeschalten werden, wenn SmartPhone 1 "oder" Smartphone 2 im Haus angekommen ist.
Ist keines der SmartPhone zuhause, muss auch der Time nicht laufen.

Wenn SmartPhone 1 oder SmartPhone 2 zb um 10:30 wieder nach Hause kommt, sollte der Time angehen und seine Reguläre Zeit von 10:00 bis 11:30 durchführen.

Ich möchte es im Grunde vermeiden, das die zwei Duft Kerzen laufen, wenn keiner Zuhause ist.
In den Zeitinverwallen wenn ein oder zwei SmartPhone da sind, sollten die Timer aber laufen.

Hello, Frank,

do I have to make a virtual switch?
Virtual switch for Smartphone 1 with somebody's home?
Virtual switch for Smartphone 2 with somebody's home?

Scenario 1
The two scent electric candles go on at 07:00 and would normally go out at 08:30.
If both Smarphones leave the house at 07:30 o' clock, for example, the scent candles would no longer have to run and could be switched off.
The timers should only run when one or both smartphones are present.

Scenario 2
Normally the scent candles would run again from 10:00 am to 11:30 am until they are switched off automatically.
However, it should only be switched on at 10:00 a. m. when SmartPhone 1 "or" Smartphone 2 "has arrived in the house.
If none of the smartphones are at home, the time does not have to run.

When SmartPhone 1 or SmartPhone 2 comes back home at 10:30, for example, the time should start and run its regular time from 10:00 to 11:30.

I basically want to avoid the two scent candles running when no one is home.
In the time slots when one or two smartphones are present, the timers should run.

Translated with www.DeepL.com/Translator
Attachments
Duft Flur.jpg
Duft Flur.jpg (155.45 KiB) Viewed 869 times
Wohnzimmer.jpg
Wohnzimmer.jpg (170.71 KiB) Viewed 869 times

freijn
Posts: 387
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Smartphone at home, no time control?

Post by freijn » Thursday 18 January 2018 15:39

I will make some screenshots for you this evening :-)

freijn
Posts: 387
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Smartphone at home, no time control?

Post by freijn » Thursday 18 January 2018 20:18

Create a ping device. From the menu goto hardware and select ping.
Add the both FIXED ipadresses of your homework telephone wifi.
somebodyhome.jpg
somebodyhome.jpg (47.76 KiB) Viewed 844 times
Create a vitural swtich
pingdevice.JPG
pingdevice.JPG (71.24 KiB) Viewed 844 times
Create the blocky with the names you have used.
somebodyhome.jpg
somebodyhome.jpg (47.76 KiB) Viewed 844 times

if this is working , create a blocky which checks is "somebody home' is true.
Then swtich off or on your lights.

Hope this helps you

freijn
Posts: 387
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Smartphone at home, no time control?

Post by freijn » Thursday 18 January 2018 20:20

Something went wrong sorry.

The virtual switch
virtualswitch.jpg
virtualswitch.jpg (31.66 KiB) Viewed 842 times

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Friday 19 January 2018 0:49

Hi,

Du hast vier Bilder gemacht.
Bild 1 und 3 ist das gleiche ?
Was genau ist der Virtuel Switch ?
Sind im Virtual Switch die zwei Duftlampe eingefügt ?
Ich habe das nun so gemacht wie gemeint.
Passt das mit den Bilder so ?

Wie werden dann die Timer gesetzt ?
Durch das Virtual Switch, weil darin die zwei Geräte sind mit den Timer ?
Das Event sagt SmartPhone ist da, also Timer gehen weiter ?
Das Event sagt SmartPhone ist nicht da, Timer werden gestoppt ?

Hi,

You added four pictures.
Picture 1 and 3 is the same?
What exactly is the Virtual Switch?
Are the two fragrance lamps inserted in the Virtual Switch?
I've done what I said.
Does it fit with the pictures?

How are the timers set then?
Through the virtual switch because in it the two devices are equipped with the timer?
The event says SmartPhone is here, so timer goes on?
The event says SmartPhone is not there, timers are stopped?

Translated with www.DeepL.com/Translator
Attachments
SmartPhones_IP.jpg
SmartPhones_IP.jpg (109.26 KiB) Viewed 826 times
SmartPhones_Device.jpg
SmartPhones_Device.jpg (38.32 KiB) Viewed 826 times

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Friday 19 January 2018 0:53

Next
Attachments
Unbenannt.jpg
Unbenannt.jpg (76.54 KiB) Viewed 787 times
Virtual_Device_Bild2.jpg
Virtual_Device_Bild2.jpg (132.31 KiB) Viewed 821 times
Virtual_Device_Bild1.jpg
Virtual_Device_Bild1.jpg (19.75 KiB) Viewed 821 times
Last edited by ProjektC on Friday 19 January 2018 21:27, edited 1 time in total.

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Friday 19 January 2018 21:10

Ich bin mir nicht sicher, was mit dem Virtua Switch gemacht werden muss.
Kommen da nur die zwei Duft Lampen rein ?
Muss dann der Timer weiterhin bei der jeweiigen Duft Lampe eingestellt sein oder im Virtual Switch ?

I'm not sure what to do with the Virtua Switch.
Are only the two fragrance lamps coming in?
Does the timer still have to be set on the respective fragrance lamp or in the virtual switch?

freijn
Posts: 387
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Smartphone at home, no time control?

Post by freijn » Friday 19 January 2018 22:06

You are correct , the virtual switch was 'just' to have a visual on a dashboard if somebody home and as a "variable" to react on.

if there is nothing more to respond on if somebody is home then indeed you can do without, orderwise you could test the virtual switch only and
switch on/off heating or other lights.

is it now working as you would like it to work?

Cheers,

Frank

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Friday 19 January 2018 22:18

Hallo,

ich verstehe noch nicht wie die Timer geschalten werden.
Wenn mindestens 1 SmartPhone Zuhause ist, soll derTimer von den Duftlampen laufen.
Wenn kein Smartphone Zuhause ist, soll der Timer nicht laufen und ausgesetzt werden.
Ist wieder ein Smartphone Zuhause, geht es wieder weiter mit dem Timer.

Irgendwie verstehe ich das so, das die Timer nicht mehr greifen.
Die Duft Lampen werden nur noch über das Virtua Switch geschalten, wenn ein Smartphone über Ping erreichbar ist.
Die SmartPhone schalten über Ping ein oder aus, die Lampen aber nicht mehr die Timer ?

Hello,

I still don't understand how the timers are switched.
If at least 1 SmartPhone is at home, the timer should run from the fragrance lamps.
If there is no smartphone at home, the timer should not run and should be suspended.
When a smartphone is home again, the timer continues.

Somehow I understand that the timers don't work anymore.
The fragrance lamps are only switched via the Virtua Switch when a smartphone is reachable via ping.
The SmartPhone switches on or off via Ping, but the lamps no longer switch on or off the timers?

freijn
Posts: 387
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Smartphone at home, no time control?

Post by freijn » Friday 19 January 2018 23:14

Capture.JPG
Capture.JPG (31.62 KiB) Viewed 768 times
What about this? LampFrank is your Candle

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Saturday 20 January 2018 11:03

Nichts
Last edited by ProjektC on Saturday 20 January 2018 21:58, edited 2 times in total.

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Saturday 20 January 2018 21:57

Hi,

ich glaube ich habe nun was passendes gebaut, bin aber nicht sicher ob das geht.
Wenn es 07:00 Uhr und das SmartPhone erreichbar ist, geht ein passender 90 Minuten Timer an Lampe 1 und Lampe 2.
Das sind meine 1,5 Stunden.
Ist das SmartPhone aus, gehen die Lampen aus.
Ist das SmartPhone wieder an, gehen die Lampen an.
Das funktioniert soweit super.
Meine frage ist nun, geht das innerhalb der 90 Minuten, oder wird bei jeder Schaltung vom Smartphone (Ping) wieder auf 90 Minuten verlängert ?
Wenn das immer verlängert wird, wie kann ich das einstellen, das dieses ein und aus vom SmartPhone nur innerhalb der 90 Minuten geht ?
Danach sollte Pause sein, und der nächste Vorgang soll zb um 09:30 Uhr sein, mit der gleichen Bickly nur das diese um 09:30 Uhr beginnt.

I think I've built something suitable, but I'm not sure if that's possible.
If it is 07:00 o' clock and the SmartPhone is reachable, a suitable 90 minutes timer goes to lamp 1 and lamp 2.
That's my 1.5 hours.
If the SmartPhone is off, the lamps will go out.
When the SmartPhone is on again, the lights will go on.
This works great so far.
My question is, can this be done within the 90 minutes, or is it extended to 90 minutes every time the smartphone (ping) is switched on?
If this is always prolonged, how can I set this to go on and off from the smartphone only within the 90 minutes?
After that there should be a break, and the next process should be at 09:30, with the same Bickly only starting at 09:30.
Attachments
Unbenannt.png
Unbenannt.png (42.79 KiB) Viewed 730 times

freijn
Posts: 387
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Smartphone at home, no time control?

Post by freijn » Monday 22 January 2018 12:05

Next level :-)

As a fist line in your script please check if
Flurduft = ON

if so, do nothing and exit the script. So in this mather the 90 min will start only once.

If you require lets say a 10 min instead of 90 you do need to make some calcualtioh to the end time and set the OFF event with the calculated minutes.

Hope this helps you

Frank

ProjektC
Posts: 55
Joined: Sunday 17 December 2017 18:59
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Germany
Contact:

Re: Smartphone at home, no time control?

Post by ProjektC » Monday 22 January 2018 15:15

Hi,

Next Level again ;)

Zeit 1 bis Zeit 2 + SmartPhone geht die Lampe an.
Zeit 1 bis Zeit 2 SmartPhone nicht erreichbar = Lampe aus
Zeit 1 bis Zeit 2 SmartPhone erreichbar = Lampe ein
Zeit 3 = Endzeit von Zeit 2 geht Lampe aus

Das funktioniert soweit ohne Probleme.
Es gibt aber zwei Sachen die Stören.

Ping ist sehr instabile und nicht zuverlässig.
Ich habe bei Ping nicht die Werte gefunden, damit das SmartPhone Zuverlässig länger Ein ist.
Wenn das SmartPhone 3 bis 6 Minuten kein Ping hat, wegen Standby geht das SmartPhone in Domoticz auf Off und auch die Lampe Off.
Der Ping müsste besser mit 3 bis 6 Minuten Timeouts umgehen können.

Weiter habe ich das Problem.
Lampe 1 und Lampe 2 muss ich mit SET immer Extra machen, damit diese geschalten werden.
Wenn ich statt zwei Zeilen nur eine mache mit Zeit 1 bis Zeit 2 = Lampe 1 und Lampe 2 = On
Sehe ich in Domoticz Log das Lampe 1 und Lampe 2 geschalten wird, aber die werden nicht geschalten.

Hi,

Next Level again;)

Time 1 to time 2 + SmartPhone turns on the lamp.
Time 1 to time 2 SmartPhone not available = lamp off
Time 1 to time 2 SmartPhone reachable = lamp on
Time 3 = End time of time 2 goes out Lamp off

This works so far without any problems.
There are two things that bother you.

Ping is very unstable and unreliable.
I didn't find the values in Ping so that the SmartPhone is reliably on longer.
If the SmartPhone doesn't have a ping for 3 to 6 minutes, because of standby the SmartPhone goes off in Domoticz and also the lamp off.
The ping should be able to cope better with 3 to 6 minutes of timeouts.

Next, I have the problem.
Lamp 1 and lamp 2 must always be extra with SET, so that they are switched.
If I make only one line instead of two with time 1 to time 2 = lamp 1 and lamp 2 = On
I see in Domoticz Log that lamp 1 and lamp 2 is switched, but they are not switched.


Translated with www.DeepL.com/Translator
Attachments
Unbenannt2.png
Unbenannt2.png (398.85 KiB) Viewed 667 times
Unbenannt1.png
Unbenannt1.png (278.81 KiB) Viewed 667 times

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests