MQTT/en: различия между версиями

Новая страница: «To delete topics, you can use the command ''mqtt-delete-retained''. Example of use: <syntaxhighlight lang="bash"> root@wirenboard:~# mqtt-delete-retained '/device…»
(Новая страница: «Unnecessary retained messages may remain in the MQTT system after unused drivers are removed or any devices are disconnected. This causes nonexistent devices to a…»)
(Новая страница: «To delete topics, you can use the command ''mqtt-delete-retained''. Example of use: <syntaxhighlight lang="bash"> root@wirenboard:~# mqtt-delete-retained '/device…»)
Строка 142: Строка 142:
Unnecessary retained messages may remain in the MQTT system after unused drivers are removed or any devices are disconnected. This causes nonexistent devices to appear in the ''Devices'' section of the web interface.
Unnecessary retained messages may remain in the MQTT system after unused drivers are removed or any devices are disconnected. This causes nonexistent devices to appear in the ''Devices'' section of the web interface.


Для удаления топиков можно воспользоваться командой ''mqtt-delete-retained''. Пример использования:
To delete topics, you can use the command ''mqtt-delete-retained''. Example of use:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
root@wirenboard:~# mqtt-delete-retained '/devices/noolite_tx_1234/#'  
root@wirenboard:~# mqtt-delete-retained '/devices/noolite_tx_1234/#'  
</syntaxhighlight>
</syntaxhighlight>
- удалит все топики, начинающиеся на '/devices/noolite_tx_1234/'
- removes all topics starting with '/devices/noolite_tx_1234/'


Для удаления топиков "по маске", можно циклично вызывать runShellCommand из правил. Таким образом, задача сводится к задаче работы со строками в js.
Для удаления топиков "по маске", можно циклично вызывать runShellCommand из правил. Таким образом, задача сводится к задаче работы со строками в js.
12 063

правки