Question/Request otmonitor

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

Moderator: hvxl

Question/Request otmonitor

Postby RedNax » Mon Sep 30, 2013 10:34 am

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.
RedNax
Starting Member
Starting Member
 
Posts: 39
Joined: September 2013

Re: Question/Request otmonitor

Postby hvxl » Mon Sep 30, 2013 8:15 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1264
Joined: June 2010

Re: Question/Request otmonitor

Postby rtenklooster » Tue Oct 01, 2013 3:55 pm

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?
rtenklooster
Starting Member
Starting Member
 
Posts: 22
Joined: October 2013

Re: Question/Request otmonitor

Postby hvxl » Tue Oct 01, 2013 8:35 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1264
Joined: June 2010

Re: Question/Request otmonitor

Postby rtenklooster » Tue Oct 01, 2013 9:29 pm

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!
rtenklooster
Starting Member
Starting Member
 
Posts: 22
Joined: October 2013

Re: Question/Request otmonitor

Postby RedNax » Wed Oct 02, 2013 6:58 am

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
RedNax
Starting Member
Starting Member
 
Posts: 39
Joined: September 2013

Re: Question/Request otmonitor

Postby rtenklooster » Wed Oct 02, 2013 9:22 am

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 :)
rtenklooster
Starting Member
Starting Member
 
Posts: 22
Joined: October 2013

Re: Question/Request otmonitor

Postby hvxl » Wed Oct 02, 2013 5:12 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1264
Joined: June 2010

Re: Question/Request otmonitor

Postby RedNax » Wed Oct 02, 2013 5:35 pm

'This way' was referring to connecting through otmonitor. I was offering a way to get the best of both worlds.
RedNax
Starting Member
Starting Member
 
Posts: 39
Joined: September 2013


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest