jamiehoward430 / mycroft-mymqtt

mqtt for MycroftAI
Apache License 2.0
17 stars 13 forks source link

An error occurred while processing a request in MyMQTTSkill. #2

Closed arturmaj closed 7 years ago

arturmaj commented 7 years ago

I am running picroft 0.85. My paho installation is working well. I tested anonymous and authenticated connections. In both cases I am getting: An error occurred while processing a request in MyMQTTSkill. How can I debug this?

jamiehoward430 commented 7 years ago

Hi,

Try changing lines 36, 37 and 38 in __init__.py from

cmd_name = message.metadata.get("CommandKeyword")
mdl_name = message.metadata.get("ModuleKeyword")
act_name = message.metadata.get("ActionKeyword")

to

cmd_name = message.data.get("CommandKeyword")
mdl_name = message.data.get("ModuleKeyword")
act_name = message.data.get("ActionKeyword")
arturmaj commented 7 years ago

Hello, Thanks for the plugin. No change.

jamiehoward430 commented 7 years ago

are you using authentication?

arturmaj commented 7 years ago

I am testing both anonymous and with authentication. I also tried cmd_name, mdl_name and act_name as constant strings but the error still occurs.

jamiehoward430 commented 7 years ago

Hi

Remove the quotes around the port number in the config file, for no auth

  `"MyMQTTSkill":` {
    "protocol": "mqtt",
    "mqtt-host": "192.168.0.200",
    "mqtt-port": 1883,
    "mqtt-auth": "no",
    "mqtt-user": "",
    "mqtt-pass": ""
  }

with auth

  "MyMQTTSkill": {
    "protocol": "mqtt",
    "mqtt-host": "192.168.0.200",
    "mqtt-port": 1883,
    "mqtt-auth": "yes",
    "mqtt-user": "user",
    "mqtt-pass": "pass"
  }
arturmaj commented 7 years ago

Thank you. It worked:

  1. data instead metadata
  2. removed quotes from port.