25.11.2019, 10:01 (This post was last modified: 25.11.2019, 10:03 by DGrandes.)
(25.11.2019, 09:05)DGrandes Wrote:
(25.11.2019, 07:35)admin Wrote: This means that connection is working fine.
Next add some logging to group event callback:
Code:
1234567891011121314151617181920212223242526
functionpublishvalue(event)
-- message from us or client is not connectedifevent.sender == 'mq'ornotmclientfdthenreturnendlocaladdr = event.dstlocaldpt = datatypes[ addr ]
localtopic = object_to_mqtt[ addr ]
-- unknown objectifnotdptornottopicthenreturnendlocalvalue = busdatatype.decode(event.datahex, dpt)
ifvalue ~= niltheniftype(value) == 'boolean'thenvalue = valueand1or0endlog('publish', mclient:publish(topic, tostring(value)) )
elselog('failed to decode data', event.datahex, dpt)
endend
Hi,
Don´t log anything when I change value of 37/3/1 and in the script i have:
Code:
1234
object_to_mqtt = {
['37/3/1'] = 'SEND1',
['37/3/2'] = 'SEND2', --SEND 1 and SEND 2 are object to mqtt commands
}
I don´t get event data from "object_to_mqtt" objects but I get from other objects in my LM.
I have another question:
I´ve installed 2 MQTT packages from last Logic Machine Firmware but I don´t see new packages from this firmware, aren´t necessary?
MQTT packages are included by default, no need to install anything manually. Do you get anything in the error log? Can you send backup from your device via PM so we can check locally?
25.11.2019, 10:17 (This post was last modified: 25.11.2019, 10:19 by DGrandes.)
(25.11.2019, 10:01)DGrandes Wrote:
(25.11.2019, 09:05)DGrandes Wrote:
(25.11.2019, 07:35)admin Wrote: This means that connection is working fine.
Next add some logging to group event callback:
Code:
1234567891011121314151617181920212223242526
functionpublishvalue(event)
-- message from us or client is not connectedifevent.sender == 'mq'ornotmclientfdthenreturnendlocaladdr = event.dstlocaldpt = datatypes[ addr ]
localtopic = object_to_mqtt[ addr ]
-- unknown objectifnotdptornottopicthenreturnendlocalvalue = busdatatype.decode(event.datahex, dpt)
ifvalue ~= niltheniftype(value) == 'boolean'thenvalue = valueand1or0endlog('publish', mclient:publish(topic, tostring(value)) )
elselog('failed to decode data', event.datahex, dpt)
endend
Hi,
Don´t log anything when I change value of 37/3/1 and in the script i have:
Code:
1234
object_to_mqtt = {
['37/3/1'] = 'SEND1',
['37/3/2'] = 'SEND2', --SEND 1 and SEND 2 are object to mqtt commands
}
I don´t get event data from "object_to_mqtt" objects but I get from other objects in my LM.
I have another question:
I´ve installed 2 MQTT packages from last Logic Machine Firmware but I don´t see new packages from this firmware, aren´t necessary?
But mqtt server is internal on my network.
Nothing in error log
Anydesk maybe to show my LM?
(25.11.2019, 10:21)admin Wrote: This is probably not connected with MQTT server. You can also provide access via TeamViewer or port forward ports 22 and 80 to your LM.
25.11.2019, 10:57 (This post was last modified: 25.11.2019, 10:57 by DGrandes.)
(25.11.2019, 10:56)admin Wrote: Thanks, the issue was with resident script having 1 second sleep time (it should be 0). This causes the handler to get only 1 bus message per second.
(16.12.2019, 09:39)admin Wrote: Not yet, RC2 is planned for early next year
For the sake of releasing approved quality SW upgrades, I would strongly recommend to OpenRB to test the packages on all your HW products.
For example, I own a LM4 and I have used the image file from this link and the result was that my LM4 has stayed on the same version. Below is a capture after the upgrade:
Also, don't forget to change the copyright year, as we will soon be in 2020!
30.12.2019, 11:14 (This post was last modified: 30.12.2019, 11:15 by andeug.)
I am using the same upgrade method as below, via the System config / System / Upgrade firmware.
I am not sure about which SD card you are mentioning - how can I check its state on a LM4 module?