Is Connected

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Mon Jun 19, 2017 4:25 pm

also. have you tried the new version of the system plugin?

viewtopic.php?f=5&t=9588

this version will show every single device that gets attached to and from the system. even the serial ports created by widcom (BT)

this may also help you to get what you want.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 323
Joined: Fri Jul 03, 2009 10:04 am

Re: Is Connected

Post by Snowbird » Mon Jun 19, 2017 5:35 pm

kgschlosser wrote:ok i am going to give you exactly what you want. did you go and read that tutorial about the geofencing?

well the author of it has a beta version out that does just what you want. it uses BT transmissions as a beacon where you can set your location relative to it. and there is a plugin for his application that will send the entering or leaving events to EventGhost. you have to register for the beta to be able to use it. but it's an easy process. you would have to click on the help for his app and it will bring you to a forum and his website where there is more information about the beta version.


it's called EgiGeozoneBT
it seems to do what I need, the only thing that bothers me is the fact that I have to install one more apps on my phone :) but i'll give it a try, thank you ! ;)

Snowbird
Experienced User
Posts: 323
Joined: Fri Jul 03, 2009 10:04 am

Re: Is Connected

Post by Snowbird » Mon Jun 19, 2017 5:40 pm

kgschlosser wrote:also. have you tried the new version of the system plugin?

viewtopic.php?f=5&t=9588

this version will show every single device that gets attached to and from the system. even the serial ports created by widcom (BT)

this may also help you to get what you want.
Should I install only the plugin System 1.1.22 or your WIP setup ? I tried to install the plugin but it appears in red in the plugin list, should I simply replace it with the one located here :
C:\Program Files (x86)\EventGhost\plugins\System ??

I'm not sure I'm doing the right thing :) Plus, I have RC2 installed, isn't it already included ?
Thanks.

User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Tue Jun 20, 2017 6:05 am

OYE!

I thought I posted an updated version of it...

Give me a day or so on it i want to walk through the current version make sure it is running right and then post it...
it is only going to work with EG 0.5 rc-2 or newer.
I have to modify a couple of bits in it to update it to be compliant with the next release of EG


it is not included in rc2
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Thu Jun 22, 2017 7:25 pm

@Snowbird


I added the newest version of the system plugin to link i posted earlier. so give it a go and see if that will work for you.
If you like the work I have been doing then feel free to Image

Sem;colon
Experienced User
Posts: 592
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Is Connected

Post by Sem;colon » Sun Jun 25, 2017 3:08 pm

Cool plugin, but doesn't work for me somehow...
inconnected.PNG

User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Sun Jun 25, 2017 4:34 pm

Yeah I know it has an issue. Unfortunately it had to be put on the back burner for a little bit. I will be revisiting it soon. It's going to be something that is pretty domb as to why it is not working. It's a pretty simple concept. Create a socket to an IP. If it refuses the connection the host is connected. If it connects the host is connected. If it times out the host is not connected. I know I had it running on my end. I don't know what I may have changed to make it stop working. As soon as I tested it. I packaged it and attached it. Only thing I could have done is packaged up a wrong version of it. I have to check. I will do this when I get home in 8 hours or so
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Thu Jun 29, 2017 10:26 pm

OK I just took a look at this...

I need someone to test something for me.

when adding a device set the How long to check for to 1.5 seconds. this seems to be the sweet spot for detecting the connection properly. and if that is the case I will have to set a minimum on that control to be there if that is the case.
If you like the work I have been doing then feel free to Image

Sem;colon
Experienced User
Posts: 592
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Is Connected

Post by Sem;colon » Sat Jul 01, 2017 10:00 pm

Nope, still doesn't work for me...

User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Sat Jul 01, 2017 10:31 pm

maybe try pushing that timeout higher. make it a 5 second thing and see if you get something then.
If you like the work I have been doing then feel free to Image

Sem;colon
Experienced User
Posts: 592
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Is Connected

Post by Sem;colon » Mon Dec 18, 2017 8:33 pm

Nope, it just doesn't work, no matter what I set there

User avatar
Possessed
Posts: 9
Joined: Thu Jun 01, 2017 5:35 am

Re: Is Connected

Post by Possessed » Fri Dec 22, 2017 1:37 am

I was having a similar issue. Using with a vizio tv to see if it was on or not. The thing that seemed to make it work was bumping up the 'How long to check' parameter. I am not sure what is optimal but I think I just set it at 2 seconds and it seemed to be rock solid.
isconnected.JPG

User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Fri Dec 22, 2017 8:13 am

This is something I am going to have to tinker with a bit more. all I am doing with this plugin is making a socket connection to the device. if I get a refusal. then the device is there. if I get a connection then the device is there. if it times out then no device. I have to play around with it a bit more to figure out why sometimes i get a timeout before a refusal. it could be that if you make a query to rapidly then it will just simply ignore the request. maybe i should have it select a random port each time. this might solve the problem.
If you like the work I have been doing then feel free to Image

dpower
Posts: 1
Joined: Thu Nov 17, 2011 2:32 pm

Re: Is Connected

Post by dpower » Tue Jan 02, 2018 4:26 am

The plugin works for me if I set my phone to a static IP. But if I use the iOS device "Name" in the "Host Name/IP Address" plugin field (i.e. with a dynamic IP), I get a Python error as pasted below. It seems to be crapping out on a non-printable character (unless I'm misinterpreting the message.)

Any thoughts on why this might be happening?


Exception in thread eg.UserPluginModule.IsConnected.My Phone:
Traceback (most recent call last):
File "threading.pyc", line 532, in __bootstrap_inner
File "threading.pyc", line 484, in run
File "C:\ProgramData\EventGhost\plugins\IsConnected\__init__.py", line 242, in run
notice_ip = _validate_ip(self.host)
File "C:\ProgramData\EventGhost\plugins\IsConnected\__init__.py", line 165, in _validate_ip
return _netbios_to_ip(ip)
File "C:\ProgramData\EventGhost\plugins\IsConnected\__init__.py", line 153, in _netbios_to_ip
data = _prepare_netbios_query(trn_id, netbios_name)
File "C:\ProgramData\EventGhost\plugins\IsConnected\__init__.py", line 84, in _prepare_netbios_query
return header + payload
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128)

User avatar
kgschlosser
Site Admin
Posts: 3928
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Is Connected

Post by kgschlosser » Tue Jan 02, 2018 5:26 pm

there are several mechanisms that are used to try to determine the IP address of the device. one of them being to query netbios to achieve this if there is no dns server that can.

I would need an example of the name you are plugging in, in order to be able to figure out what is going on. but I am thinking it might be a unicode thing.
If you like the work I have been doing then feel free to Image

Post Reply