Closed RealMunichMan closed 6 years ago
When you start pellmonsrv like that it will try to connect to a DBUS session bus, which does not exist in a headless ssh-session. See this for an explanation and instructions how to fix it: https://github.com/motoz/PellMon/wiki/Contributing-to-PellMon#dbus-stuff
Just ask if you need more assistance.
OK, understood.
But if i try to run pellmosrv as a demaon I get the following logfile and pellmonsrv stops immediately:
2017-12-28 09:23:04,505 - INFO - Looking for plugins in /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins
2017-12-28 09:23:04,511 - DEBUG - PluginManager walks into directory: /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins
2017-12-28 09:23:04,513 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/heatingcircuit.pellmon-plugin
2017-12-28 09:23:04,517 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/nbecom.pellmon-plugin
2017-12-28 09:23:04,519 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/calculate.pellmon-plugin
2017-12-28 09:23:04,522 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/pelletcalc.pellmon-plugin
2017-12-28 09:23:04,525 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/exec.pellmon-plugin
2017-12-28 09:23:04,527 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/scottecom.pellmon-plugin
2017-12-28 09:23:04,530 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/testplugin.pellmon-plugin
2017-12-28 09:23:04,533 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/customalarms.pellmon-plugin
2017-12-28 09:23:04,537 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/owfs.pellmon-plugin
2017-12-28 09:23:04,540 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/onewire.pellmon-plugin
2017-12-28 09:23:04,543 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/openweathermap.pellmon-plugin
2017-12-28 09:23:04,546 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/consumption.pellmon-plugin
2017-12-28 09:23:04,549 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/silolevel.pellmon-plugin
2017-12-28 09:23:04,552 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/raspberrygpio.pellmon-plugin
2017-12-28 09:23:04,555 - DEBUG - PluginManager found a candidate:
/usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/cleaning.pellmon-plugin
2017-12-28 09:23:04,728 - DEBUG - Unable to execute the code in plugin: /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/raspberrygpio/init
2017-12-28 09:23:04,729 - DEBUG - The following problem occured:
No module named RPi.GPIO
2017-12-28 09:23:04,736 - INFO - serial port ok
2017-12-28 09:23:04,748 - DEBUG - thred run
2017-12-28 09:23:04,749 - DEBUG - got command
2017-12-28 09:23:04,749 - DEBUG - addchecksum:
2017-12-28 09:23:04,749 - DEBUG - Z040000^
2017-12-28 09:23:04,750 - DEBUG - sendFrame = Z040000^
2017-12-28 09:23:04,750 - DEBUG - serial write
2017-12-28 09:23:04,750 - DEBUG - serial written
2017-12-28 09:23:04,789 - DEBUG - serial read 04.99J 2017-12-28 09:23:04,790 - DEBUG - Got answer, parsing 2017-12-28 09:23:04,790 - DEBUG - Check checksum in parse 04.99J
2017-12-28 09:23:04,790 - DEBUG - Checksum OK
2017-12-28 09:23:04,790 - DEBUG - addchecksum:
2017-12-28 09:23:04,791 - DEBUG - E1t
2017-12-28 09:23:04,791 - DEBUG - addchecksum:
2017-12-28 09:23:04,791 - DEBUG - E0u
2017-12-28 09:23:04,792 - DEBUG - Correct length
2017-12-28 09:23:04,792 - DEBUG - reset readtime
2017-12-28 09:23:04,792 - DEBUG - Return True from parser
2017-12-28 09:23:04,812 - INFO - chip version detected as: 4.99J
2017-12-28 09:23:04,822 - INFO - Activated plugins: ScotteCom, Calculate, Consumption
What I also saw is that the rrdb-database in /usr/local/var/lib/pellmon/nvrrd.db is never created. There's only a pellmon_settings.db Allthough the logfile mentions: 2017-12-28 09:32:30,045 - DEBUG - serial written 2017-12-28 09:32:30,069 - INFO - Created rrd database: rrdtool create /usr/local/var/lib/pellmon/nvrrd.db --step 30 DS:data1:GAUGE:120:U:U DS:data2:GAUGE:120:U:U DS:data3:GAUGE:120:U:U DS:da ta4:GAUGE:120:U:U DS:data5:GAUGE:120:U:U DS:data6:GAUGE:120:U:U DS:data7:GAUGE:120:U:U DS:data8:GAUGE:120:U:U DS:data9:GAUGE:120:U:U DS:data10:GAUGE:120:U:U DS:feedertime:DERIVE:120:0:U DS:f eedercapacity:GAUGE:120:U:U DS:logtick:COUNTER:120:U:U RRA:AVERAGE:0.1:1:20000 RRA:AVERAGE:0.1:10:20000 RRA:AVERAGE:0.1:100:20000 RRA:AVERAGE:0.1:1000:20000 2017-12-28 09:32:30,082 - INFO - copied /usr/local/var/lib/pellmon/nvrrd.db to /mnt/ramdisk/rrd.db
ok, found out.... the database-directory /usr/local/var/lib/pellmon was owned by root, not pellmonsrv now it seems to work
yes, working like a charm now :-)
Thanks and a happy new year from germany
Great! Happy new year!
I installed PellMon on a headless Raspberry-Clone (Lemaker M2) under Debian 4.9.2-10 and when I start pellmonsrv the daemon stops immediately. Below is the Output: What can I do to run then pellmonsrv?
127 root@bananapi ~log/pellmonsrv # pellmonsrv debug:( /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/heatingcircuit/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/nbecom/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/calculate/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/pelletcalc/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/exec/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/scottecom/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/testplugin/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/customalarms/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/owfs/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/onewire/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/openweathermap/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/consumption/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/silolevel/init /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/raspberrygpio/init No module named RPi.GPIO /usr/lib/python2.7/dist-packages/Pellmonsrv/plugins/cleaning/init Traceback (most recent call last): File "/usr/bin/pellmonsrv", line 22, in
pellmonsrv.run()
File "/usr/lib/python2.7/dist-packages/Pellmonsrv/pellmonsrv.py", line 850, in run
commands[args.command]()
File "/usr/lib/python2.7/dist-packages/Pellmonsrv/pellmonsrv.py", line 449, in run
conf.myservice = MyDBUSService(conf.dbus)
File "/usr/lib/python2.7/dist-packages/Pellmonsrv/pellmonsrv.py", line 137, in init
bus=dbus.SessionBus()
File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 211, in new
mainloop=mainloop)
File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 100, in new
bus = BusConnection.new(subclass, bus_type, mainloop=mainloop)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 122, in new
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11