Page 9 of 20

Re: [120] opentherm gateway

Posted: Tuesday 06 May 2014 8:22
by gizmocuz
what happens when you use the monitor application of OTGW :

http://otgw.tclcode.com/download.html#utilities

Re: [120] opentherm gateway

Posted: Tuesday 06 May 2014 9:55
by Sappien
With otmonitor it works fine

Re: [120] opentherm gateway

Posted: Tuesday 06 May 2014 10:02
by gizmocuz
Is there any logging available fro otmonitor ?

in the above log you see that i send the SH command, so it should work.
the documentation says:
SH=temperature
Setpoint Heating - Set the maximum central heating setpoint. This command is only available with boilers that support this function.
Examples: SH=72.5, SH=+20
the last line (SH: 39.00) is actually from the OTGW itself, not send to the log by domoticz

Re: [120] opentherm gateway

Posted: Sunday 11 May 2014 20:11
by Sappien
20:08:23.523226 Command: SW=54
20:08:23.541157 SW: 54.00
20:08:45.007171 T80190000 Read-Data Boiler water temperature: 0.00
20:08:45.148995 BC0191419 Read-Ack Boiler water temperature: 20.10
20:08:46.010132 T00090000 Read-Data Remote override room setpoint: 0.00
20:08:46.032068 R10383600 Write-Data DHW setpoint: 54.00
20:08:46.145500 BD0383600 Write-Ack DHW setpoint: 54.00
20:08:46.160374 AC0090000 Read-Ack Remote override room setpoint: 0.00

Image

Re: [120] opentherm gateway

Posted: Sunday 11 May 2014 20:16
by gizmocuz
Okey....

i use the SH command, you are taling about the SW command

that is the Domestic Hot Water setpoint, not the CH water setpoint ?

Re: [120] opentherm gateway

Posted: Sunday 11 May 2014 20:18
by Sappien
I've got the issue with the DHW and CH setpoint. Both jump back to the original value

DHW = SW
Max CH = SH

Re: [120] opentherm gateway

Posted: Saturday 21 June 2014 2:09
by Sjonnie
Hello

I try to get the opentherm gateway in combination with the lan/wifi interface working. I have tried to get communication going via port 1001 as the manual tells me. Is there somebody who has this setup (otwg + tplink 703) working in Domoticz? And maybe can confirm i' am using the right port?

Thanks

Re: [120] opentherm gateway

Posted: Saturday 21 June 2014 20:34
by sincze
Sjonnie wrote:Hello

I try to get the opentherm gateway in combination with the lan/wifi interface working. I have tried to get communication going via port 1001 as the manual tells me. Is there somebody who has this setup (otwg + tplink 703) working in Domoticz? And maybe can confirm i' am using the right port?

Thanks
I configured OTGW via TP Link within Domoticz.
First I received some errors, (OTGW-2) then after one minute the device was recognised (OTGW-1).
What does your domoticz log say?

Did you configure the TPLInk startup script correctly?

Sándor

Re: [120] opentherm gateway

Posted: Saturday 21 June 2014 21:24
by Sjonnie
Hello Sandor

Thanks a lot for your reply! I appreciate it.
I get errors that connection gets refused in Domotiticz log:
Domoticz Log connection error
Domoticz Log connection error
ErrorLog.JPG (14.99 KiB) Viewed 4910 times
I'am not entirely sure I configured the TPlink startup script correctly to be honest. I bought it as a kit and I followed the documentation which came along with it. The TPlink had to be flashed with "openWRT" firmware and configured as such.
This is the document:
OpenWRT TP-link 703 instructions page1
OpenWRT TP-link 703 instructions page1
Openwrt_TPlink_page1.JPG (111.6 KiB) Viewed 4910 times
OpenWRT TP-link 703 instructions page2
OpenWRT TP-link 703 instructions page2
Openwrt_TPlink_page2.JPG (77.59 KiB) Viewed 4910 times
Thanks a lot
John

Re: [120] opentherm gateway

Posted: Saturday 21 June 2014 23:54
by sincze
Looks okay.
Can you check TPLInk script Under system startup:

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
opkg update
opkg install kmod-usb-serial-pl2303
opkg install ser2net

# Create Connection file for Opentherm Gateway
echo "1001:raw:15:/dev/ttyUSB0:9600,NONE,1STOPBIT,8DATABITS" > /etc/ser2net.conf

ser2net
exit 0

Re: [120] opentherm gateway

Posted: Saturday 21 June 2014 23:56
by sincze
sincze wrote:Looks okay.
Can you check TPLInk script Under system startup:

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
opkg update
opkg install kmod-usb-serial-pl2303
opkg install ser2net

# Create Connection file for Opentherm Gateway
echo "1001:raw:15:/dev/ttyUSB0:9600,NONE,1STOPBIT,8DATABITS" > /etc/ser2net.conf

ser2net
exit 0
In addition you can use a program like putty or bitvise to loging to your TP-Link.
issue a command dmesg and look if your TTYUSB0 is the one the OTGW is connected to.

dmesg | grep TTYUSB*

Re: [120] opentherm gateway

Posted: Sunday 22 June 2014 20:30
by Sjonnie
Hi

Thanks again. I' am going to try this and will let you know how things turn out. I didn't do the opkg update and installation though, so that probably is the issue then.

Regards
John

Re: [120] opentherm gateway

Posted: Monday 23 June 2014 12:41
by Sjonnie
I'am not very succesful yet;
Both the packages are installed ("kmod-usb-serial-pl2303", "ser2net") as the luci webgui of the Openwrt tells me.
Also I can find the ser2net.conf file with the string as you wrote below.
The dmesg grep shows me a connected device PL2303 and when I disconnect the usb connector it shows the PL2303 disconnected. I don't know if this is the right value for the actual OTGW.
I build the gateway myself and I do know that the gateway itself is working OK because the windows application "OTmonitor" works good over USB.
Dmesg output
Dmesg output
Dmesg.JPG (74.11 KiB) Viewed 4878 times
Thanks for your support
Best Regards
John

sincze wrote:
sincze wrote:Looks okay.
Can you check TPLInk script Under system startup:

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
opkg update
opkg install kmod-usb-serial-pl2303
opkg install ser2net

# Create Connection file for Opentherm Gateway
echo "1001:raw:15:/dev/ttyUSB0:9600,NONE,1STOPBIT,8DATABITS" > /etc/ser2net.conf

ser2net
exit 0
In addition you can use a program like putty or bitvise to loging to your TP-Link.
issue a command dmesg and look if your TTYUSB0 is the one the OTGW is connected to.

dmesg | grep TTYUSB*

Re: [120] opentherm gateway

Posted: Monday 23 June 2014 21:55
by sincze
10.180000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
10.180000] hub 1-0:1.0: USB hub found
10.450000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
10.530000] usb 1-1: new high-speed USB device number 2 using ehci-platform
10.590000] USB Serial support registered for generic
10.680000] hub 1-1:1.0: USB hub found
10.690000] usbserial: USB Serial Driver core
10.740000] USB Serial support registered for FTDI USB Serial Device
10.750000] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
10.780000] USB Serial support registered for pl2303
10.790000] pl2303: Prolific PL2303 USB to serial adaptor driver
10.980000] usb 1-1.2: new full-speed USB device number 3 using ehci-platform
11.090000] usb 1-1.2: pl2303 converter now attached to ttyUSB0


A well you should be nearly there.
check /etc the ser2net.conf should be there.
if not just create one

touch ser2net.conf
sudo nano ser2net.conf and enter 1 line

1001:raw:15:/dev/ttyUSB0:9600,NONE,1STOPBIT,8DATABITS

save the file and now run ser2net.

Try again in Domoticz. ;-)

Re: [120] opentherm gateway

Posted: Monday 23 June 2014 22:33
by Sjonnie
Hi Sincze

Guess what! You got it working! Thanks a lot. The line was already in the ser2net.conf file but the process wasn't running. Domoticz went offline doing so, so that needed a reboot as well and then I got in the log: OTGW now connected! Cool what?

I want to thank you for your support! I'am gonna think about a new project for Domoticz. Maybe we'll talk again some time.

Best Regards
John
Capture
Capture
Capture.JPG (77.17 KiB) Viewed 4865 times

Re: [120] opentherm gateway

Posted: Monday 23 June 2014 22:53
by sincze
Sjonnie wrote:Hi Sincze

Guess what! You got it working! Thanks a lot. The line was already in the ser2net.conf file but the process wasn't running. Domoticz went offline doing so, so that needed a reboot as well and then I got in the log: OTGW now connected! Cool what?

I want to thank you for your support! I'am gonna think about a new project for Domoticz. Maybe we'll talk again some time.

Best Regards
John
The attachment Capture.JPG is no longer available
:D Hurray!! Victory.
Well now the fun part really begins. (building your own thermostat) mine is still running within Domotiga. ;)
btw what firmware did you flash into your OTGW ?
I still have some 0 values. :cry:

Re: [120] opentherm gateway

Posted: Tuesday 24 June 2014 0:56
by Sjonnie
Hello

Well actually i also have some zero values like you do, except for the return water temperature; that one shows an actual value. On top of that I have to deal with another lttle issue; cause when I got home from work I noticed all the OTGW devices in red state. The running log of Domoticz showed me an "end of file" error, don't know where that comes from, but after a restart of the TPlink and the start of the ser2net process things started to work again. Maybe some log which is enabled or so? So still stuff to do I guess ;-)

I flashed version 4.0.1 in my OTGW

Cheers

Re: [120] opentherm gateway

Posted: Tuesday 24 June 2014 7:10
by gizmocuz
Suggestion, first get autostart working for ser2net, next maybe a cronjob to restart every 3 hours or reboot?
I also noticed this with this sollution

Re: [120] opentherm gateway

Posted: Tuesday 24 June 2014 9:17
by sincze
Sjonnie wrote:Hello

Well actually i also have some zero values like you do, except for the return water temperature; that one shows an actual value. On top of that I have to deal with another lttle issue; cause when I got home from work I noticed all the OTGW devices in red state. The running log of Domoticz showed me an "end of file" error, don't know where that comes from, but after a restart of the TPlink and the start of the ser2net process things started to work again. Maybe some log which is enabled or so? So still stuff to do I guess ;-)

I flashed version 4.0.1 in my OTGW

Cheers

Hi Sjonnie.

Did you know that the TP Link suffers from an USB issue.
It will stop working if you don't connect OTGW via a HUB. http://wiki.openwrt.org/toh/tp-link/tl-wr703n

"USB 2.0 port (High-Speed only, use an external High-Speed hub for Full/Low-Speed devices)"
This one will work http://www.bol.com/nl/p/belkin-usb-2-0- ... 012517293/ however it seems the price exploded 4 times since I bought it.


It can be fixed by brewing your own build of open-wrt, or DISABLE the Wireless functionality that will also work.
I tested the last solution several months with my smartmeter (also USB) and a friend of mine who had to use the wireless functionality had to build his own open-wrt. That also solved the issue.

Good luck.

Re: [120] opentherm gateway

Posted: Tuesday 24 June 2014 9:19
by sincze
gizmocuz wrote:Suggestion, first get autostart working for ser2net, next maybe a cronjob to restart every 3 hours or reboot?
I also noticed this with this sollution
Good idea.
However I think this shouldn't be necessary have been running OTGW for several months now without a cronjob or a crashing Domoticz / Domotiga.
If the TP-Link goes down it seems the client Domotiga (don't know Domoticz) has to be restarted as well, or at least the OTGW service.