Hi,
I have an issue with the button led of the Google Voice AIY.
I have got 3 different results after a new install or reboot:
- blinking when listening which seems the normal form of operation
- blinking all the time, not funny if your device is in your bedroom
- off, not funny too
The first sign of led lightning occurs with âStarting up Mycroft serviceâ.
There are different threads on button and lights but none on this issue.
Did someone work on this ?
I look at /home/pi/lights.py and find this (sorry for losing identation):
def on_error(ws, error):
print(error)
def on_close(ws):
print(â### closed ###â)
Then at the end :
if name == âmainâ:
websocket.enableTrace(True)
ws = websocket.WebSocketApp(âws://localhost:8181/coreâ,
on_message = on_message,
on_error = on_error,
on_close = on_close)
ws.run_forever()
So, I connected to my device with ws, asked for time and read this :
{âtypeâ: ârecognizer_loop:record_endâ, âcontextâ: null, âdataâ: {}}
{âtypeâ: ârecognizer_loop:wakewordâ, âcontextâ: null, âdataâ: {âutteranceâ: âhey mycroftâ, âsessionâ: âebd6dee7-6b92-448c-9cfc-fd02cd02faecâ}}
{âtypeâ: ârecognizer_loop:utteranceâ, âcontextâ: {âidentâ: â1538292862.464371-842722306â, âclient_nameâ: âmycroft_listenerâ}, âdataâ: {âlangâ: âen-USâ, âutterancesâ: [âwhat time is itâ], âsessionâ: âebd6dee7-6b92-448c-9cfc-fd02cd02faecâ}}
{âtypeâ: âmycroft-date-time.mycroftai:handle_query_timeâ, âdataâ: {âtargetâ: null, âconfidenceâ: 1.0, âmycroft_date_time_mycroftaiQueryâ: âwhatâ, âmycroft_date_time_mycroftaiTimeâ: âtimeâ, âintent_typeâ: âmycroft-date-time.mycroftai:handle_query_timeâ, âutteranceâ: âwhat time is itâ, âtagsâ: [{âfrom_contextâ: false, âstart_tokenâ: 0, âend_tokenâ: 0, âentitiesâ: [{âmatchâ: âwhatâ, âdataâ: [[âwhatâ, âfallback_wolfram_alpha_mycroftaiGiveâ], [âwhatâ, âmycroft_date_time_mycroftaiQueryâ], [âwhatâ, âmycroft_configuration_mycroftaiGetKeywordâ], [âwhatâ, âmycroft_ip_mycroftaiqueryâ], [âwhatâ, âmycroft_configuration_mycroftaiWhatâ]], âconfidenceâ: 1.0, âkeyâ: âwhatâ}], âmatchâ: âwhatâ, âkeyâ: âwhatâ}, {âfrom_contextâ: false, âstart_tokenâ: 1, âend_tokenâ: 1, âentitiesâ: [{âmatchâ: âtimeâ, âdataâ: [[âtimeâ, âmycroft_date_time_mycroftaiTimeâ]], âconfidenceâ: 1.0, âkeyâ: âtimeâ}], âmatchâ: âtimeâ, âkeyâ: âtimeâ}]}, âcontextâ: {âtargetâ: null, âclient_nameâ: âmycroft_listenerâ, âidentâ: â1538292862.464371-842722306â}}
{âtypeâ: âmycroft.skill.handler.startâ, âdataâ: {ânameâ: âTimeSkill.handle_query_timeâ}, âcontextâ: {âtargetâ: null, âclient_nameâ: âmycroft_listenerâ, âidentâ: â1538292862.464371-842722306â}}
{âtypeâ: âspeakâ, âdataâ: {âexpect_responseâ: false, âutteranceâ: âzero nine thirty fourâ}, âcontextâ: {âtargetâ: null, âclient_nameâ: âmycroft_listenerâ, âidentâ: â1538292862.464371-842722306â}}
{âtypeâ: âenclosure.mouth.events.deactivateâ, âdataâ: {}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.displayâ, âdataâ: {âclearPrevâ: false, âxOffsetâ: 0, âyOffsetâ: 0, âimg_codeâ: âHIAAAAAAAAAAAAAAâ}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.displayâ, âdataâ: {âclearPrevâ: false, âxOffsetâ: 24, âyOffsetâ: 0, âimg_codeâ: âHIAAAAAAAAAAAAAAâ}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.displayâ, âdataâ: {âclearPrevâ: false, âxOffsetâ: 7.0, âyOffsetâ: 0, âimg_codeâ: âEIMHEEMHAAâ}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.displayâ, âdataâ: {âclearPrevâ: false, âxOffsetâ: 11.0, âyOffsetâ: 0, âimg_codeâ: âEIMBEBMHAAâ}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.displayâ, âdataâ: {âclearPrevâ: false, âxOffsetâ: 15.0, âyOffsetâ: 0, âimg_codeâ: âCIICAAâ}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.displayâ, âdataâ: {âclearPrevâ: false, âxOffsetâ: 17.0, âyOffsetâ: 0, âimg_codeâ: âEIEFEFMHAAâ}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.displayâ, âdataâ: {âclearPrevâ: false, âxOffsetâ: 21.0, âyOffsetâ: 0, âimg_codeâ: âEIMBABMHAAâ}, âcontextâ: null}
{âcontextâ: null, âdataâ: {âsideâ: âbâ}, âtypeâ: âenclosure.eyes.blinkâ}
{âcontextâ: null, âdataâ: {}, âtypeâ: ârecognizer_loop:audio_output_startâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.2138433, âcodeâ: â3â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.3378432, âcodeâ: â0â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.4618433, âcodeâ: â2â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.5858433, âcodeâ: â2â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.6685433, âcodeâ: â3â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.7512434, âcodeâ: â0â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.8339434, âcodeâ: â3â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.9114432, âcodeâ: â3â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292868.9889433, âcodeâ: â2â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292869.0664432, âcodeâ: â3â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292869.1439433, âcodeâ: â0â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292869.2679434, âcodeâ: â5â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292869.3919432, âcodeâ: â6â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {âuntilâ: 1538292869.5159433, âcodeâ: â2â}, âtypeâ: âenclosure.mouth.visemeâ}
{âcontextâ: null, âdataâ: {}, âtypeâ: ârecognizer_loop:audio_output_endâ}
{âtypeâ: âenclosure.mouth.resetâ, âdataâ: {}, âcontextâ: null}
{âtypeâ: âenclosure.mouth.events.activateâ, âdataâ: {}, âcontextâ: null}
No message from lights.py .
I added this :
def on_message(ws, message):
print(â==== message ====â)
without any success.
It seems that for some reason lights.py became inactive.
Looking at /home/pi/button.py , I read this :
or better: add it to your autorun.sh like this:
python /home/pi/lights.py </dev/null &>/dev/null &
# just before:
# else
# # running from a SSH session
# echo âRemote sessionâ
# fi
Adding this line in auto-run.sh is not necessary because itâs already in /home/pi/custom_setup.sh .