tdtool raw for Siemens sockets...?

Moderator: Telldus

Post Reply
cenedd
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

tdtool raw for Siemens sockets...?

Post by cenedd »

I bought a Siemens 2 gang wall socket because I was blissfully unaware that it used a different protocol that wasn't supported by Tellstick. I'd love to see Telldus add proper support for LightwaveRF but in the meantime I'm trying to see whether it's possible to use tdtool to send a raw command and train the socket to that signal.

I've found some information on the JSJS signal here http://www.dbzoo.com/livebox/universalrf (under the section 'LightwaveRF dimmable CFL bulb')
and some information on Telldus raw protocol here: http://developer.telldus.se/doxygen/TellStick.html

I've tried sending the command like this:

Code: Select all

type on-code.txt | tdtool --raw -
and I get this error
Sending raw command: An error occurred while communicating with TellStick
The code I was sending is this. I'm representing ASCII codes as numers in brackets but in the actual text file I have used the ASCII characters by inserting them with Notepad++

Code: Select all

P[11]R[6]S[30][25][30][25][30][25][30][25][30][25][30][126][30][25][30][126][30][25][30][25][30][25][30][25][30][126][30][25][30][126][30][25][30][25][30][25][30][25][30][126][30][25][30][126][30][25][30][25][30][25][30][126][30][25][30][25][30][126][30][126][30][25][30][126][30][25][30][25][30][25][30][25][30][25][30][25][30][25][30][25][30][126][30][25][30][126][30][25][30][126][30][25][30][25][30][126][30][25][30][25][30][25][30][25][30][25][30][126][30][25][30][126][30][25][30][25][30][25][30][126][30][25][30][126][30][25][30][25][30][126][30][25][30][126][30][25][30][25][30][25][30][25][30][25]
This represents the binary string

Code: Select all

000001010000101000010100010011010000000010101001000001010001010010100000
Is there more I need to add to the raw string or have I got something wrong?
My Tellstick is batch 13 and I'm using Windows.

Many thanks,

Gareth
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tdtool raw for Siemens sockets...?

Post by micke.prag »

Please note:
Due to memory limitations, the parameters is limited in length to 79 bytes.
Your raw data seems too long. You also need to end it with a plus (+).

You might have to convert it to "send extended" (T). There is a function implemented here that can convert send to send extended. A task for the reader is to extend tdSendRawCommand() to automatically use this function when needed... :wink:
Micke Prag
Software
Telldus Technologies
cenedd
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

Re: tdtool raw for Siemens sockets...?

Post by cenedd »

Thanks Micke. I'm slowly learning more as I'm working on it! I've tried converting to a send extended but I'm having trouble with the documentation. In the example the pulse data (d1...dn) appear to be the binary converted to hex but if it's hex, it won't convert to ASCII. I've tried converting the binary to decimal and then to ASCII and I get this:

Code: Select all

P[11]R[6]T[17][17][27][27][17][17][177][177][17][27][27][17][27][17][187][27][17][17][17][17][177][177][177][27][17][17][27][27][17][27][27][17][177][177][17][17]+
If I send that, it's accepted but the socket doesn't train to the signal. Have I made a mistake somewhere in my conversion or is the code just wrong?

Many thanks,

Gareth
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tdtool raw for Siemens sockets...?

Post by micke.prag »

In your example you define only two pulses:
T[17][17][27][27]

17 two times and 27 two times. In your previous example you use at least 25, 30 and 126 and never 17 or 27?

d1...dn are only two bit indexes to the previous defined pulses.
Micke Prag
Software
Telldus Technologies
cenedd
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

Re: tdtool raw for Siemens sockets...?

Post by cenedd »

*Edit* realised that I'd forgotten the 'length' parameter. Added that in but it still doesn't work :(

Thanks Micke. You're right, I've left out the time indexes. I tried adding them back in again and it didn't work.

I've reworked it just to be sure and it's still not working. I've also tried increasing the number of repeats in case it needs more to train. Could you possibly check my working to see if I've made any more obvious mistakes please?

In theory the code I'm using is good for a dimmable CFL bulb using LightWaveRF protocol and made by JSJS. This product is in the same range as the wall socket I'm using so I had assumed the codes would be the same. If my working is correct, do you happen to have any known working codes for these devices or can you point me to any further information?

Many thanks,

Gareth

Code: Select all

binary stream encoded in signal
 00000101 00001010 00010100 01001101 00000000 10101001 00000101 00010100 10100000

0 = 300,250
1 = 300,1260

ON signal represented as hi/lo times:
300,250,300,250,300,250,300,250,300,250,300,1260,300,250,300,1260,300,250,300,250,300,250,300,250,300,1260,300,250,300,1260,300,250,300,250,300,250,300,250,300,1260,300,250,300,1260,300,250,300,250,300,250,300,1260,300,250,300,250,300,1260,300,1260,300,250,300,1260,300,250,300,250,300,250,300,250,300,250,300,250,300,250,300,250,300,1260,300,250,300,1260,300,250,300,1260,300,250,300,250,300,1260,300,250,300,250,300,250,300,250,300,250,300,1260,300,250,300,1260,300,250,300,250,300,250,300,1260,300,250,300,1260,300,250,300,250,300,1260,300,250,300,1260,300,250,300,250,300,250,300,250,300,250

Times to be used as indexes. t3 not used as identical to t0
t0 [30]
t1 [25]
t2 [126]
t3 [30]

length [72]

signal encoded as indexes of times:
00 01 00 01 00 01 00 01 00 01 00 10 00 01 00 10 00 01 00 01 00 01 00 01 00 10 00 01 00 10 00 01 00 01 00 01 00 01 00 10 00 01 00 10 00 01 00 01 00 01 00 10 00 01 00 01 00 10 00 10 00 01 00 10 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 10 00 01 00 10 00 01 00 10 00 01 00 01 00 10 00 01 00 01 00 01 00 01 00 01 00 10 00 01 00 10 00 01 00 01 00 01 00 10 00 01 00 10 00 01 00 01 00 10 00 01 00 10 00 01 00 01 00 01 00 01 00 250

Grouped into bytes:
00010001
00010001
00010010
00010010
00010001
00010001
00100001
00100001
00010001
00010010
00010010
00010001
00010010
00010001
00100010
00010010
00010001
00010001
00010001
00010001
00100001
00100001
00100001
00010010
00010001
00010001
00010010
00010010
00010001
00010010
00010010
00010001
00100001
00100001
00010001
00010001

Converted to decimal:
17
17
18
18
17
17
33
33
17
18
18
17
18
17
34
18
17
17
17
17
33
33
33
18
17
17
18
18
17
18
18
17
33
33
17
17

Full command to send
P[11]R[6]T[30][25][126][30][72][17][17][18][18][17][17][33][33][17][18][18][17][18][17][34][18][17][17][17][17][33][33][33][18][17][17][18][18][17][18][18][17][33][33][17][17]+
Post Reply