This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Device online?

Is there a way to check if a device is online?
My tv is connected to lan and my goal is to switch a light (hyperion) when it's online.
I've used this with domoticz, but i can't find it in Homey.

Comments

  • You could (if you turn on your TV in a flow) set a variable with it's state to keep track of it.
  • Or, if you also switch the TV with a controllable socket use the state of that socket.
  • I don't really get this. My tv is a samsung smarttv and i can't add this a an device.
    Could you give me an example?
  • It would be Nice if i could Ping this device. And return the answer to homey.
  • If you use Homey to turn on your TV, you could at the same time (in the same flow or a different one) turn on your light. If you use the TV's remote to turn on the TV, maybe you could teach Homey the IR signal so it triggers the light flow.

    Or see if your TV has a web server so you can poll it using HTTP. If it responds, turn on a light. Pinging also works, but you'll have to write an app for that (you could use Better Presence as an inspiration, that should have all the code you need).
  • A lot of devices won't react on Ping, for example Apple IOS wont react to it.
    So its not always reliable.
  • Extremely easy to test though :)
  • My smarttv is a lan device and pinging the tv works 100% in domoticz. Remote control is not stable. Still don't know what to do.
  • Does your TV have a web server? Can you connect to it using your browser? 
  • posthok said:
    It would be Nice if i could Ping this device. And return the answer to homey.

    I will try creating a ping app.
  • Maybe you can use https://apps.athom.com/app/info.matjaz.presence?category=tools It has a Ping-option to check if a device is pingable.. ;)
  • IIRC you can't ping from Homey, that's why the presence-app needs a second computer/RPI?
  • IIRC you can't ping from Homey, that's why the presence-app needs a second computer/RPI?
    Oops, i didn't read the complete discrition of the app..
  • posthokposthok Member
    edited April 2016
    That would be Nice thanx.
    I don't have The skills to do that.
  • IIRC you can't ping from Homey, that's why the presence-app needs a second computer/RPI?
    IIRC it was ARP that was not possible. Maybe @MatjaLipu can tell us more.
  • Maybe you can use https://apps.athom.com/app/info.matjaz.presence?category=tools It has a Ping-option to check if a device is pingable.. ;)

    Thanks, I will also have a look at this : https://www.npmjs.com/package/net-ping
  • There are no (ping, arp-scan) binaries available in Homey apps, even more, ping and arp packets need root privileges to be sent, which is not possible in Homey app. That's why supporting tracker is required.

    You can use presence app and TCP connect provider, which checks if it can connect to specified ip/port(TCP). This could be also done in Homey app alone. See TCP connect provider.
Sign In or Register to comment.