Question/Request otmonitor

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

Post Reply
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Question/Request otmonitor

Post by RedNax »

When using telnet to connect to otmonitor -p <port>, the output of the PS=1 command is split over the telnet session and the log window of otmonitor. The NF feedback shows up in telnet, yet the interesting part with the info only shows up in the otmonitor log pane.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Question/Request otmonitor

Post by hvxl »

The PS=1 command was made for people who just want to get a dump of opentherm related parameters on demand. When the gateway is used in this mode, all output of the actual opentherm messages is suppressed. That leaves no information for otmonitor to work with, so it hardly provides any added value. If you want to use the PS=1 command, I suggest to simply drop otmonitor out of the loop and talk to the gateway directly.
Schelte
rtenklooster
Starting Member
Starting Member
Posts: 22
Joined: Tue Oct 01, 2013 3:27 pm

Re: Question/Request otmonitor

Post by rtenklooster »

Hi,
Maybe this is a dumb question but i just ask.
tomorrow i receive my conrad order, i already have a pcb and ik want to use a raspberry pi with opentherm monitor installed and connected to a usb -> serial converter.
For as far as i understand it, opentherm monitor logs the last state to a log txt file.
My plan is to request that file and write it into a mysql database using a php script.
So far - so good.

Then the other part, i think OT monitors keeps the serial device busy. I guess there is no way of sending data to my OT gateway, when OT monitor is running? Or can i send tellnet commands to the opentherm monitor software, witch will send it to serial?

my first thought was using python and a script to read thje status, write it to mysql and if i want, use a php serial function to send commands.
How do you guys, monitor- log - and control your OTG?
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Question/Request otmonitor

Post by hvxl »

It's not a dumb question at all. Maybe I should first explain that otmonitor was not originally intended to run 24x7 to monitor, log, and control the gateway. It was just easier for me to make a tool that was known to work in case people had problems communicating with their gateway than trying to debug all the weird things they might otherwise do with hyperterm, putty, or whatever other funky tools they would use.

Over time the capabilities of otmonitor have grown to a point where many people are now using it as their main portal to the gateway. The version currently published on the web site includes a TCP server that will accept commands that it will send to the serial port. It also does its best to return the response back to the caller. It should be easy in most programming languages to open a socket and talk to this server. In a pinch you can even use bash (the default shell on a Raspberry Pi) to do it for you:

Code: Select all

echo TT=20 > /dev/tcp/localhost/7686
The next version of otmonitor will also provide a dbus interface on the Raspberry Pi and other linuxes. That will allow you to do things like:

Code: Select all

dbus-send --print-reply --dest=com.tclcode.otmonitor / com.tclcode.otmonitor.Command :TC=0
The new version will also generate dbus signals whenever something interesting happens.

But of course you can also write your own tool to connect to the serial port directly and parse the opentherm messages, or periodically issue a PS=1 command.

Whatever you do, have fun with the gateway and your exploration of the opentherm protocol.
Schelte
rtenklooster
Starting Member
Starting Member
Posts: 22
Joined: Tue Oct 01, 2013 3:27 pm

Re: Question/Request otmonitor

Post by rtenklooster »

Hi, thanks for your response.
Thats great, there is a tcp server included in the software. I could not find any of those in the documents on your website, and in the settings. I responded in this thread because i thought i could connect to localhost indeed. But i did not knew on witch port. I guess now its 7686 ;) I think that's enough for me.
Can't wait for my components to arrive, the only thing is.. my pic isn;t programmed yet and i ordered a programmer on ebay.. that takes about two weeks to arrive so i already send a mail to a local electro shop if they are willing to program it for me ;)
Lets hope so. Thanks for the great work. If everything is going as planned.. i might upload some screenshots of my webapp witch i already have working now. Right now it is just on- and off but i wanted to implement opentherm. Thats why i think its a great improvement on my current script!
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Question/Request otmonitor

Post by RedNax »

Please not that when issuing the PS=1 command in this way you will not get the output you're after. It will show up in the log pane of otmonitor, not on the port you're connected to.

I have now setup a raspberry pi with remserial. It allows multiple connections to a usb/serial port over your network, It's been running for a few days now serving both otmonitor and my unix script simultaniously without issue.

btw, you don't really need the PS=1 command. I've written a bash shell script which decodes the ot-messages directly as they come in. It's surprisingly short :D
rtenklooster
Starting Member
Starting Member
Posts: 22
Joined: Tue Oct 01, 2013 3:27 pm

Re: Question/Request otmonitor

Post by rtenklooster »

Now where talking.
Remserial seems like a good solution. Can you share the bash script you are using?
Thanks for sharing with me how you are using the otg.
Makes it more easy for me to get started :)
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Question/Request otmonitor

Post by hvxl »

RedNax wrote:Please not that when issuing the PS=1 command in this way you will not get the output you're after. It will show up in the log pane of otmonitor, not on the port you're connected to
What's "this way"? You will not get the PS=1 output when connected through otmonitor. But when following my suggestion to connect to the serial port directly, you will get the output of PS=1.
Schelte
RedNax
Starting Member
Starting Member
Posts: 39
Joined: Wed Sep 25, 2013 12:18 pm

Re: Question/Request otmonitor

Post by RedNax »

'This way' was referring to connecting through otmonitor. I was offering a way to get the best of both worlds.
Post Reply

Return to “Opentherm Gateway Forum”