Forfatter Emne: PellMon på Raspberry  (Læst 167012 gange)

0 Medlemmer og 1 Gæst læser dette emne.

Offline kivi

  • Top of the pop
  • *****
  • Indlæg: 352
  • Respekt optjent: +6/-0
Sv: PellMon på Raspberry
« Svar #15 Dato: Okt 18, 2014, 16:46 »
Thank you Motoz, ill try that out.

Mvh
Ole
Mvh
Ole
BlackStar 1016, 16 kW, V6.76, 160+54 m2,  kompressorrens, 300L VVB med solfanger, Pellmon på Raspberry pi

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #16 Dato: Okt 19, 2014, 10:32 »
Nordgren: To set the burner on and off according to the scheme you showed in the attached picture you can use this crontab:

* 6 * * 2,3,4,5 /usr/local/bin/pellmoncli.py set burner_on 0
* 10 * * 2,3,4,5 /usr/local/bin/pellmoncli.py set burner_off 0
* 8 * * 0,6 /usr/local/bin/pellmoncli.py set burner_on 0
* 12 * * 0,6 /usr/local/bin/pellmoncli.py set burner_off 0
* 16 * * * /usr/local/bin/pellmoncli.py set burner_on 0
* 20 * * * /usr/local/bin/pellmoncli.py set burner_off 0

On weekdays the burner is then on for four hours from 6 to 10 and on weekends 8 to 12 and every day 16 to 20.

Crontab is a lot more flexible than this, so you could for instance use this scheme only in the summer (eg may-august), like this:

* 6 * 5,6,7,8 2,3,4,5 /usr/local/bin/pellmoncli.py set burner_on 0
* 10 * 5,6,7,8 2,3,4,5 /usr/local/bin/pellmoncli.py set burner_off 0
* 8 * 5,6,7,8 0,6 /usr/local/bin/pellmoncli.py set burner_on 0
* 12 * 5,6,7,8 0,6 /usr/local/bin/pellmoncli.py set burner_off 0
* 16 * 5,6,7,8 * /usr/local/bin/pellmoncli.py set burner_on 0
* 20 * 5,6,7,8 * /usr/local/bin/pellmoncli.py set burner_off 0

Or to lower the boiler temperature instead of shutting it off:

* 6 * * 2,3,4,5 /usr/local/bin/pellmoncli.py set boiler_temp_set 65
* 10 * * 2,3,4,5 /usr/local/bin/pellmoncli.py set boiler_temp_set 55
* 8 * * 0,6 /usr/local/bin/pellmoncli.py set boiler_temp_set 65
* 12 * * 0,6 /usr/local/bin/pellmoncli.py set boiler_temp_set 55
* 16 * * * /usr/local/bin/pellmoncli.py set boiler_temp_set 65
* 20 * * * /usr/local/bin/pellmoncli.py set boiler_temp_set 55

And you can specify the exact minute to run a command, eg Burner on every day at 16:30 and off at 20:15
30 16 * * * /usr/local/bin/pellmoncli.py set burner_on 0
15 20 * * * /usr/local/bin/pellmoncli.py set burner_off 0

I'll link here again: http://www.corntab.com/pages/crontab-gui, it makes it a lot easier to get the numbers in the right places.

To set a crontab run the command 'sudo crontab -e' and paste the rows at the end of the file and save it.
« Senest Redigeret: Okt 19, 2014, 10:33 af motoz »
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #17 Dato: Okt 21, 2014, 19:28 »
Hello, I finally added a config option to use your own system image.

In the [conf] section:

# Select system image. Set an absolute path to use your own.
# Choices: system.svg|system_nbe.svg|system_nbe_2w.svg|system_nbe_3w.svg|system_matene.svg|/path/to/your_own_image.svg
system_image = system.svg

There are now 5 different images installed, and you can set it to point to your own. To make your own the easiest way is to start by copying one of the defaults and edit it with eg. inkscape. You can for instance easily remove the text objects for unavailable sensor data.

Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline albert

  • Prof
  • ***
  • Indlæg: 60
  • Respekt optjent: +1/-0
    • Data fra vores pillefyr
Sv: PellMon på Raspberry
« Svar #18 Dato: Okt 22, 2014, 09:11 »
Hej Motoz

Jeg er godt tilfreds med billedet, der kommer med installationen.
Men jeg kunne godt bruge et, der er større, så det bliver nemmere at læse grader og procenter på skærmen.

Hilsen
Albert
Scotte 16 kw. Black Star S 10-16 kw. Semirens.
VVB med 3 vejs ventil. Kompressorrens. Version 6.79.
Opstart 04.01.2013.
Opvarmer 174 kvm med støtte fra brændeovn. Før brændeovnens entre et forbrug på ca. 4400 l olie pr år.
Minicomputeren Raspberry PI med Pellmon software.

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #19 Dato: Okt 23, 2014, 17:05 »
If you want the texts to be more readable on a small screen you can open the image file with inkscape https://inkscape.org/en/ and resize the texts (just click on them with the arrow tool and drag one of the corner handles)

If you want the system image to take the full width of the screen even on bigger screens then you can make small change in the html file here: /usr/local/lib/python2.7/dist-packages/Pellmonweb/html/index.html

Kode: [Vælg]
    <div class="row">
        <div class="col-md-6">
        <h4>System</h4>
            ${'<object id="systemimage" class="image-responsive" data="systemimage" data-websocket=%s type="image/svg+xml"> </object>' % ('1'$
        </div>

        <div id="lines" data-url="${webroot}/logview/getlines?linenum=7" class="col-md-6">
            <h4>Events</h4>
        </div>
    </div>

change both instances of class="col-md-6" to class="col-md-12" then the image and the eventview will take the whole width of the screen (it's a 12-column layout). I might come up with a system to set  the layout with some simple configuration options someday, but until that happens (if ever...) you can change it yourself as the code is open!
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline albert

  • Prof
  • ***
  • Indlæg: 60
  • Respekt optjent: +1/-0
    • Data fra vores pillefyr
Sv: PellMon på Raspberry
« Svar #20 Dato: Okt 24, 2014, 06:42 »
Hej Motoz

Nu er mine færdigheder med Linux desværre fortsat begrænsede.
Jeg kommunikerer indtil videre med rpi via Putty.
Kan jeg redigere html-filen med nano kommandoen? - Umiddelbart lykkes det ikke for mig at gemme filen efter ændringerne.

Hilsen
Albert
Scotte 16 kw. Black Star S 10-16 kw. Semirens.
VVB med 3 vejs ventil. Kompressorrens. Version 6.79.
Opstart 04.01.2013.
Opvarmer 174 kvm med støtte fra brændeovn. Før brændeovnens entre et forbrug på ca. 4400 l olie pr år.
Minicomputeren Raspberry PI med Pellmon software.

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #21 Dato: Okt 24, 2014, 08:19 »
Since it is installed as a system file (in /usr) you need root to edit it (sudo):
Kode: [Vælg]
sudo nano /usr/local/lib/python2.7/dist-packages/Pellmonweb/html/index.html
(Sudo executes the following command with root privileges. In most linux distributions sudo is set up to require entering a password, but the default user 'pi' in raspbian has been set up to be able to execute sudo without entering any password)

Of course you can also edit the file in your home directory, and then do the 'system install' again, but this will overwrite any changes you made in the configuration file with the defaults, so remember to take a backup first. See https://github.com/motoz/PellMon/wiki/How-to-upgrade-PellMon
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #22 Dato: Okt 24, 2014, 10:09 »
Noticed you got the layout change working!

One thing, your Silo Level graph is not showing anything. You need to set these parameters for it to work:


The level shown by the graph is calculated by PellMon according to the logged consumption, from the set 'fill up time' up until current time, counting down from the set 'fill up level'. The 'fill up time' is automatically set to current time when you change the 'fill up level' to avoid having to set both when filling up the hopper, but the time can then be changed if needed.

The idea behind the silo level graph is that it is easier to estimate how long it will last when the sinking level is plotted graphically, probably most useful with a big bulk silo.
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline albert

  • Prof
  • ***
  • Indlæg: 60
  • Respekt optjent: +1/-0
    • Data fra vores pillefyr
Sv: PellMon på Raspberry
« Svar #23 Dato: Okt 24, 2014, 12:22 »
Hej Motoz

Igen tak for hjælpen.
Jeg vil prøve at gøre systembilledet større, når jeg finder ud af at overføre filer mellem pc og rpi uden brug af usb-stick.
nordgren.dk har sent mig et link (http://winscp.net/eng/docs/lang:da) , som jeg ikke har haft tid til at undersøge endnu.

Hilsen
Albert
Scotte 16 kw. Black Star S 10-16 kw. Semirens.
VVB med 3 vejs ventil. Kompressorrens. Version 6.79.
Opstart 04.01.2013.
Opvarmer 174 kvm med støtte fra brændeovn. Før brændeovnens entre et forbrug på ca. 4400 l olie pr år.
Minicomputeren Raspberry PI med Pellmon software.

Offline albert

  • Prof
  • ***
  • Indlæg: 60
  • Respekt optjent: +1/-0
    • Data fra vores pillefyr
Sv: PellMon på Raspberry
« Svar #24 Dato: Okt 24, 2014, 17:11 »
Hello, I finally added a config option to use your own system image.

In the [conf] section:

# Select system image. Set an absolute path to use your own.
# Choices: system.svg|system_nbe.svg|system_nbe_2w.svg|system_nbe_3w.svg|system_matene.svg|/path/to/your_own_image.svg
system_image = system.svg

There are now 5 different images installed, and you can set it to point to your own. To make your own the easiest way is to start by copying one of the defaults and edit it with eg. inkscape. You can for instance easily remove the text objects for unavailable sensor data.



Jeg har vist ikke helt forstået forklaringen. Dette virker i hvert fald ikke:


# Select system image. Set an absolute path to use your own.
system_image = /home/pi/PellMon-master/src/Pellmonweb/media/img/system_albert.svg

- og system_albert.svg ligge i mappen med img.


Hilsen
Albert
Scotte 16 kw. Black Star S 10-16 kw. Semirens.
VVB med 3 vejs ventil. Kompressorrens. Version 6.79.
Opstart 04.01.2013.
Opvarmer 174 kvm med støtte fra brændeovn. Før brændeovnens entre et forbrug på ca. 4400 l olie pr år.
Minicomputeren Raspberry PI med Pellmon software.

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #25 Dato: Okt 24, 2014, 18:04 »
Did you upgrade PellMon? The feature is just three days old. Sadly I have not made any kind of version number system yet, it would be about time I got around to that  :-[ If you have the correct version you should have 5 different system_xxx.svg files in the img directory.
Kode: [Vælg]
ls /usr/local/lib/python2.7/dist-packages/Pellmonweb/media/img/*.svgshould list system_nbe.svg, system_nbe_2w.svg and so on.

And if you have the correct version, did you restart pellmonweb (or reboot) after you changed the system_image setting? The conf file is read only when pellmon starts.

If it still doesn't work you could try some of the other default images, eg:
system_image = system_nbe.svg
If that works then it looks like there is something wrong with system_albert.svg

Edit: I forgot you are online, so I can check myself from your log. Seems you have not restarted since a couple of hours before I merged the new feature to the master branch, so you need to upgrade: https://github.com/motoz/PellMon/wiki/How-to-upgrade-PellMon

To backup your config file use (copy to the current directory):
Kode: [Vælg]
cp /etc/pellmon/pellmon.conf .And after 'sudo make install' copy it back with:
Kode: [Vælg]
sudo cp pellmon.conf /etc/pellmon/
« Senest Redigeret: Okt 24, 2014, 21:16 af motoz »
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline albert

  • Prof
  • ***
  • Indlæg: 60
  • Respekt optjent: +1/-0
    • Data fra vores pillefyr
Sv: PellMon på Raspberry
« Svar #26 Dato: Okt 25, 2014, 06:32 »
Hej Motoz

Mere om systembilledet:
Min rpi var gået ned i nat. Efter opstart ser man mit opstartsbillede = 200% af det oprindelige.
Det kan bare ikke være der i højden.

Hjælper det med update?
OG skal jeg så alle linjer i system installation igennem igen.?
Scotte 16 kw. Black Star S 10-16 kw. Semirens.
VVB med 3 vejs ventil. Kompressorrens. Version 6.79.
Opstart 04.01.2013.
Opvarmer 174 kvm med støtte fra brændeovn. Før brændeovnens entre et forbrug på ca. 4400 l olie pr år.
Minicomputeren Raspberry PI med Pellmon software.

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #27 Dato: Okt 25, 2014, 08:45 »
Have you made any changes to the system.svg file (with inkscape or some other program?) Looks like you have resized the contents of the image to be bigger than the 'page size'. If you have made changes that just won't just work then a clean install / update should reset everything to a 'known state' again.

The important part from the system installation when reinstalling is this:
# Create build system
./autogen.sh
# Configure for running as system users
./configure --with-user_srv=pellmonsrv --with-user_web=pellmonweb --sysconfdir=/etc
# Build PellMon
make
# Install PellMon
sudo make install

The reset can be skipped, it won't hurt to run it all, but it will complain that eg, the system users exist already when trying to create them again and so on.
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 255
  • Respekt optjent: +18/-0
Sv: PellMon på Raspberry
« Svar #28 Dato: Okt 25, 2014, 09:30 »
Albert, you are not by any chance using internet explorer by the way? IE is still not very good at rendering svg, last I had the chance to check PellMon on IE, as I remember it rendered the system image very small. If this is the case, have you tried firefox/chrome? Since IE nowadays has at least some kind of svg support it should probably be possible to work around the IE bug, but it's hard for me to do since I don't have any computer with windows. Since everything I have tried more or less works without problems right away on firefox/chrome/safari/android/ios then I have not made any effort to add any special cases only for IE.
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline albert

  • Prof
  • ***
  • Indlæg: 60
  • Respekt optjent: +1/-0
    • Data fra vores pillefyr
Sv: PellMon på Raspberry
« Svar #29 Dato: Okt 25, 2014, 10:00 »
Hej Motoz

Jo, jeg bruger IE.
Med Crome bliver systembilledet ca dobbelt så stort - og ok også for en senior som mig.
På min lille android telefon ser jeg en legoklods i stedet for systembilledet.
Jeg vil nu eksperimentere med at forstørre systembilledet igen - denne gang lidt mindre end 200%.
Og måske også forstørre tallene hver for sig.

Jeg lavede update. Hentede zip fil, pakkede ud og fulgte dine anvisninger i indlægget ovenfor:
# Create build system
./autogen.sh
# Configure for running as system users
./configure --with-user_srv=pellmonsrv --with-user_web=pellmonweb --sysconfdir=/etc
# Build PellMon
make
# Install PellMon
sudo make install

Men
ls /usr/local/lib/python2.7/dist-packages/Pellmonweb/media/img/*.svg
giver stadig kun 2 billeder: system.svg og pellmon.svg.

Hilsen
Albert
Scotte 16 kw. Black Star S 10-16 kw. Semirens.
VVB med 3 vejs ventil. Kompressorrens. Version 6.79.
Opstart 04.01.2013.
Opvarmer 174 kvm med støtte fra brændeovn. Før brændeovnens entre et forbrug på ca. 4400 l olie pr år.
Minicomputeren Raspberry PI med Pellmon software.