Sennevds / RFXcomIdGenerator

Generate RFXcom ID for Home Assistant
MIT License
22 stars 7 forks source link

MDREMOTE V106 / V107 not working #1

Open sunflowerABB opened 7 years ago

sunflowerABB commented 7 years ago

HASS IDs generated for MDREMOTE V106 / V107 (Lightning 5 tab in RFXMngr) result in an error and cannot be added to the configuration:

$ generateId.py -t Lighting5 -s MDREMOTE -p 37191,1

Result: 0a14030001457110000

I tried entereind the ID both in HEX and DEC format.

Log output: ERROR (MainThread) [homeassistant.config] Invalid config for [switch.rfxtrx]: Rfxtrx device 00a14030001457110000 is invalid: Invalid device id for OrderedDict([('0a14030001457110000', OrderedDict([('name', 'LED_1')]))]) for dictionary value @ data['devices']. Got OrderedDict([('0a14030001457110000', OrderedDict([('name', 'LED_1')]))]). (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.rfxtrx/

Sennevds commented 7 years ago

Hi,

I haven't updated this script for a long time. I will try to get some updates at the end of August but I can't promise anything

On Sat, Aug 12, 2017, 20:29 sunflowerABB notifications@github.com wrote:

HASS IDs generated for MDREMOTE V106 / V107 (Lightning 5 tab in RFXMngr) result in an error and cannot be added to the configuration:

$ generateId.py -t Lighting5 -s MDREMOTE -p 37191,1

Result: 0a14030001457110000

I tried entereind the ID both in HEX and DEC format.

Log output: ERROR (MainThread) [homeassistant.config] Invalid config for [switch.rfxtrx]: Rfxtrx device 00a14030001457110000 is invalid: Invalid device id for OrderedDict([('0a14030001457110000', OrderedDict([('name', 'LED_1')]))]) for dictionary value @ data['devices']. Got OrderedDict([('0a14030001457110000', OrderedDict([('name', 'LED_1')]))]). (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.rfxtrx/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Sennevds/RFXcomIdGenerator/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ADXjWcr9yNHZZ9P3h4Oyt3FpXjDl5fJoks5sXe8egaJpZM4O1fC_ .

sunflowerABB commented 7 years ago
mdremote107_1er

Sending this command manually from RFXMgnr works, but impossible from HASS

sunflowerABB commented 7 years ago

MDremote V107 works the same, however MDremote V108 seems to be different and doesn't work...

sunflowerABB commented 7 years ago

Alternatively, howto send an ID (i.e. 9147 as shown above) via ssh manually as a RF command using echo as shown below? What is the code pattern needed, i.e.:

echo -ne '\x00\x91\x47\x00\x00' > /dev/ttyUSB-RFX433

?

sunflowerABB commented 7 years ago

I received the following info from RFXCOM which I wanted to post in case someone else finds it useful:

In order to activate "Undec Mode" on the RFXCOM it is necessary to send an init command after the connection like this: 0D 00 00 04 03 53 1C 88 00 00 00 00 00 00

The 88 undec on + Lighting4 enabled

I assume this can be done from the terminal using the following command:

echo -ne '\x0D\x00\x00\x04\x03\x53\x1C\x88\x00\x00\x00\x00\x00\x00' > /dev/ttyUSB-RFX433

sunflowerABB commented 7 years ago

Unfortunately I am unable to activate the undec mode using the command stated above - in any case not all signals are received by my rfxtrx once the echo command is sent. Any clues?

sunflowerABB commented 7 years ago

FYI everyone, here the answer from RFXCOM on how the code is put together:

MD106 command = 14 03: Lighting5 command: 0A 14 03 03 00 91 47 01 00 00 00

Packettype = Lighting5 subtype = MD Remote version 106 Sequence nbr = 3 ID = 9147 decimal:37191 Command = Power (00) Other commands can be found in RFXmngr, for example light=01 and so on.

MD107 command = 14 0C: Lighting5 command: 0A 14 0C 09 00 91 47 01 00 00 00

Packettype = Lighting5 subtype = MD Remote version 107 Sequence nbr = 9 ID = 9147 decimal:37191 Command = Power

screen shot 2017-08-28 at 19 04 14

With this resulting code I was finally able to get my cheap chinese LED controller to cooperate with rfxtrx (example shows power toggle):

echo -ne '\x0A\x14\x0C\x03\x00\x91\x47\x01\x00\x00\x00' > /dev/ttyUSB-RFX433

I am thus using a workaround home assistant / HASS script to control my LEDs:

!/bin/bash

set -e

This script is used to send commands via the terminal to an MDRemote V106 / V107 LED controller

Path to your RFXCOM device

RFXCOM_DEV=/dev/ttyUSB-RFX433

Number of times to send the command

REPEAT=1

Pause between each command being sent

REPEAT_DELAY=0.2

echo -ne '\x0A\x14\x0C\x03\x00\x8C\x16\x01\x00\x00\x00' > "$RFXCOM_DEV"

screen shot 2017-08-28 at 19 23 09