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 Client app
#41
suddenly with today's auto update mqtt client stopped working for multiple instances. Rolling back to older released helped. In error log i can see initialization error for all objects in the rules. It seems i was too naive to have auto update enabled on LM, this update broke critical functionality right in the evening.
What happend with quality control for releases? i don't remember anything like that before.
   
Reply
#42
@myg, an update has been published, see if it fixes the issue for you.
Reply
#43
(17.01.2025, 07:54)admin Wrote: @myg, an update has been published, see if it fixes the issue for you.

works again, thank you for quick update
Reply
#44
Good morning,

I’m trying to use the Logic Machine 5 Lite for integrating a MQTT payload message.

This is a typically Topic/Payload we receive:

Topic: callway/ad75adfd-b72a-4119-a34c-dfb372df9ecf/status/1/1 QoS: 2
{"data":[{"position":0,"position_type":"room","room":1,"status":"assistance","timestamp":"2025-03-28T10:01:06.000Z","ward":1}],"timestamp":"2025-03-28T11:29:16.000Z","type":"snapshot","uuid":"ad75adfd-b72a-4119-a34c-dfb372df9ecf","version":"1.0.0"}

With this metode I receive on the “String Object” the value: (image 1 and 2)

The problem is that I need to export the value throught Bacnet communication and String object is not permitted.
So, i need to convert the string value into a numeric one, like 06.1 1byte signed integer.
Could you help me with the script ?
Thank you.

Attached Files Thumbnail(s)
       
Reply
#45
Click New Replay then you can attach images
------------------------------
Ctrl+F5
Reply
#46
Do you have a define mapping between text and numeric values?
Reply
#47
(28.03.2025, 13:02)Daniel Wrote: Click New Replay then you can attach images

i modified the previous message.

Thank you.

(28.03.2025, 13:03)admin Wrote: Do you have a define mapping between text and numeric values?

idle : 0
call: 1
presence: 2
unhooked: 3
assistance: 4
emergency: 5
technical: 6
speech: 7
Reply
#48
Remove JSON value path, use this Input script:
Code:
local map = {
  idle = 0,
  call = 1,
  presence = 2,
  unhooked = 3,
  assistance = 4,
  emergency = 5,
  technical = 6,
  speech = 7,
}

local msg = json.pdecode(payload)

if type(msg) == 'table' then
  local status = msg.data[1].status
  return map[ status ]
end
Reply
#49
(28.03.2025, 13:11)admin Wrote: Remove JSON value path, use this Input script:
Code:
local map = {
  idle = 0,
  call = 1,
  presence = 2,
  unhooked = 3,
  assistance = 4,
  emergency = 5,
  technical = 6,
  speech = 7,
}

local msg = json.pdecode(payload)

if type(msg) == 'table' then
  local status = msg.data[1].status
  return map[ status ]
end
It works, really thank you.  Cool
Reply


Forum Jump: