I’ve tried to build my first app and have several problems. The app should send a message to another mosquitto server. The intants and the slots works and gave out the right synonyms. Now I’ve tried to build an own action in python3 code. This doesn’t work. The output on samwatch is:
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] import paho.mqtt.client as mqtt
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] ImportError: No module named ‘paho’
Nov 16 18:06:22 raspberrypi snips-dialogue[3519]: INFO:snips_dialogue_lib::coordinator::coordinator: Session [76b0f751-9a85-412e-a346-cd865a16cdc2]: closing session which was active: Timeout { component: Some(ClientApp) }
Nov 16 18:06:22 raspberrypi snips-dialogue[3519]: INFO:snips_dialogue_lib::coordinator::coordinator: Site [default]: reset site -> turn off ASR and turn on Hotword
Nov 16 18:06:22 raspberrypi snips-hotword[3532]: INFO:snips_hotword_lib::audio : Audio thread for site default started.
It doesn’t run the code
In syslog came this:
Nov 16 18:06:17 raspberrypi snips-tts[3506]: INFO:snips_tts_hermes: Received a play finished message from audio server with an unknown id ‘2c6ebc67-8abf-403e-b037-f12f891d15cf’. Ignoring it.
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] Traceback (most recent call last):
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] File “_ctypes/callbacks.c”, line 234, in ‘calling callback function’
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] File “/var/lib/snips/skills/smarthomeng.paho_test/venv/lib/python3.5/site-packages/hermes_python/ffi/wrappers.py”, line 61, in convert_arguments_when_invoking_function
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] return func(hermes_client, *parsed_args)
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] File “./action-smarthomeng-paho_test_1-smarthomeng.paho_test.py”, line 29, in subscribe_intent_callback
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] action_wrapper(hermes, intentMessage, conf)
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] File “./action-smarthomeng-paho_test_1-smarthomeng.paho_test.py”, line 42, in action_wrapper
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] import paho.mqtt.client as mqtt
Nov 16 18:06:17 raspberrypi snips-skill-server[3524]: INFO:snips_skill_server_lib::runner : [smarthomeng-paho_test_1-smarthomeng.paho_test][err] ImportError: No module named ‘paho’
Nov 16 18:06:22 raspberrypi snips-dialogue[3519]: INFO:snips_dialogue_lib::coordinator::coordinator: Session [76b0f751-9a85-412e-a346-cd865a16cdc2]: closing session which was active: Timeout { component: Some(ClientApp) }
Nov 16 18:06:22 raspberrypi snips-dialogue[3519]: INFO:snips_dialogue_lib::coordinator::coordinator: Site [default]: reset site -> turn off ASR and turn on Hotword
I’ve installed paho-mqtt with
pip install paho_mqtt / pip3 install paho_mqtt / npm install -g mqtt
I only want to run a simple script to Test the Connection, hrer is my action
import paho.mqtt.client as mqtt
broker_address=“192.168.178.8”
client = mqtt.Client()
client.connect(broker_address)
client.publish(“eg/wohnen/licht/decke/schalten”,“ON”)
mqtt.loop_forever()
hope this is the right part of the forum