poppy-project / poppy-creature

A depreciated project. Now integrated in pypot
GNU General Public License v3.0
5 stars 4 forks source link

poppy-discover #11

Closed show0k closed 8 years ago

show0k commented 8 years ago

A tool to find poppy robots on local network (thanks to zeroconf protocol). Needed to be tested on Windows and OSX.

ghost commented 8 years ago

I get a nasty Zeroconf error on Mac OS:

ERROR:zeroconf:Unknown error, possibly benign: error(9, 'Bad file descriptor')
Traceback (most recent call last):
  File "/path/to/poppy-creature/lib/python2.7/site-packages/zeroconf.py", line 829, in run
    rr, wr, er = select.select(rs, [], [], self.timeout)
error: (9, 'Bad file descriptor')
show0k commented 8 years ago

@damiencaselli can you try again ?

ghost commented 8 years ago

:+1: for me

show0k commented 8 years ago

I tested on a windows 7 without bonjour print services... and it works !

ghost commented 8 years ago

Good news !

show0k commented 8 years ago

We have to find a matching pattern for odroid mac adresses (it is not public). Can you post here mac adresse of odroid board ?

pierre-rouanet commented 8 years ago

:+1: Cool! :+1:

I just noticed:

Found potential Poppy robot:
Has a Poppy robot home page : False
IP address : 193.50.110.136
hostname : poppy-minaj
online : True
MAC address : 00:1e:06:30:13:2c
Has a 'poppy' name : True
Is a Raspberry Pi or a Odroid : False

Should be a Odroid. Maybe XU4 have another range of MAC addresses?

show0k commented 8 years ago

Our XU4 has for prefix 00:1E:C2 (we have only one) ; and it's a pure random for Odroid u3. We need to add a zeroconf publisher in the poppy-installer to find them without trying to find every poppy home page (which is slow). We can add a "poppy" zeroconf publisher like that (to be launch at startup of a poppy robot) : avahi-publish -s PoppyHostname _poppy._tcp 5353

pierre-rouanet commented 8 years ago

@show0k Do you think we should integrate it in the next release? Maybe it's safer to just post-pone it to the next major?

show0k commented 8 years ago

Safer, why would it be dangerous? We should improve the global variable with a simple class, but I don't see any reason to wait any longer. As it tied in one file, it could be interesting to add it directly in the poppy-creature code. What do you think ?

pierre-rouanet commented 8 years ago

By safer, I meant not postpone the release (again and again) because we did not have time to properly test this before. But I agree it's not so critical it just additional features it should not break anything.

I'm not a big fan of copying code. I would rather add pyzeroconf as a "strong" dependencies as it will be easily and quickly installed.

show0k commented 8 years ago

I'm not fan of copying code but I'm not confident with small dependencies not wiedly used which can be updated a broken easily by the maintainer. But, as the maintainer say he uses it in big production project and have published this fork to maintain a working version it should not happen.

pierre-rouanet commented 8 years ago

Either:

show0k commented 8 years ago

Ok for the first one !