Page 1 of 16

Powerlink serial pinout, linux daemon and web interface

Posted: Mon Jan 30, 2012 5:56 pm
by viknet
hello all,

I had trouble finding the pinout of the powermax pro (without buying any cable), so with the help of a multimeter and a usb to 3.3V serial TTL adapter (such as this one cgi.ebay.fr/2pcs-USB-2-0-to-TTL-UART-6P ... 3a6f4cc144 but others from arduino/spakfun/adafruit will work) I found these information

I can confirm the pinout because I manage to link a PC using http://realterm.sourceforge.net/ and such a cable I manually calculated a checksum and manage to do the enrolement process.

for the posterity, please find attached two picture of the serial port, with your protocol the serial pinout and a small router such as this one TP-Link TL-WR703N
http://wiki.openwrt.org/toh/tp-link/tl-wr703n you can easily recreate yourself a free (not as in beer) powerlink.

Best regards

Viknet

P.S.
By the way hello to all of domoticaforum user and a big thanks to Rene for describing the protocol

P.S 2
for those too lazy for registering to view the pictures, the port is a 10pin header labeled PC /IP the pinout is described below :

Code: Select all

_______________________________
|?0V   GND  TX   RX     3.75V |
|?0V   ?3V    ?0V  GND  3.75V |
-------------------------------
             PC / IP

Powerlink serial pinout and daemon for linux openwrt

Posted: Thu Apr 12, 2012 11:55 am
by viknet
hello,

I wanted to give some information about where I am now, I bought a powerlink2 and found it to be incompatible with my alarm :-(

I did some sniffing in case some of you want
powermax -> powerlink2 (enrolement)
0D AB 0A 00 01 00 00 00 00 00 00 00 43 06 0A

powerlink2 reply -> powermax
0D 24 00 00 F9 62 00 00 00 00 00 00 80 0A

nothing is working..............................................
so if you want a powerlink2 I sale one.

so I decided to go the opensource way and bought these for 30€
http://wiki.openwrt.org/toh/tp-link/tl-wr703n
http://cgi.ebay.fr/USB-to-Serial-Adapte ... 415d279d2b

install openwrt, and create a cable to plug the powermax and the wifi router (3.7V power from powermax is enough) is is small and fit inside a powermax (plus it's wifi)

Now I am writing a linux daemon to chat with the powermax in C (perl/php/python is too heavy for this router).

This is mainly done (the only things not yet designed is how to chat from the daemon to the open world, at this moment you have to press a key to send code)

So if people are interested in writing an opensource daemon for powermax, please feel free to mail me

Re: Powerlink serial pinout

Posted: Tue Apr 17, 2012 11:31 pm
by Rene
I can confirm this works!!!

I tried it with an USBBUB.

Re: Powerlink serial pinout

Posted: Thu Jun 07, 2012 10:28 pm
by viknet
hello everybody,

I am back with some consistent work and some (less consistant work) ;-)

So I have build what I designed in my previoused post :-)

I have created a daemon in C handling all messages from the pmax and a web interface (designed with jquery and made for ios/android ) in C/cgi discussing with the daemon over xpl (xpl is an home automation protocol)

here are some picture were you will see the wifi router with an usb to serial interface and picture of the web interface

I will post the binary and sources (GPL if you ask) soon

Re: Powerlink serial pinout

Posted: Sat Jul 21, 2012 7:53 pm
by belibaste
Well I have installed Openwrt in my TP link.
Could you help us for going longer?

Re: Powerlink serial pinout

Posted: Sun Jul 22, 2012 1:24 pm
by CybFox
Hi Viknet,

Nice information there ! I want to do something similar so I have a few questions:
- Do you only connect RX,TX and GND from the USB2Serial -> PowerMax PC/IP connector ?
- Is it possible to use the PowerMAX Remote Programmer software with the above connections ? Or does it only work with the real RS232 ports ?
- Is it possible to look at the deamon code you have written ?

Best regards,

Cybfox

Re: Powerlink serial pinout

Posted: Sun Jul 22, 2012 10:35 pm
by Rene
I can only answer one of these questions. Yes it is possible to use the remote programmer with this connection.

Re: Powerlink serial pinout

Posted: Wed Jul 25, 2012 3:47 pm
by CybFox
Hi Rene,
Rene wrote:Yes it is possible to use the remote programmer with this connection.
Ok that's good News already !
I'd like to use an Arduino as a USB to serial converter to connect to the PowerMax, but to make sure I don't damage anything, could you tell us how you connected the USB BUB to the PowerMax ? (I mean which pin connected to which pin).

Re: Powerlink serial pinout

Posted: Wed Jul 25, 2012 7:44 pm
by belibaste
@CybFox
If you look at picture 1, you see that VIKNET uses PC/IP connector and not RS232 connector
I am using Viknet' material: TP link + USB/serial cable = 25€ and all is OK

I am working on binaries and sources codes

Re: Powerlink serial pinout

Posted: Wed Jul 25, 2012 11:13 pm
by viknet
CybFox wrote:Hi Viknet,

Nice information there ! I want to do something similar so I have a few questions:
- Do you only connect RX,TX and GND from the USB2Serial -> PowerMax PC/IP connector ?
- Is it possible to use the PowerMAX Remote Programmer software with the above connections ? Or does it only work with the real RS232 ports ?
- Is it possible to look at the deamon code you have written ?

Best regards,

Cybfox

I have connected 3.75V, GND RX and TX, (3.75V is enough for powering the router), but if you prefer an external power supply (can be usefull for debugging if you suspect power issue even if I never had one) then only GND RX and TX need to be connected

I don't have the "PowerMAX Remote Programmer" but if it work serialy then it could work (rene seems to be sure about it) with the serial converter connected to your PC if you want to use the router setup then it's another thing (also probably doable)

yes I can publish the code (latter this evening probably) GPL if somebody ask

Re: Powerlink serial pinout

Posted: Thu Jul 26, 2012 12:33 am
by viknet
I cannot upload ipk file (if an admin can remove this limitation)
file are uploaded at:
http://dl.free.fr/pqVtEgIOi xpl library
http://dl.free.fr/gVS3VE2eA pmax daemon
http://dl.free.fr/i9Z7TjWoX xpl example and utility (optional)


src of the three: http://dl.free.fr/gJZy64Wnr


copy to your router in /tmp then install using opkg install something.ipk

the daemon is at /bin/pmaxd


you can run it without option (daemon mode) or with the -f option (foreground)
when run in foreground you can press key (a for arming away g for getlog c for quit d for disarm and h for arming home)
for some log and info run with the v option, more v mean more logs: pmad -fvvvvv is very nice
configuration file is at /etc/pmaxd.conf, you need to give your pin code your namezone and the name of the serial port (for an obscure bug on my openwrt where the serial port is jumping around, you can have more than one serial port)
you need lighttpd install and configured


there is no doc

there is no support (use at your own risk)

help is welcome :-)


if asked everything mine is GPL

Re: Powerlink serial pinout

Posted: Thu Jul 26, 2012 6:47 pm
by belibaste
Yes you can publish code I take it whith pleasure

Re: Powerlink serial pinout

Posted: Thu Jul 26, 2012 7:39 pm
by Bwired
mail the samples to me directly and i upload them in the files directory and put a link in your post.
I think you have my mail...

Re: Powerlink serial pinout

Posted: Tue Jul 31, 2012 9:58 pm
by CybFox
Thanks Viknet !

Re: Powerlink serial pinout

Posted: Wed Aug 01, 2012 7:52 pm
by belibaste
Thanks for all