• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


ping
#11
Sorry but this dosent works.

OK here an Other Szenario.
I Live in a Hous. When i drive with my car in the Garage my IPhone connect in the wlan.
My idea is when my IPhone connect in the wlan the lamp in the floor go on.
I make a Test with a elro_hc device.
My config is
Code:
"devices": {
      "floorlight": {
            "protocol": [ "elro_hc" ],
            "id": [{
                "systemcode": 15,
                "unitcode": 23
            }],
            "state": "off"
        },
         "handycheck": {
            "protocol": [ "ping" ],
            "id": [{
                "ip": "192.168.178.103"
                }],
            "state": "disconnected"
        }
},
"rules": {
           "lighton": {
            "rule": "IF handycheck.state IS connected AND floorlight.state IS off THEN switch DEVICE floorlight TO on",
            "active": 1
        }
}
i turn off my wlan on the iphone, start the pilight service and turn on my wlan on the iphone.
But nothing happened.
When i understand curlymo wright the handycheck.state is showen me when i make a pilight-receive but ther is nothing when i start pilight-receive.
So it is a bug in the Protokoll or is my configuration wrong?
 
Reply
#12
Could be a bug. It's however not that easily fixed and therefor won't happen in the upcoming version.
 
Reply
#13
That's ok, it's not so important.
Can you tell me when you fix it or I can help you or test it?
 
Reply
#14
I got me a small alternative considered.
There are 2 shell scripts with the following content.
Code:
#!/bin/bash
# Sriptname: handy_on.sh
#
_deviceIP="192.168.178.113"


until ping -c 1 $_deviceIP >/dev/null
do
        sleep 10
done

pilight-send  -p elro_hc -s 15 -u 29 -t
./handy_off.sh
And the second
Code:
#!/bin/bash
#Scriptname: handy_off.sh
_deviceIP="192.168.178.113"
while ping -c 1 $_deviceIP >/dev/null
do
        sleep 10
done
pilight-send -p elro_hc -s 15 -u 29 -f
./handy_on.sh
it is almost perfect suffer I do not know how I can display the status of the lamp in the webgui.
Is there a possibility?
 
Reply
#15
Just configure the elro_hc device as described in the wiki. If that protocol hasn't been updated yet, refer to the others as examples.
 
Reply
#16
Ok I have the elro_hc device in my config.json and I can see it in my webgui.
But when i turn on the Device with the script, the status in the webgui isen´t on
 
Reply
#17
Can we discuss your config somewhere else. Doesn't have much to do with the ping protocol.
 
Reply
#18
OK I´m sorry
 
Reply
#19
I have a similar configuration with my TV, when i turn the TV on i can ping the TV's IP address (TVipaddress) and it turns the backlit connected to the dimmable quigg switch (quiggTVLight) on. The state of the switch is shown on the GUI. On the GUI I use the state of a second generic switch (TVautomode - no physical device associated) to turn this automatic on or off.
Code:
"rule": "IF TVautomode.state IS on AND TVipaddress.state IS connected AND quiggTVLight.state IS off THEN switch DEVICE quiggTVLight TO on",
As it seems to work in general, could it be that we chase here a hardware / OS related problem ?
My environment:
Pi Model B
Raspbian
Internal Ethernet
Linux Kernel 3.12.35+
pilight compiled on the Pi
@chief-wiggem:
Can you please post more details on your hardware / software configuration
 
Reply
#20
My environment:
Pi Model B+
Raspbian
Internal Ethernet
Linux Kernel 3.18.3+
pilight from the nightly apt source
Version v5.0-249-g9a8eb35
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)