Mote resetting

I’ve got a mote with 4 led sticks on my Pi3. I was following the mote/homekit tutorial but got an error as I didn’t have Pyserial. After I installed Pyserial (3.1.1) it still wasn’t working and the mote kept resetting. I went back to basics and tried the Pimoroni examples which all work fine - except test.py which causes the mote to reset with the following error:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/serial/serialposix.py”, line 475, in write
n = os.write(self.fd, d)
OSError: [Errno 5] Input/output error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “test.py”, line 45, in
mote.show()
File “/usr/local/lib/python3.4/dist-packages/mote/init.py”, line 166, in show
self.port.write(b’mote’)
File “/usr/lib/python3/dist-packages/serial/serialposix.py”, line 489, in write
raise SerialException(‘write failed: %s’ % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error

I’m not that knowledgable and probably trying to run before I can walk! Any pointers would be much appreciated.

Thanks,
Julia

Is this on Raspbian? I ask because the install script mentioned in the homekit tutorial should have installed pyserial… at least if it exists in your distribution’s repository.

Also, I see you are using Python 3.4… there should be no problem, but can I suggest you try to see if the same error is encountered with Python 2.7?

Hi, I had already checked but same problem with Python 2.7 and test.py (although slightly different message) :

Traceback (most recent call last):
File “test.py”, line 45, in
mote.show()
File “build/bdist.linux-armv7l/egg/mote/init.py”, line 172, in show
File “/usr/local/lib/python2.7/dist-packages/serial/serialposix.py”, line 537, in write
raise SerialException(‘write failed: {}’.format(v))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error

Regards,
Julia

Gave up and started from scratch with a full restore of Raspbian but the same error occurred with the mote test.py. Found that other mote examples had been modified with time.sleep of various durations because of low power issues and amended test.py also. This stopped mote resetting when running test.py but ‘curl -i http://127.0.0.1:5000/mote/api/v1.0/on’ as suggested in the mote tutorial still made the lights flash once and render the whole thing unresponsive (even with sleep added).
In frustration decided to just do the rest of the tutorial anyway and have found that it works! Maybe it would have worked originally if I had just blindly carried on…
Any idea why accessing through an url makes it crash?

Julia

Hi,

I finally got round to using the mote device and strips. I get the same problem with ‘curl -i http://127.0.0.1:5000/mote/api/v1.0/on’ as suggested in the mote tutorial still made the lights flash once and render the whole thing unresponsive.

Is there any resolution for this. I have tried different Pi devices and wireless adapters without any success. I am going to try and carry on with the examples and see if I can get it working with Siri. I wasn’t sure if it was some kind of fault with the mote board itself.

Colin

Hi, while i realise I’m late to this party, I too have had this problem.

I had everything setup and working without issue.
Then i unplug the large screen i was using for development and plug in the small 7" screen that i want to use for the project and ‘bang’ there are the errors.

Would it be a power thing?
The screen connects to the usb for power and for the touch elements of the screen so is placing a draw that isnt there when a normal screen is attached.

any help would be appreciated

thanks

i’ve given it a try and connecting another power supply to the screen so that it isnt taking power directly from the pi fixes this issue and the mote sicks work as intended.