Skip to main content
6-Contributor
April 24, 2023
Solved

Subscribe does not work

  • April 24, 2023
  • 2 replies
  • 1590 views

I have a problem where subscriptions are not working properly when using mqtt communication. Check the log and found the following error: 2023-04-24 05:32:39.988+0000 [L: ERROR] [O: EcqlcLogger] [I: ] [U: System] [S: ] [P: ] [T: TWEventProcessor-2] Error executing event processing Program 's1' is event Type.Thing:Entity.uwb_mqtt_sub:Event.DataChange:Property.device. But if you manually modify the value of the property, the subscription will be executed.

-----------------------------------------------

Translated from Simplified chinese to english using google translate on 24-apr-2023 at 11:31am IST. Translated by vnamboodheri


我遇到一个问题,在使用mqtt通信时,订阅无法正常运行。
查看日志,发现发现如下错误:

2023-04-24 05:32:39.988+0000 [L: ERROR] [O: EcqlcLogger] [I: ] [U: System] [S: ] [P: ] [T: TWEventProcessor-2] 错误执行事件处理程序's1'为事件Type.Thing:Entity.uwb_mqtt_sub:Event.DataChange:Property.device。

但如果你手动修改属性的价值,订阅就会被执行。

------------------------------------------------------

 

 

 

 

 

 

 

Best answer by nmutter

I'm not familiar with the MQTT extension but as the subscription works with your user it may be a permission issue? In MQTT extension can you somehow set the user which executes everything? Like in a Scheduler you set the "runAs" user?

 

The log message you shared states that the error happens with user "System". You could also add the "System" user to "Administrators"-group to validate if it would work then - if so it is a permission issue.

2 replies

22-Sapphire I
April 24, 2023

Do you see the MQTT message values changing, ie is it failing to fire the subscription vs. failing to update the message values.

If the values are updating and the subscription is giving this error, then there might be some issue in your subscription code.

Else is your datachange set to 'Always' vs. 'Value'? I find that often that is needed for certain types of DataTypes

6-Contributor
April 25, 2023

Yes, the value binding to MQTT has been changed. My data is set to value, and it is also tried to set up, but it still cannot take effect.

In the subscription, even if I only set up the monitor value, there is no script, and an error will be reported.

22-Sapphire I
April 25, 2023

Unfortunately I'm not familiar with the error, you may have to file a support case.

nmutter16-PearlAnswer
16-Pearl
April 25, 2023

I'm not familiar with the MQTT extension but as the subscription works with your user it may be a permission issue? In MQTT extension can you somehow set the user which executes everything? Like in a Scheduler you set the "runAs" user?

 

The log message you shared states that the error happens with user "System". You could also add the "System" user to "Administrators"-group to validate if it would work then - if so it is a permission issue.