Send Raw Command problem

Moderator: Telldus

Post Reply
rogerj
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Send Raw Command problem

Post by rogerj »

Hi all,

I'm trying to send a Turn On signal to a Nexa receiver using the Raw command method. I've created a Python script that generates a (what I believe) correct raw message string (Python snippet below - I've attached the code as attachment for those interested):

Code: Select all

>>> c = getRawCommand(13786098, 3, const.TELLSTICK_TURNOFF)
>>> c
u'T\x7f\xff\x18\x01\x84\x9a\x8a\x88\xa8\xaa\x88\xaa\x8a\x88\xaa\x8a\x88\xaa\x88\xa8\xaa\x88\xa8\xa8\xa8\xa8\xa8\xaa\x8a\x88\xaa\x8a\x8a\x8a\x8a\x88\xaa\x8a+'
(Needless to say, the Python string generator is a Python rewrite of the ProtocolNexa.cpp's methods getStringSelflearning and getStringSelflearningForCode.)

Then I go on sending this as follows:

Code: Select all

>>> from tellcore.telldus import TelldusCore
>>> import tellcore.constants as const 
>>> core = TelldusCore()
>>> core.send_raw_command(c)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/tellcore/telldus.py", line 253, in send_raw_command
    return self.lib.tdSendRawCommand(command, reserved)
  File "/usr/local/lib/python2.7/dist-packages/tellcore/library.py", line 257, in check_int_result
    raise TelldusError(result)
tellcore.library.TelldusError: Could not connect to the Telldus Service (-6)
As you can see above, it doesn't work - I haven't been able to find out any more details as to why. After several verifications of the message string I tried to send it using tdtool:

Code: Select all

echo -ne 'T\x7f\xff\x18\x01\x84\x9a\x8a\x88\xa8\xaa\x88\xaa\x8a\x88\xaa\x8a\x88\xaa\x88\xa8\xaa\x88\xa8\xa8\xa8\xa8\xa8\xaa\x8a\x88\xaa\x8a\x8a\x8a\x8a\x88\xaa\x8a+' | tdtool --raw -
Sending raw command: Success
As you can see: It says success - BUT the receiver doesn't react on the signal (i.e. the lamp stays off). If I use the standard functionality (i.e. tdtool --on 21), the lamp turns on as expected.

Would anyone be able to help me find out what's wrong? I've done some extensive browsing in various forums (especially this one, obviously), and this seems like a tricky topic, though I believe it should work.

Regards and thanks beforehand,
Roger

PS. I couldn't upload any file,regardless of extension, so I paste getRawCommand code here below:

Code: Select all

def getRawCommand(house, unit, method, level = 0):
    # Input
    houseInt = int(house)
    codeInt = int(unit)-1
    levelInt = int(level)
 
    # Initial
    command = u''
    startSeq = u'T' + unichr(127) + unichr(255) + unichr(24) + unichr(1)
    command += startSeq
    if method == const.TELLSTICK_DIM:
        command += unichr(147)
    else:
        command += unichr(132)
    
    # m: House
    m = ''
    for i in reversed(range(26)):
        if houseInt & 1 << i == 0:
            m += '01'
        else:
            m += '10'
    m += '01'
    
    # m: Handle on/off/dim
    if method == const.TELLSTICK_DIM:
        m += '00'
    elif method == const.TELLSTICK_TURNOFF:
        m += '01'
    elif method == const.TELLSTICK_TURNON:
        m += '10'
    else:
        return ''
    
    # m: Code (Unit)
    for i in reversed(range(4)):
        if codeInt & 1 << i == 0:
            m += '01'
        else:
            m += '10'
    
    # m: Dim Level
    if method == const.TELLSTICK_DIM:
        newLevel = levelInt / 16
        for i in reversed(range(4)):
            if newLevel & 1 << i == 0:
                m += '01'
            else:
                m += '10'
    
    # m: Make even last index
    m += '0'
    
    # Add m to command
    code = 9
    for i in range(len(m)):
        code <<= 4
        if m[i] == '1':
            code |= 8  # b1000
        else:
            code |= 10 # b1010
        if i % 2 == 0:
            command += unichr(code)
            code = 0
    
    # Final
    command += u'+'
    return command
nicwi
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by nicwi »

Hi Roger,

I'm not sure if this helps, but in my own experimentation I found that it may be necessary to repeat a transmission multiple times for NEXA receivers to detect them. The tdtool normally does this automatically, but perhaps this is not the case in raw mode?

I wrote about my findings in this forum at http://www.telldus.com/forum/viewtopic.php?f=11&t=5780

Niclas
plastbox
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by plastbox »

Has any of you had any progress on this? I've translated the ProtocolNexa::getStringSelflearning to Javascript which produces the same output as the above Python code. It doesn't trigger any change in the Nexa device it should control, nor can my Nexa devices learn codes sent using the raw command.

My device is set up as follows:

Code: Select all

device {
  id = 3
  name = "Window sill 3"
  controller = 1
  protocol = "arctech"
  model = "selflearning-switch"
  parameters {
    house = "15402826"
    unit = "3"
  }
}
This code is pulled from a Nexa remote I have. Controlling it using tdtool works. The device's on/off state is updated when I use the remote. Everything seems fine and dandy. However, when I do the following, nothing happens:

On:

Code: Select all

echo -ne 'R\x03T\x7F\xFF\x18\x1\x84\x9A\x8A\x88\xA8\xA8\xAA\x88\xAA\x88\xA8\xAA\x8A\x8A\x8A\x8A\x88\xA8\xA8\xAA\x88\xAA\x8A\x88\xAA\x88\xAA\x8A\x88\xAA\x8A\x88\xA8\xAA\x2B' | tdtool --raw -
Off:

Code: Select all

echo -ne 'R\x03T\x7F\xFF\x18\x1\x84\x9A\x8A\x88\xA8\xA8\xAA\x88\xAA\x88\xA8\xAA\x8A\x8A\x8A\x8A\x88\xA8\xA8\xAA\x88\xAA\x8A\x88\xAA\x88\xAA\x8A\x8A\x8A\x8A\x88\xA8\xAA\x2B' | tdtool --raw -
Could someone working at/with Telldus please tell us what we're doing wrong? Three of the top five topics in the "General" sub forum pertain to this exact topic, and there are several posts past few years with either no answer or short-and-snide "you're doing it wrong"-type replies. :(

Note: these threads are made by people working to circumvent the limitations of the current Telldus software which is more than two years old with no new betas or (as far as I can tell) info about the current state of affairs. Is the Telldus software at it's end-of-life? If so, could you do us geek customers the courtesy of doing a quick writeup on how to communicate with the Tellstick/Tellstick Duo at the most basic level? Perhaps even release a stripped down C++ source which just exposes some means of raw communication with the Tellstick so we can use it as a 433MHz transceiver?
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: Send Raw Command problem

Post by micke.prag »

Hi,

I have been trying to investigate this.

Firstly I see that you specify only three repeats of the command. Any specific reason for this?

When I generate a code for 15402826/3 I get this data:
7F FF 18 01 84 9A 8A 88 A8 A8 AA 88 AA 88 A8 AA 8A 8A 8A 8A 88 A8 A8 AA 88 AA 8A 88 AA 88 AA 8A 88 AA 8A 88 AA 8A

My code ends with "AA 8A" but yours ends with "A8 AA". Maybe this can be the issue?
Micke Prag
Software
Telldus Technologies
plastbox
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by plastbox »

micke.prag wrote:Hi,

I have been trying to investigate this.

Firstly I see that you specify only three repeats of the command. Any specific reason for this?

When I generate a code for 15402826/3 I get this data:
7F FF 18 01 84 9A 8A 88 A8 A8 AA 88 AA 88 A8 AA 8A 8A 8A 8A 88 A8 A8 AA 88 AA 8A 88 AA 88 AA 8A 88 AA 8A 88 AA 8A

My code ends with "AA 8A" but yours ends with "A8 AA". Maybe this can be the issue?
Thanks for the reply, and apologies if my previous post was a bit on the grumpy side. You probably know the feeling.. Inspiration strikes, you finally have some you-time, and some semi-anonymous company is set on getting their business in the way of your precious few minutes of keyboard time. :P

If I run the data in your post on the RasPi connected to the Tellstick by doing the following:

Code: Select all

echo -ne 'T\x7F\xFF\x18\x01\x84\x9A\x8A\x88\xA8\xA8\xAA\x88\xAA\x88\xA8\xAA\x8A\x8A\x8A\x8A\x88\xA8\xA8\xAA\x88\xAA\x8A\x88\xAA\x88\xAA\x8A\x88\xAA\x8A\x88\xAA\x8A'|tdtool --raw -
..the console hangs until i press Ctrl+c. If I append the end-byte from my string ("\x2B"), the Tellstick blinks and the console tells me "Sending raw command: Success", but the device configured with this house/unit code doesn't react at all.

Please let me know if there's anything I can do yo aid in the debugging!
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: Send Raw Command problem

Post by micke.prag »

plastbox wrote:If I append the end-byte from my string ("\x2B"), the Tellstick blinks and the console tells me "Sending raw command: Success"
Yes, I omitted this and only showed the data.
plastbox wrote:but the device configured with this house/unit code doesn't react at all.
Maybe the next step is to add some output to telldusd to compare the actual data sent to TellStick?
Micke Prag
Software
Telldus Technologies
rogerj
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by rogerj »

Hi,

Now I've made some further tests on the Raw command functionality, but can unfortunately not get it to work. In fact, I've never successfully had any device (in my case ordinary Nexa receivers) react on any command (ON, OFF, LEARN). I can verify that my Raw String generator works as it should (it generates the command you outline above, Micke). For reference, please find below the code (I was unable to attach it).

My actual crucial question
Anyway, to track this down: Is there ANY way to trace what raw messages the telldusd process actually receives? My idea is to find out what the Nexa remote control actually sends and try to replicate that as a Raw string. Do you have any idea how to do this?


For reference: To generate a Raw string, use the following command-line:

python TeachReceiver.py --house 15402826 --unit 3 --method turnon --drymode

It generates the following:

\x54\x7F\xFF\x18\x01\x84\x9A\x8A\x88\xA8\xA8\xAA\x88\xAA\x88\xA8\xAA\x8A\x8A\x8A\x8A\x88\xA8\xA8\xAA\x88\xAA\x8A\x88\xAA\x88\xAA\x8A\x88\xAA\x8A\x88\xAA\x8A\x2B

Code: Select all

'''
Created on Feb 20, 2016

@author: roger
'''

import argparse
import logging
import sys
from tellcore.telldus import TelldusCore
import tellcore.constants as const 

def parseArguments():
    parser = argparse.ArgumentParser()
    parser.add_argument('--house',
                        '-e',
                        dest='house',
                        type=int,
                        required=True,
                        help='House parameter.')
    parser.add_argument('--unit',
                        '-u',
                        dest='unit',
                        type=int,
                        required=True,
                        help='Unit parameter.')
    parser.add_argument('--method',
                        '-m',
                        dest='method',
                        required=False,
                        default='turnon',
                        help='Method parameter (turnon/turnoff).')
    parser.add_argument('--drymode',
                        '-d',
                        dest='dryMode',
                        action='store_true',
                        required=False,
                        help='Dry-run mode (print output only).')
    parsed_args = parser.parse_args()
    setattr(sys.modules[__name__], 'parsed_args', parsed_args)

def setupLogger():
    logging.basicConfig(level=logging.INFO,
                    format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
                    datefmt='%Y-%m-%d %H:%M:%S',
                    stream=sys.stdout)

def findDevice(core, house, unit, protocol = 'arctech', model = 'selflearning-switch'):
    for dev in core.devices():
        try:
            if dev.protocol == protocol:
                if dev.model == model:
                    params = dev.parameters()
                    if int(params['house']) == house:
                        if int(params['unit']) == unit:
                            return dev 
        except:
            pass
    return None

def getRawCommand(house, unit, method, level = 0):
    # Input
    houseInt = int(house)
    codeInt = int(unit)-1
    levelInt = int(level)
 
    # Initial
    command = u''
    startSeq = u'T' + unichr(127) + unichr(255) + unichr(24) + unichr(1)
    command += startSeq
    if method == const.TELLSTICK_DIM:
        command += unichr(147)
    else:
        command += unichr(132)
    
    # m: House
    m = ''
    for i in reversed(range(26)):
        if houseInt & 1 << i == 0:
            m += '01'
        else:
            m += '10'
    m += '01'
    
    # m: Handle on/off/dim
    if method == const.TELLSTICK_DIM:
        m += '00'
    elif method == const.TELLSTICK_TURNOFF:
        m += '01'
    elif method == const.TELLSTICK_TURNON:
        m += '10'
    else:
        return ''
    
    # m: Code (Unit)
    for i in reversed(range(4)):
        if codeInt & 1 << i == 0:
            m += '01'
        else:
            m += '10'
    
    # m: Dim Level
    if method == const.TELLSTICK_DIM:
        newLevel = levelInt / 16
        for i in reversed(range(4)):
            if newLevel & 1 << i == 0:
                m += '01'
            else:
                m += '10'
    
    # m: Make even last index
    m += '0'
    
    # Add m to command
    code = 9
    for i in range(len(m)):
        code <<= 4
        if m[i] == '1':
            code |= 8  # b1000
        else:
            code |= 10 # b1010
        if i % 2 == 0:
            command += unichr(code)
            code = 0
    
    # Final
    command += u'+'
    return command

if __name__ == '__main__':
    parseArguments()
    setupLogger()
    method = const.TELLSTICK_TURNON
    if parsed_args.method == 'turnoff':
        method = const.TELLSTICK_TURNOFF
    rawCommand = getRawCommand(parsed_args.house, parsed_args.unit, method)
    if parsed_args.dryMode:
        for i in range(len(rawCommand)):
            s = rawCommand[i]
            sys.stdout.write('\\x%02X' % (ord(s)))
    else:
        try:
            core = TelldusCore()
            dev = findDevice(core, parsed_args.house, parsed_args.unit)
            if dev:
                logging.info('Found registered device: ID=%s, Name=%s' % (dev.id, dev.name))
            else:
                name = ('Rec-%d' % parsed_args.house)
                logging.info('Adding device: Name=%s' % (name))
                dev = core.add_device(name, 'arctech', model='selflearning-switch', \
                                      house=parsed_args.house, unit=parsed_args.unit)
            logging.info('Broadcasting: House = %d, Unit = %d' % \
                         (parsed_args.house, parsed_args.unit))
            #dev.learn()
            print 'Raw command (len=%d) = "%s"' % (len(rawCommand), rawCommand)
            core.send_raw_command(rawCommand)
        except Exception:
            logging.exception('Telldus API error')
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: Send Raw Command problem

Post by micke.prag »

My next step whould be as I told you above:
micke.prag wrote:Maybe the next step is to add some output to telldusd to compare the actual data sent to TellStick?
Micke Prag
Software
Telldus Technologies
rogerj
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by rogerj »

Hi,

I tried to do the following:

1) I "recorded" the signals received by the Tellstick using the USB interface. This resulted in my receiving the following signal for a single ON button being pressed on the Nexa sender. See output below, I've included the timestamps for reference. As you can see, there are three similar "bursts" with around 48 ms pause in between.

2) I used these received arrays and tried to "send" them using the Tellstick device through the USB interface (using the Python usb.util library). The telldusd process was not running at that time (if it had been, the Tellstick would have been reported as busy).

No error messages are shown, and the Tellstick Duo blinks blue once when I "send" this to the USB port (using the endpoint.write(x) method of the usb.util library). Would you be able to tell me what's wrong? Is perhaps the data I'm trying to send erroneous in some way, or is it impossible to interface the TS Duo this way?

Any help would be extremely appreciated!

Code: Select all

2016-08-20 16:07:42,936 root         INFO     array('B', [1, 96, 43, 87, 112])
2016-08-20 16:07:42,951 root         INFO     array('B', [1, 96, 114, 111, 116, 111, 99, 111, 108, 58, 97, 114, 99, 116, 101, 99])
2016-08-20 16:07:42,968 root         INFO     array('B', [1, 96, 104, 59, 109, 111, 100, 101, 108, 58, 115, 101, 108, 102, 108, 101, 97, 114, 110])
2016-08-20 16:07:42,983 root         INFO     array('B', [1, 96, 105, 110, 103, 59, 100, 97, 116, 97, 58, 48, 120, 51, 52, 57])
2016-08-20 16:07:42,999 root         INFO     array('B', [1, 96, 54, 70, 67, 57, 50, 59, 13, 10, 43, 87, 112, 114, 111, 116, 111, 99])
2016-08-20 16:07:43,015 root         INFO     array('B', [1, 96, 111, 108, 58, 101, 118, 101, 114, 102, 108, 111, 117, 114, 105, 115, 104])
2016-08-20 16:07:43,031 root         INFO     array('B', [1, 96, 59, 100, 97, 116, 97, 58, 48, 120, 57, 54, 70, 67, 57, 50, 59, 13])
2016-08-20 16:07:43,047 root         INFO     array('B', [1, 96, 10])
2016-08-20 16:07:43,063 root         INFO     array('B', [1, 96])
2016-08-20 16:07:43,079 root         INFO     array('B', [1, 96])
2016-08-20 16:07:43,095 root         INFO     array('B', [1, 96])
2016-08-20 16:07:43,111 root         INFO     array('B', [1, 96, 43, 87, 112, 114, 111, 116, 111, 99, 111, 108, 58, 97, 114, 99])
2016-08-20 16:07:43,127 root         INFO     array('B', [1, 96, 116, 101, 99, 104, 59, 109, 111, 100, 101, 108, 58, 115, 101, 108, 102, 108])
2016-08-20 16:07:43,143 root         INFO     array('B', [1, 96, 101, 97, 114, 110, 105, 110, 103, 59, 100, 97, 116, 97, 58, 48, 120])
2016-08-20 16:07:43,159 root         INFO     array('B', [1, 96, 51, 52, 57, 54, 70, 67, 57, 50, 59, 13, 10, 43, 87, 112, 114, 111])
2016-08-20 16:07:43,175 root         INFO     array('B', [1, 96, 116, 111, 99, 111, 108, 58, 101, 118, 101, 114, 102, 108, 111, 117, 114])
2016-08-20 16:07:43,191 root         INFO     array('B', [1, 96, 105, 115, 104, 59, 100, 97, 116, 97, 58, 48, 120, 57, 54, 70, 67, 57])
2016-08-20 16:07:43,207 root         INFO     array('B', [1, 96, 50, 59, 13, 10])
2016-08-20 16:07:43,223 root         INFO     array('B', [1, 96])
2016-08-20 16:07:43,239 root         INFO     array('B', [1, 96])
2016-08-20 16:07:43,255 root         INFO     array('B', [1, 96])
2016-08-20 16:07:43,271 root         INFO     array('B', [1, 96, 43, 87, 112, 114, 111, 116, 111, 99, 111, 108, 58, 97, 114, 99])
2016-08-20 16:07:43,287 root         INFO     array('B', [1, 96, 116, 101, 99, 104, 59, 109, 111, 100, 101, 108, 58, 115, 101, 108, 102])
2016-08-20 16:07:43,303 root         INFO     array('B', [1, 96, 108, 101, 97, 114, 110, 105, 110, 103, 59, 100, 97, 116, 97, 58, 48])
2016-08-20 16:07:43,319 root         INFO     array('B', [1, 96, 120, 51, 52, 57, 54, 70, 67, 57, 50, 59, 13, 10, 43, 87, 112, 114])
2016-08-20 16:07:43,335 root         INFO     array('B', [1, 96, 111, 116, 111, 99, 111, 108, 58, 101, 118, 101, 114, 102, 108, 111, 117])
2016-08-20 16:07:43,351 root         INFO     array('B', [1, 96, 114, 105, 115, 104, 59, 100, 97, 116, 97, 58, 48, 120, 57, 54, 70, 67])
2016-08-20 16:07:43,367 root         INFO     array('B', [1, 96, 57, 50, 59, 13, 10])
plastbox
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by plastbox »

Just in case anyone is still paying attention to this thread...

I've spent some time over the weekend getting the old wasps nest to compile, and it seems like tdtool reads binary data from files or STDIN into a char array. Which is signed. Meaning any byte where the most-significant-bit is set is turned into it's two's compliment. Which means that running:

Code: Select all

echo -en "\x54\x7f\xff\x18\x1\x84\x9a\x8a\x88\xa8\xa8\xaa\x88\xaa\x88\xa8\xaa\x8a\x8a\x8a\x8a\x88\xa8\xa8\xaa\x88\xaa\x8a\x88\xaa\x88\xaa\x8a\x88\xaa\x8a\x8a\x8a\x8a\x2b" | /usr/local/bin/tdtool --raw -
...puts the following into memory:

Code: Select all

\x54\x7f\xffffffff\x18\x1\xffffff84\xffffff9a\xffffff8a\xffffff88\xffffffa8\xffffffa8\xffffffaa\xffffff88\xffffffaa\xffffff88\xffffffa8\xffffffaa\xffffff8a\xffffff8a\xffffff8a\xffffff8a\xffffff88\xffffffa8\xffffffa8\xffffffaa\xffffff88\xffffffaa\xffffff8a\xffffff88\xffffffaa\xffffff88\xffffffaa\xffffff8a\xffffff88\xffffffaa\xffffff8a\xffffff8a\xffffff8a\xffffff8a\x2b\x0\x0\x0\x0\x0\x0\x0\x0\x70\x1f\xffffffd8\x22\xfffffffc\x7f\x0\x0\xffffff91\xa\x5e\x5e\x7d\x7f\x0\x0\xffffffa0\xffffffce\xffffff8b\x5e\x7d\x7f\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\xe\xb\x5e\x5e\x7d\x7f\x0\x0\x0\x0\x0\x0
..which telldusd through some black magic c++ receives as:

Code: Select all

\x54\x7f\xc3\xbf\x18\x1\xc2\x84\xc2\x9a\xc2\x8a\xc2\x88\xc2\xa8\xc2\xa8\xc2\xaa\xc2\x88\xc2\xaa\xc2\x88\xc2\xa8\xc2\xaa\xc2\x8a\xc2\x8a\xc2\x8a\xc2\x8a\xc2\x88\xc2\xa8\xc2\xa8\xc2\xaa\xc2\x88\xc2\xaa\xc2\x8a\xc2\x88\xc2\xaa\xc2\x88\xc2\xaa\xc2\x8a\xc2\x88\xc2\xaa\xc2\x8a\xc2\x8a\xc2\x8a\xc2\x8a\x2b
Now, the solution ought to be simple. If I'm right, it's downright trivial. Just read the data into an unsigned char array, right?

Thing is, I'm not a c++ developer, and in addition to c++ making even reading binary data from STDIN an exercise in arcane magiks and multidimentional maths, this code really seems like it's... well, "grown organically", meaning it's way to complex for something so inherently simple. I still hold that the following would be a far better architecture:
  • - A base service/daemon containing the mechanics for cross platform communication with the Tellstick, and a simple TCP-server so any number of services can connect and both listen to and send raw data.
    - A second optional service/daemon which connects to the first one and contains the protocol specific logic for encoding/decoding. Another simple TCP-server where messages are transferred both ways in the string format used by the rawDeviceEvent. This could be implemented in an ubiquitous language with immense performance, a great dependency management system, modular design, and the world's largest pool of active developers to aid in development, namely nodejs. This would make writing a solid REST API and forwarding full duplex Tellstick communication all the way into the browser (if that's what one wants) a matter of about 100 lines of easily understandable code.
    - Optionally: Device management, contained where it belongs: in application software.
I'll give fixing the --raw option a go when I have the time. The fact that this bug was reported by several people many years ago and was not fixed strongly hints at it being deprecated. Add in the snide remarks from the creators about what we ought to do to fix their product, and the relative simplicity of the bug (I managed to find it in a few hours, including time to get the CMake-files set up to actually allow compiling tdtool and tdadmin *sigh*)...

So, @micke.prag, did I miss the memo? Is all the old software deprecated? Are all original products (Tellstick/Tellstick Duo) entirely unsupported, despite the fact that you still sell them..?


P.S.: As I said, I am not a c++ developer so anything I said about the bug and char arrays may or may not be completely incorrect. I still hold that Telldus should either tell paying customers (new, old, and potential) if products are unsupported, or fix reported, confirmed bugs in basic functionality in a timely manner (which three years with no feedback is not).
plastbox
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by plastbox »

I saw today's xkcd and immediately thought of the Telldus-guys:
Image
plastbox
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by plastbox »

A quick update, just in case anyone happens to read this:

The (typecasting) problem with sending raw commands has been known for 4 1/2 years. See: http://developer.telldus.se/ticket/268

That ticket was registered on November 28th 2012. February 12th 2013 (already waaaay to slow) Micke Prag elegantly closes the issue with a "Works for me" and a request for more information despite the initial issue report containing enough info to reproduce the problem. On November 16th 2013 the issue is reopened by a Sebastian Strand, who not only confirms that there is a problem but also provides a patch. Then, nothing.

This goes a long way towards showing that telldus-core has been neglected by Telldus for at least 4 years.

Aaanyhow.. I've got code running which provides what I want of the Tellstick (to send and receive events) with no dependencies other than nodejs and node-ftdi. It finds all connected FTDI-devices produced by Telldus (Tellstick and Tellstick Duo), connects to them with the appropriate parameters, and relays data to/from external services (through a set of protocol modules with clearly defined interfaces) over TCP. I've ported mandolyn and arctech already, including allowing the Group-flag for arctech units and "Battery Ok" information from Mandolyn sensors. Porting the rest of the protocols supported by the Tellstick Duo should be trivial.
kavli
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am

Re: Send Raw Command problem

Post by kavli »

Do you have your code available in a public repository that could be cloned?

It could be interesting to try out your code, instead of using the telldus-core/telldusd stuff.
I understand it's not a 1-1 replacement, but I consider myself being capable, having 20+ years behind me as a professional programmer.
JavaScript is not my cup of tea, but given a TCP-based API, I'll already be in my comfort zone.

Regards,

-- Ronny
Post Reply