Updates Available for pymata-aio, s2aio and FirmataPlus

Pymata-aio version 2.14 and s2aio version 2.9 are now available on Pypi.

To upgrade s2aio to the latest version, in a command window type:

pip install s2aio --upgrade

This should update both s2aio and pymata_aio.

To upgrade pymata-aio, in a command window type:

pip install pymata-aio --upgrade

FirmataPlus and its variants have been updated and are baselined against StandardFirmata 2.5.3.

These libraries now support both PyMata and pymata-aio. You can download the zip file here and installation instructions can be found here.


  1. Hello, when I try to set my analog pin 10 with set_pin_mode(10, Constants.ANALOG) I got an error "ValueError: bytes must be in range(0, 256)". I want to use all 16 analog Pins of my Arduino MEGA2560. What did I wrong? Hope you can help me

  2. Could you please copy the full ValueError exception traceback on your screen and paste it here. T

    Also, please make sure you are using the latest version of pymata-aio. When you start your program, you should see a banner and the version number is printed. The latest version is 2.31.

  3. Traceback (most recent call last):
    File "C:/Users/Tim/PycharmProjects/thesis/", line 16, in
    board.set_pin_mode(10, Constants.ANALOG, my_callback)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\", line 598, in set_pin_mode
    File "C:\Users\Tim\AppData\Local\Programs\Python\Python37-32\lib\asyncio\", line 584, in run_until_complete
    return future.result()
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\", line 1186, in set_pin_mode
    await self.enable_analog_reporting(pin_number)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\", line 722, in enable_analog_reporting
    await self._send_command(command)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\", line 2035, in _send_command
    result = await self.write(data)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\", line 77, in write
    result = self.my_serial.write(bytes([ord(data)]))
    ValueError: bytes must be in range(0, 256)

    Process finished with exit code 1

    I also made sure i have the latest Version of pymata-aio and firmataplus. I just tried your example which is given here: and replaced the analog pin 2 with a 10.

  4. Thanks. I can recreate the problem and am now working on a solution.
    I have moved this as an issue against pymata-aio and you can view the issue and status here:

  5. Sorry the link is incorrect. Here is the correct link:

  6. I don't know if you are monitoring the github site or not, but I believe I have fixed your problem with release 2.33. Please post a comment here to let me know if things are working for you or not:

    In the future, please either generate an issue in Github if you find a bug, or if you just have a question, please email me at


  7. it works! thanks for your fast support! :) have a great day
    and I will keep it in mind if I have any questions next time.:)