Can someone help with ZAMEL

Hello

I think to purchase: 1-CHANNEL RADIO RECEIVER ROP-01 - this is the cheapest option radio control

this is pdf: http://www.tme.eu/pl/Document/6ddb874f7c72bc73d520c26f5f8399ef/ROP-01-en.pdf

Transmission is radio 868MHz

This is original remote control: http://www.tme.eu/pl/Document/32a7bfcf6b7a3817ab26ecdcecb077f5/P-256_8-en.pdf

Is there anyone able to help me with control this using raspberry?

Howdy!

I got it to work, works quite OK.
I have used their RXM-01 (TRANSLATOR RS485/EXTA FREE) serial converter:
http://www.zamel.pl/pl,222,3713,translator_rs485exta_free_rxm01.html

… and cheap usb-to-rs485 dongle - e.g. here:

https://www.google.pl/search?q=rs485+usb&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiqvunc-e3UAhUTlxQKHVEEBP8Q_AUIBigB&biw=1707&bih=816

Zamel protocol is basically a wireless version of modbus protocol, so having above set up I have tried to use Modbus Swittch (https://home-assistant.io/components/switch.modbus/). It kinda worked, but my switch couldn’t remember it’s state - it was not geting update from Zamel (one way protocol!). So it would continue to flip back.

The solution for me was to use commandline switch and run my own python script with parameter to switch it on/off. It’s not beautiful (acutally it’s pretty ugly) - but it works.

Here’s my config:

- platform: command_line
  switches :
    salon_lampa_nad_lawa:
    command_on: "/usr/bin/python /home/homeassistant/.homeassistant/zamel-scripts/rxm01.py press 1"
    command_off: "/usr/bin/python /home/homeassistant/.homeassistant/zamel-scripts/rxm01.py release 1"
2 Likes

Podaj do siebie mail :slight_smile: z nieba mi spadłeś zamawiam graty :smiley: (bo nie widze tu opcji pw) a mam pare pytań :slight_smile:

Post your questions here :slight_smile:
I might have sent you private info, but I’m not sure, a bit confused about whole interface here :)))

Hello @c-soft
I found your post, and I think it can solve my problem :slight_smile: concering integration HA with Exta-Free.
I have purchased RXM-01 and I’m looking for how to integrate it, your solution looks fine, could you share scripts which you use?
Thanks
Lukasz

Howdy, please find one python file here (packed):

I was running it via commandline, but you can probably do better (custom component etc.).

This is the config I used:

- platform: command_line
    switches :  
      salon_lampa_nad_lawa: 
        command_on: "/usr/bin/python/home/homeassistant/.homeassistant/zamel-scripts/rxm01.py press 1"
        command_off: "/usr/bin/python/home/homeassistant/.homeassistant/zamel-scripts/rxm01.py release 1"
        friendly_name: "Salon - ława"

I’m not using it anymore, so I can’t vouch its going to work for sure, but please try it and confirm that it works or not.

Disclaimer - I haven’t developed this myself, it’s a work of my friend.

Is that python script (rxm01.zip) still available somewhere to download? Dropbox file seem’s to be vanished. :frowning:

Indeed, I’ve recently killed my old Dropbox account. Unfortunately I can’t attach it here because of the limitations on the forum, so here’s another link, hopefuly I won’t kill it any time soon…

1 Like

Appreciate your fast and kind response. Thank you!

@ c-soft - Hope that python code is still running :slight_smile: I would like to integrate Zamel receivers to Home Assistant and your solution seems the only one found. If i have one RXM-01 (TRANSLATOR RS485/EXTA FREE) and more receivers this could work?

It should work, yes. However, you could do without my code completely: you can just use modbus switch: Modbus - Home Assistant, as RXM-01 speaks modbus - and the only thing that this python code does is exactly that :slight_smile:

I haven’t tested it as I don’t have Exta Free anymore - one way communication is important limitation.
Good luck!

Yes indeed . One way communication is not the best. I liked Zamel for the range. Do you have more documentation for RXM01? For example how do you know the address of each device/receiver?

True, range on this thing is amazing.

The only documentation I know is their instruction: https://www.zamel.com/pl/exta-free/rxm-01-instrukcja2.pdf . You should be able to use this info to set it up using modbus switch, provided that you read Polish… :wink: If not - Google Translate is your friend :slight_smile:

1 Like

All good. Using your python logic, I managed to control 3 devices with RXM01. Thanks!
Below some things maybe will help some others ZAMEL’s fans :slight_smile:

RS485 > RXM01
buton 1 press / release
01 05 00 00 FF 00 8C 3A
01 05 00 00 00 00 CD CA
buton 2 press / release
01 05 00 01 FF 00 DD FA
01 05 00 01 00 00 9C 0A

To break down the command: 01 05 00 00 FF 00 8C 3A

SLAVE ID: 01
FUNCTION: 05 (write single coil)
REGISTER: 0 (00 00)
DATA: FF 00 (DEC = 65280)
CHECkSUM: info (8C 3A)

and the self explanatory simple python

from pymodbus.client.sync import ModbusSerialClient as ModbusClient
from time import sleep

MODBUS_KEY_REG_BASE     = 0
key_idx                 = 1              # remote key 0,1,2,3...247 -- based on numbers of devices
KEYPRESS_COIL           = 0xff00         # remote key press 
KEYRELEASE_COIL         = 0x0000         # remote key release 
PORT                    = 'COM3'         # RS485 usb port -- windows
#PORT                    = '/dev/ttyUSB0' # RS485 usb port -- Linux

client= ModbusClient(method = "rtu", port = PORT, stopbits = 1, bytesize = 8, parity = 'E', baudrate= 9600)
connection = client.connect()
if connection:
    print ('connected on port:', PORT)
# receiver switch on    
    rw = client.write_coil(MODBUS_KEY_REG_BASE + key_idx, KEYPRESS_COIL, unit = 1)
    print(rw)
    sleep(0.5)
# receiver switch off
    rw = client.write_coil(MODBUS_KEY_REG_BASE + key_idx, KEYRELEASE_COIL, unit = 1)
    print(rw)
else:
    print ('connection failed on port:', PORT)
    
client.close()

1 Like