Open sunflowerABB opened 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_ .
Sending this command manually from RFXMgnr works, but impossible from HASS
MDremote V107 works the same, however MDremote V108 seems to be different and doesn't work...
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
?
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
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?
FYI everyone, here the answer from RFXCOM on how the code is put together:
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.
Packettype = Lighting5 subtype = MD Remote version 107 Sequence nbr = 9 ID = 9147 decimal:37191 Command = Power
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"
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/