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.

motion_cm-19 connet RS485 to LM5-RIO2
#1
Dear all.

I have a motor and a curtain controller. Please give me a guide for using over this RS485 protocol. I am using LM5-RIO2

I attach my controller's data.[/font]

https://usermanual.wiki/Coulisse/CM19

Thanks you.

Attached Files
.pdf   Coulisse_CM 19.pdf (Size: 3.21 MB / Downloads: 12)
Reply
#2
Create an event script attached to a 1-byte unsigned object (valid scene number is from 1 to 15), change CM-19 address (default is 1) and port (default is /dev/RS485-1) if needed.
Code:
addr = 1 -- CM-19 address (default 1)
scene = event.getvalue()

if scene > 0 and scene < 16 then
  value = string.format('!BR%dg%X;', addr, scene)
  port = require('serial').open('/dev/RS485-1', {
    baudrate = 9600,
    duplex = 'half'
  })
  port:write(value)
  port:close()
end
Reply
#3
(12.03.2021, 09:01)admin Wrote: Create an event script attached to a 1-byte unsigned object (valid scene number is from 1 to 15), change CM-19 address (default is 1) and port (default is /dev/RS485-1) if needed.
Code:
addr = 1 -- CM-19 address (default 1)
scene = event.getvalue()

if scene > 0 and scene < 16 then
  value = string.format('!BR%dg%X;', addr, scene)
  port = require('serial').open('/dev/RS485-1', {
    baudrate = 9600,
    duplex = 'half'
  })
  port:write(value)
  port:close()
end

Thanks admin support.
Reply


Forum Jump: