MqTT in Wiser for KNX - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: MqTT in Wiser for KNX (/showthread.php?tid=2649) Pages:
1
2
|
RE: MqTT in Wiser for KNX - manos@dynamitec - 26.08.2022 (26.08.2022, 12:55)admin Wrote: You can create a scheduled script that runs every minute and publishes all values. Each message has to specified manually due to a variable format. Add as many addmessage calls as needed and change grp.getvalue addresses. The script will automatically disconnect once all messages are published. RE: MqTT in Wiser for KNX - JRP - 19.05.2023 Hello I revive this topic about wiser and mqtt for the following question. using the script from the first page of the thread, it works fine both ways (mqtt to object and object to mqtt). I have observed the following if I use the same object, for example 1/0/0 (1 bit), for in/topic1 and out/topic1. When I update it from wiser, the out/topic1 is posted and the value is updated, ok. When I update it from mqtt using mqtt explorer, the in/topic1 is posted and the object in the Wiser is updated, ok. The issue is that the output out/topic1 is not updated, having updated the object from mqtt using in/topic1. So in the mqtt explorer I have one, for example in true and the other in false and they are not synchronized. Shouldn't the output topic be updated when the object is also updated from mqtt? Greetings RE: MqTT in Wiser for KNX - admin - 19.05.2023 This is done to prevent a possible loop when the same object is mapped to the same topic in both directions. You can remove this check like this: Code: function publishvalue(event) RE: MqTT in Wiser for KNX - JRP - 19.05.2023 Ok, you have your logic. It works perfectly with the proposed solution. Thank you. Greetings RE: MqTT in Wiser for KNX - JRP - 20.05.2023 Hello I would like to use TLS security for the thread script. I have seen a thread talking about the certificates but it does not clarify much. How could I do it? Greetings RE: MqTT in Wiser for KNX - admin - 22.05.2023 When only server certificate is needed for testing purposes you can simply skip the validation by setting client:tls_insecure_set(true). If this works then you can disable insecure mode and profile server certificate: client:tls_set(path_to_pem_file) Certificate file can be uploaded via FTP, the path will be /data/ftp/mqtt.pem or similar. Note that this file must be in PEM format and it must contain the whole certificate chain for the server. For both client and server certificates the use the following code: Code: client:tls_set(path_to_server_pem_file, nil, path_to_client_pem_file, path_to_client_key_file) RE: MqTT in Wiser for KNX - JRP - 26.05.2023 Hello Thanks for the reply. I understand that I only have to convert to PEM, the certificates and the key that I already have, generated for the mosquitto server. Greetings |