Coder Social home page Coder Social logo

py3buddy's Introduction

py3buddy

WARNING: during a test of this project, our i-Buddy started to burn. Do not run this device unattended!

Python 3 code to work with the iBuddy MSN figurine released under the MIT license.

  • py3buddy.py -- main file with class

  • py3buddydbus.py -- DBus wrapper around the iBuddy, accepts commands in the macro language and executes it

  • py3buddydemo.py -- demo code (panic, looping through all colours, 8 sided dice, executing commands)

  • py3buddyearthquake.py -- demo code (monitoring a Twitter channel with earthquake information and shake whenever the earth shakes). Needs the Python Twitter bindings (python3-twitter package on Fedora).

  • py3buddyearthquakedbus.py -- demo code (monitoring a Twitter channel with earthquake information and shake whenever the earth shakes). Communicates over DBus with the iBuddy. Needs the Python Twitter bindings (python3-twitter package on Fedora).

  • py3buddypidgin.py -- demo code to process some smileys from Pidgin using DBus

  • py3buddy.config -- example configuration file

  • 99-ibuddy.rules -- udev rules for iBuddy with productid 0x0001, 0x0002, 0x0004 and 0x0005. Add this to the right udev directory on your system (for example: /etc/udev/rules.d/ on Fedora).

  • macro-language.txt -- a description of the macro language that can be used to control the iBuddy.

This code has been tested with iBuddy devices with USB product id 0x0001, 0x0002 (regular) and 0x0004 (iBuddy Twins). There are apparently more iBuddy devices out there with different product ids (for example there are rumours that there are devices with 0x0006).

People have reported success with:

  • iBuddy Devil (id 0x0005)

The following devices have not been tested with:

  • iBuddy black/white
  • iBuddy Angel
  • iBuddy Molly (if this was ever released)

This code was inspired by pybuddy (especially the idea for a macro language, although the original product also had something like this), but no code was copied. The code for pybuddy can be found here (note: the original Google code site seems to gone):

https://github.com/ewall/pybuddy/

The original version of pybuddy came with the following notice:

pybuddy: Python daemon to control your i-buddy USB device

by luis.peralta, Jose.Carlos.Luna, and leandro.vazquez
released under MIT License (http://www.opensource.org/licenses/mit-license.php)

Buying an iBuddy

As these devices were a flop they are a bit difficult to find, but with some effort you can still find them. There might still be shops selling them (at either full, or reduced prices) but in the past sellers have also offered them in bulk.

py3buddy's People

Contributors

armijnhemel avatar garbas avatar megfault avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

py3buddy's Issues

usb.core.NoBackendError

`python py3buddydemo.py -c py3buddy.config

py3buddydemo.py:127: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead.

config.readfp(configfile)
Traceback (most recent call last):
File "py3buddydemo.py", line 176, in
main(sys.argv)
File "py3buddydemo.py", line 150, in main
ibuddy = py3buddy.iBuddy(buddy_config)
File "C:\Users\mikit\OneDrive\Documenti\GIT\py3buddy\py3buddy\py3buddy.py", line 138, in init
idProduct=buddy_config['productid'])
File "C:\Users\mikit\AppData\Local\Programs\Python\Python37\lib\site-packages\usb\core.py", line 1263, in find
raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available`

Not an issue, more like a warning: i-Buddy was starting to burn

Hi Armijn,

lacking a more suitable way to contact you, I just want to let you know that during a simple test at the NixCon hackday the i-Buddy started to smoke and we quickly disconnected it.

So, we will probably finish nix-packaging it, but I want to save other developers from getting their computer catch fire. I might add a very big warning to the top of the README. Just wanted to inform you and other devs ASAP to prevent accidents before we finish our work here.

Cheers,
Ana

usberror in mac

$ sudo python3 py3buddydemo.py -c py3buddy.config
Password:

py3buddy demo scripts

Demo 1: PANIC!

Traceback (most recent call last):
  File "py3buddydemo.py", line 166, in <module>
    main(sys.argv)
  File "py3buddydemo.py", line 149, in main
    panic(ibuddy,10)
  File "py3buddydemo.py", line 16, in panic
    ibuddy.reset()
  File "/Users/leandro/git/py3buddy/py3buddy.py", line 171, in reset
    self.dev.ctrl_transfer(0x21, 0x09, 2, 1, setupmsg)
  File "/usr/local/lib/python3.6/site-packages/usb/core.py", line 1034, in ctrl_transfer
    self._ctx.managed_claim_interface(self, interface_number)
  File "/usr/local/lib/python3.6/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/usb/core.py", line 167, in managed_claim_interface
    self.backend.claim_interface(self.handle, i)
  File "/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 811, in claim_interface
    _check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
  File "/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.