This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

MQTT subscribe
#26
(14.12.2022, 08:10)admin Wrote: Use grp.find to check if an object with a given name already exists:
Code:
name = 'test object'
if not grp.find(name) then
  grp.create({ name = name, ... })
end

Many many thanks!

One more - hopefully last - question:
How do I automatically add the entries in the mqtt_to_object_conv and object_to_mqtt tables? I also need to be able to read the name between two characters example: Floor_1_Room_302_Device_3 how do I loop through it to bind each element to part of the name?
Reply


Messages In This Thread
MQTT subscribe - by pentadom - 30.11.2018, 17:39
RE: MQTT subscribe - by admin - 03.12.2018, 08:43
RE: MQTT subscribe - by pentadom - 03.12.2018, 10:18
RE: MQTT subscribe - by Dario - 04.02.2020, 12:10
RE: MQTT subscribe - by admin - 04.02.2020, 12:40
RE: MQTT subscribe - by Dario - 04.02.2020, 16:39
RE: MQTT subscribe - by Tifon - 08.03.2020, 09:33
RE: MQTT subscribe - by admin - 09.03.2020, 08:46
RE: MQTT subscribe - by admin - 19.02.2021, 12:10
RE: MQTT subscribe - by admin - 22.02.2021, 07:24
RE: MQTT subscribe - by admin - 22.02.2021, 08:10
RE: MQTT subscribe - by myg - 25.02.2021, 09:35
RE: MQTT subscribe - by admin - 26.02.2021, 11:59
RE: MQTT subscribe - by admin - 19.03.2021, 09:33
RE: MQTT subscribe - by a455115 - 12.12.2022, 14:05
RE: MQTT subscribe - by admin - 12.12.2022, 16:00
RE: MQTT subscribe - by a455115 - 13.12.2022, 07:23
RE: MQTT subscribe - by admin - 13.12.2022, 08:48
RE: MQTT subscribe - by a455115 - 14.12.2022, 07:09
RE: MQTT subscribe - by admin - 14.12.2022, 08:10
RE: MQTT subscribe - by a455115 - 14.12.2022, 10:05
RE: MQTT subscribe - by admin - 14.12.2022, 12:49
RE: MQTT subscribe - by a455115 - 14.12.2022, 15:04
RE: MQTT subscribe - by admin - 15.12.2022, 08:40
RE: MQTT subscribe - by tomnord - 18.01.2024, 13:16
RE: MQTT subscribe - by admin - 18.01.2024, 13:38
RE: MQTT subscribe - by tomnord - 18.01.2024, 13:51
RE: MQTT subscribe - by tomnord - 23.01.2024, 08:08
RE: MQTT subscribe - by Daniel - 23.01.2024, 08:09
RE: MQTT subscribe - by tomnord - 23.01.2024, 11:01
RE: MQTT subscribe - by Daniel - 23.01.2024, 11:16
RE: MQTT subscribe - by tomnord - 23.01.2024, 12:08
RE: MQTT subscribe - by Daniel - 23.01.2024, 12:41
RE: MQTT subscribe - by FatMax - 31.01.2024, 08:49
RE: MQTT subscribe - by Daniel - 31.01.2024, 09:28
RE: MQTT subscribe - by FatMax - 31.01.2024, 12:49
RE: MQTT subscribe - by admin - 31.01.2024, 12:52
RE: MQTT subscribe - by FatMax - 31.01.2024, 12:59
RE: MQTT subscribe - by admin - 31.01.2024, 13:01
RE: MQTT subscribe - by FatMax - 31.01.2024, 13:18
RE: MQTT subscribe - by admin - 31.01.2024, 13:23
RE: MQTT subscribe - by FatMax - 31.01.2024, 13:31
RE: MQTT subscribe - by admin - 31.01.2024, 13:53

Forum Jump: