Running two otmonitor instances

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

Moderator: hvxl

Post Reply
Bororo
Member
Member
Posts: 64
Joined: Mon Jan 31, 2011 11:20 am
Contact:

Running two otmonitor instances

Post by Bororo »

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.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Running two otmonitor instances

Post by hvxl »

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
Bororo
Member
Member
Posts: 64
Joined: Mon Jan 31, 2011 11:20 am
Contact:

Re: Running two otmonitor instances

Post by Bororo »

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 10:22 am, edited 1 time in total.
Bororo
Member
Member
Posts: 64
Joined: Mon Jan 31, 2011 11:20 am
Contact:

Re: Running two otmonitor instances

Post by Bororo »

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.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Running two otmonitor instances

Post by hvxl »

I ran otmonitor in daemon mode for a while and get reasonable and fluctuating values in Thingspeak.
Schelte
Bororo
Member
Member
Posts: 64
Joined: Mon Jan 31, 2011 11:20 am
Contact:

Re: Running two otmonitor instances

Post by Bororo »

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.
jake3317
Starting Member
Starting Member
Posts: 16
Joined: Mon Apr 25, 2016 10:21 pm

Re: Running two otmonitor instances

Post by jake3317 »

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: Mon Apr 25, 2016 10:21 pm

Re: Running two otmonitor instances

Post by jake3317 »

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
Post Reply

Return to “Opentherm Gateway Forum”