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 whether you accept or reject these cookies being set.

[OLD] LogicMachine firmware 2019.10
#21
This means that connection is working fine.
Next add some logging to group event callback:
Code:
function publishvalue(event)
    -- message from us or client is not connected
    if event.sender == 'mq' or not mclientfd then
      return
    end

    local addr = event.dst
    local dpt = datatypes[ addr ]
    local topic = object_to_mqtt[ addr ]

    -- unknown object
    if not dpt or not topic then
      return
    end

    local value = busdatatype.decode(event.datahex, dpt)
    if value ~= nil then
      if type(value) == 'boolean' then
        value = value and 1 or 0
      end

      log('publish', mclient:publish(topic, tostring(value)) )
    else
      log('failed to decode data', event.datahex, dpt)
    end
  end
#22
(25.11.2019, 07:35)admin Wrote: This means that connection is working fine.
Next add some logging to group event callback:
Code:
  function publishvalue(event)
    -- message from us or client is not connected
    if event.sender == 'mq' or not mclientfd then
      return
    end

    local addr = event.dst
    local dpt = datatypes[ addr ]
    local topic = object_to_mqtt[ addr ]

    -- unknown object
    if not dpt or not topic then
      return
    end

    local value = busdatatype.decode(event.datahex, dpt)
    if value ~= nil then
      if type(value) == 'boolean' then
        value = value and 1 or 0
      end

      log('publish', mclient:publish(topic, tostring(value)) )
    else
      log('failed to decode data', event.datahex, dpt)
    end
  end

Hi,

Don´t log anything when I change value of 37/3/1 and in the script i have:

Code:
object_to_mqtt = {
    ['37/3/1'] = 'SEND1',
    ['37/3/2'] = 'SEND2',  --SEND 1 and SEND 2 are object to mqtt commands
  }
#23
Check if you get event data at all:
Code:
function publishvalue(event)
  log(event, datatypes[ event.dst ], object_to_mqtt[ event.dst ])
#24
(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:
  function publishvalue(event)
    -- message from us or client is not connected
    if event.sender == 'mq' or not mclientfd then
      return
    end

    local addr = event.dst
    local dpt = datatypes[ addr ]
    local topic = object_to_mqtt[ addr ]

    -- unknown object
    if not dpt or not topic then
      return
    end

    local value = busdatatype.decode(event.datahex, dpt)
    if value ~= nil then
      if type(value) == 'boolean' then
        value = value and 1 or 0
      end

      log('publish', mclient:publish(topic, tostring(value)) )
    else
      log('failed to decode data', event.datahex, dpt)
    end
  end

Hi,

Don´t log anything when I change value of 37/3/1 and in the script i have:

Code:
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?
   
#25
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?
#26
(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:
  function publishvalue(event)
    -- message from us or client is not connected
    if event.sender == 'mq' or not mclientfd then
      return
    end

    local addr = event.dst
    local dpt = datatypes[ addr ]
    local topic = object_to_mqtt[ addr ]

    -- unknown object
    if not dpt or not topic then
      return
    end

    local value = busdatatype.decode(event.datahex, dpt)
    if value ~= nil then
      if type(value) == 'boolean' then
        value = value and 1 or 0
      end

      log('publish', mclient:publish(topic, tostring(value)) )
    else
      log('failed to decode data', event.datahex, dpt)
    end
  end

Hi,

Don´t log anything when I change value of 37/3/1 and in the script i have:

Code:
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?
#27
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.
#28
(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.

I send you Teamviewer acces by mp
#29
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.
#30
(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.

Thanks!
#31
I have a LM5P2-KC (right side of the device sticker).

But when i choose system - upgrade firmware is said: LM5 Lite + ext (i.MX6) ???

What firmware do i need to upgrade my device?
#32
LM5 Power with extensions
#33
Hi,
Does Mosaic3 work in the cloud with the release RC1?
Thx!
#34
yes it works
#35
Is there any ETA for the final release?
#36
Not yet, RC2 is planned for early next year
#37
(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!
#38
Are you sure your SD card is not in read-only state? This would explain why upgrade did not work.
#39
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?
#40
Open system logs and paste what is there. Use separate thread for this discussion.


Forum Jump: