The problem here, among others, is that what is “natural” in a language is not in another…
With vocal commands in Zanzito you have four parts:
An introductory word, in the manual I suggest “Please” but it can be anything not too short
Note that here you can say whatever you want, as long as you don’t pause too long
Keyword: when spotted, the whole phrase is analyzed
Again between the keyword and the command you can say anything you want
Activity vocal command: it triggers a specific activity.
Immediately after the vocal command, if “Get payload from vocal command” is selected, anything you say is sent as payload.
I guess we could have multiple vocal commands for each activity, but wouldn’t it be like emptying the ocean with a spoon? I mean, natural language recognition hasn’t been achieved neither from Apple (or Google)…
As last elif you could trigger an input_boolean associated to another automation, that in turn would trigger a “Not found” response and reset the input_boolean…
If I understand correctly, I would be switching on/off groups only right? I think that would be a lot of modification to my configuration.
Anyway, the best solution I can come up with right now is…
before {% endif %}, add…
{%- else -%}
script.mqtt_switch_not_found
and then add this below the first action…
- condition: state
entity_id: input_boolean.mqtt_switch_not_found
state: 'off'
- service: mqtt.publish
data_template:
topic: >-
zanzito/{{ trigger.topic.split('/')[-3] }}/notification
payload: >-
{% set responses = [
"OK",
"Sure",
"If you insist",
"Done",
"Alright",
"No worries",
"I can do that",
"Leave it to me",
"Consider it done",
"As you wish",
"By your command",
"Affirmative",
"No Problem"
] %}
{% set rindex = (range(0, (responses | length - 1) )|random) -%}
{{responses[rindex]}}
then create a script…
mqtt_switch_not_found:
sequence:
- service: mqtt.publish
data:
topic: zanzito/myphone/notification
payload: "I'm sorry. I cannot find the device named XXXXX in your house."
- service: input_boolean.turn_on
entity_id: input_boolean.mqtt_switch_not_found
- delay:
seconds: 2
- service: input_boolean.turn_off
entity_id: input_boolean.mqtt_switch_not_found
The problem is I cannot pass the payload to the script so that it can read out XXXXX
In android smartphone (in landscape mode) , when I click on ACTIVITY, then press on + … it crashes
in android box, when I click on ACTIVITY, the press on + it emits a sound and goes back. My Android box it does not work (all programs) portrait
Question: who is a Tasker and Zanzito user among you guys? What kind of integration would you like?
I was thinking of exposing Activities and Reports from Zanzito to Tasker, what do you think?
This happened with only one CA certificate in the “User” segment. I did not have any certificates installed prior to setting up Owntracks (which I did yesterday). I believe the Owntracks instructions said to install the certificate to the device and then also specify the path within Owntracks. The latter option is missing in Zanzito.
Is there a way to see from the logs which certificates are being used?
My mosquitto version is 1.4.11 which I believe is the latest.
Changing ports is not a real option, and not at all relevant for this problem.
How can i set port for home host? My primary host is cloudmqtt with 19400 port. And when i try connect in my local network connection is refused. My local mqtt broker listen on 1883 port.
Are you by any chance trying to authenticate with a client certificate or configured mosquitto to require client certificate authentication? Because this isn’t supported by Zanzito.
The error you reported from mosquitto seems related to the client (not) authenticating to the server, not the contrary (not Zanzito verifying the authenticity of the server’s certificate), but I might be wrong or it could be the byproduct of another problem.
The error in Zanzito might to be related to one of the following cases:
The CA that issued the server certificate was unknown
The server certificate wasn’t signed by a CA, but was self signed
The server configuration is missing an intermediate CA
Normally, the first two are solved by manually importing the CA certificate in Android: Zanzito doesn’t handle this, it’s a request to the system.
The third one could be of interest, it depends on how you generated the certificates, try googling a little bit. I don’t think it’s a problem in Zanzito because Zanzito actually doesn’t do anything with the certificates, it relies on the system.
Maybe Owntracks can overcome a possible problem by manually managing the certificates, but first we should understand what the problem is (this is the first time such an issue was signaled to me)
EDIT: I did some digging: by importing the CA certificate directly, Owntracks bypasses a few alerts (mainly, one of the three cases above) that instead Android issues. Even if yours is the only case so far, I added the implementation of a similar feature to my todo list, have patience.
In the meanwhile you could experiment by re-issuing your certificates with alternate methods: for example, I don’t know if you already tried the method sketched here.
In Zanzito, the port number is common to both hosts. I think you can easily setup a second listener in your local broker with the same port as your public one.