Running two otmonitor instances

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

Moderator: hvxl

Running two otmonitor instances

Postby Bororo » Thu Sep 08, 2016 8:35 pm

Hello All,
I have OTGW connected to Raspi3 using USB. Otmonitor-ahf is daemonised and included into startup.
I would like to know if it's possible to start otmonitor-ahf again in lxde environment while another otmonitor-ahf process is already running?
(just in case of firmware update need - then otmonitor gui is necessary)
Thank you.
Bororo
Starting Member
Starting Member
 
Posts: 31
Joined: January 2011

Re: Running two otmonitor instances

Postby hvxl » Fri Sep 09, 2016 8:30 pm

Bororo wrote:I would like to know if it's possible to start otmonitor-ahf again in lxde environment while another otmonitor-ahf process is already running?

When the first otmonitor instance has the relay server configured with the option to "Relay opentherm messages", a second (third, fourth,...) otmonitor instance can be started and configured to connect to the relay port. Don't connect multiple programs to a serial port, though. That won't work

Also, I very much doubt that the relay port method will allow you to update the firmware from a secondary client. It was not a design goal. In any case I never tried it.

Bororo wrote:(just in case of firmware update need - then otmonitor gui is necessary)

You can do a firmware update with the command line version (using the --upgrade=FILE option), but you will have to stop any running instances before doing that. I suppose it could be useful to make a dbus command to do a firmware update.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1026
Joined: June 2010

Re: Running two otmonitor instances

Postby Bororo » Sat Sep 10, 2016 3:47 pm

Hi Schelte,
thank you for explanation.
Now I see something strange with my otmonitor-ahf.
OTGW is connected to Rpi3 on ttyUSB0, as I mentioned before otmonitor-ahf is started during RPI3 boot using command sudo /home/pi/otgw/otmonitor-ahf --daemon -f '/home/pi/otgw/otmonitor-ahf.conf'
The config file looks like this:

Code: Select all
datalog {
  append false
  file /home/pi/otgw/logs/otdata.txt
  enable false
  itemlist {
    flame
    dhwmode
    chmode
    dhwenable
    diag
    fault
    outside
    temperature
    setpoint
    modulation
    boilertemp
    returntemp
    controlsp
    dhwsetpoint
    chwsetpoint
    timestamp
  }
  interval 30000
}
web {
  sslport 0
  graphlegend false
  theme default
  enable false
  sslprotocols tls1,tls1.1,tls1.2
  nopass true
  certonly false
  port 8081
}
clock {
  year false
  date false
  auto false
}
mqtt {
  devicetype central_heating
  deviceid otmonitor
  retransmit 10
  format json2
  port 1883
  qos 1
  keepalive 120
  username {}
  password {}
  enable false
  messages false
  client raspberrypi3-otmon
  broker localhost
}
sms {
  enable false
  ventilationfault false
  phonenumber {}
  route {}
  sender {}
  password c2VjcmV0
  provider VoipPlanet
  account {}
  pressure false
  solarfault false
  roomcold true
  watchdogtimer false
  boilerfault true
  commproblem false
}
email {
  password VG9wb2xjYW55MjAxMQ==
  server smtp.gmail.com
  pressure true
  roomcold true
  boilerfault true
  watchdogtimer true
  solarfault true
  commproblem true
  port 465
  enable true
  secure SSL
  recipient XXXXXX
  user XXXXX
  sender XXXXX
  ventilationfault true
}
logfile {
  pattern otlog-%Y%m%d.txt
  directory /home/pi/otgw/logs
  enable false
}
tspeak {
  key MO2TSXXXXXXX
  enable true
  interval 120
  field1 temperature
  field2 setpoint
  field3 boilertemp
  field4 returntemp
  field5 controlsp
  field6 modulation
  field7 pressure
  field8 dhwtemp
}
alert {
  pressurelow 1.1
  roomcold 14
  pressurehigh 1.9
}
connection {
  device /dev/ttyUSB0
  type serial
  port 25238
  host localhost
  enable true
}
server {
  relay true
  enable true
  port 7686
}
view {
  tab graph
  order increasing
  sort name
  bitflags false
}


The problem is that ThingSpeak is receiving same values since start of daemonised otmonitor-ahf.
I already set-up OTGW as LAN device in Domoticz and Domoticz receiving changing data.
Any suggestion what could be wrong?
Last edited by Bororo on Sun Sep 11, 2016 9:22 am, edited 1 time in total.
Bororo
Starting Member
Starting Member
 
Posts: 31
Joined: January 2011

Re: Running two otmonitor instances

Postby Bororo » Sun Sep 11, 2016 9:21 am

Hello,
I'm not 100 percent sure, but my otmonitor-ahf is not sending correct data to ThingSpeak when option Relay opentherm message is selected.
Can anybody confirm same behaviour?
Many thanks in advance.
Bororo
Starting Member
Starting Member
 
Posts: 31
Joined: January 2011

Re: Running two otmonitor instances

Postby hvxl » Mon Sep 12, 2016 7:34 pm

I ran otmonitor in daemon mode for a while and get reasonable and fluctuating values in Thingspeak.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1026
Joined: June 2010

Re: Running two otmonitor instances

Postby Bororo » Tue Sep 13, 2016 2:26 pm

I was thinking about any other possible reason for such a situation and finally came to conclusion that Domoticz causing such behaviour.
When Domoticz is on and I have OTGW LAN there, my otmonitor-ahf is sending the same values to Thingspeak.
I know I can use Dmoticz to send data to Thingspeak, but otmonitor is more flexible and I like it.
So finally - otmonitor is working fine and something wrong is with Domoticz's access to otmonitor daemon.
Bororo
Starting Member
Starting Member
 
Posts: 31
Joined: January 2011

Re: Running two otmonitor instances

Postby jake3317 » Fri Oct 07, 2016 9:36 pm

Nope, just that Domoticz sent a command PS=1 (Print Summary=1). By doing that OTGW reports a predefined set of variabls back, which Domoticz can read and cut in all the different values for the created Devices within Domoticz. See the original website: http://otgw.tclcode.com/firmware.html#cmdps

Verstuurd vanaf mijn K00C met Tapatalk
jake3317
Starting Member
Starting Member
 
Posts: 16
Joined: April 2016

Re: Running two otmonitor instances

Postby jake3317 » Mon Jan 02, 2017 9:33 pm

Bororo wrote:I was thinking about any other possible reason for such a situation and finally came to conclusion that Domoticz causing such behaviour.
When Domoticz is on and I have OTGW LAN there, my otmonitor-ahf is sending the same values to Thingspeak.
I know I can use Dmoticz to send data to Thingspeak, but otmonitor is more flexible and I like it.
So finally - otmonitor is working fine and something wrong is with Domoticz's access to otmonitor daemon.

Don't know if you're still interested, but a Domoticz member made a work-around to have both OTmonitor and Domoticz accessing the OTGW at the same time
jake3317
Starting Member
Starting Member
 
Posts: 16
Joined: April 2016


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron