Stokerforum

Interface => Interface til varme systemer => Stoker kontrol => Emne startet af: kivi efter Aug 22, 2014, 20:41

Titel: PellMon på Raspberry
Indlæg af: kivi efter Aug 22, 2014, 20:41
Blot til info.

Er der nogle der savner et alternativ til Stokerkontrol, så kan PellMon til Raspberry/Linux varmt anbefales.

Man kan tilgå den fra en hvilken som helst webbrowser og justere næsten alle parametrer i styringen.

Følger man Motoz vejledning, er det nemt at installere også uden Linux erfaring (hvilket jeg ikke har)

Se mere her, https://github.com/motoz/PellMon/wiki
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Okt 17, 2014, 12:52
Hej Ole

Har du mulighed for på nogle få linjer at beskrive, hvordan jeg installerer PellMon på Raspberry.

Mit kendskab til Linux begrænser sig til det, der har været nødvendigt for at få Stokerkontrol til at køre på Raspberry.
- Denne installationsproces har jeg så til gengæld prøvet nogle gange!

Jeg er blevet træt af, at Stokerkontrol går ned hele tiden.
Og jeg er blevet træt af at vente på, at Jens får tid til at lave en opdatering af Stokerkontrol til Raspberry - har så også ventet et år nu.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 17, 2014, 13:48
Hello Albert.
The installation instructions Ole refers to are in the PellMon wiki at https://github.com/motoz/PellMon/wiki/How%20to%20install%20PellMon
You can get it installed by copy/pasting the commands one by one. If you don't mind me answering in English I'm happy to assist in case you have questions.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Okt 17, 2014, 13:51
Hej Albert

Jeg må også indrømme at min Linux viden er begrænset.

Men jeg fulgte bare Motoz installations vejledning slavisk, den ligger her:

https://github.com/motoz/PellMon/wiki

Jeg kan også se at Motoz har lavet et installations script som du kan hente her:

https://github.com/motoz/InstallPellMon

Så skulle det køre af sig selv, jeg har dog ikke prøvet det.

Håber svaret kan bruges.

Min Raspberry har til info kørt upåklageligt uden genstart i over 2 måneder
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 17, 2014, 17:16
I opened access to my logger at http://pellmon.dhcp.io/pellmon/ with username: stoker password: forum so you can check it out (apart from parameter access which needs another login...)

Edit:
Well... as you who were watching my logger noticed my light sensor broke 30 minutes after I posted this. I've been meaning to order some spares for quite a while and now I realize I haven't done that yet. Silly.  :(



Titel: Sv: PellMon på Raspberry
Indlæg af: nordgren.dk efter Okt 17, 2014, 19:53
Hej motoz.
Min kammerat mener at der er et sted man kan melde sig ind og derved få adgang til sine data fra denne konf.
Jeg mener at hvis han vil kunne se og konfigurere sin rasp. er der kun en vej, og det er at åbne for port 8081 i hans router.

Hvem af os har ret ???

OBS Vi er lige stædige :)

Jeg er sikker på, at vi er mange der ville blive meget glade. Hvis tidsstyringen i PellMon, blev ændret så det kom til at ligne den sidste ændring til styring 7 & 10. Med uge ur og 1 times intervaller.

Titel: Sv: PellMon på Raspberry
Indlæg af: nordgren.dk efter Okt 18, 2014, 08:24
Hej Ole

Har du mulighed for på nogle få linjer at beskrive, hvordan jeg installerer PellMon på Raspberry.

Mit kendskab til Linux begrænser sig til det, der har været nødvendigt for at få Stokerkontrol til at køre på Raspberry.
- Denne installationsproces har jeg så til gengæld prøvet nogle gange!

Jeg er blevet træt af, at Stokerkontrol går ned hele tiden.
Og jeg er blevet træt af at vente på, at Jens får tid til at lave en opdatering af Stokerkontrol til Raspberry - har så også ventet et år nu.

Hilsen
Albert

Hej Albert.

Har lavet et image af min PellMon installation. Så du kan få en kopi. Så skal du kun rette bruger navn & password.

Der er også mulighed for at få en mail ved alarm, fra PellMon. Hvilket jeg ikke har fået til at virke. Men det kommer sikkert.

Hvis du vil tilgå PellMon udefra, skal der åbnes for port 8081 i din router. Hvilket jeg har fået til at fungere.

En sidste ting, er at det er en fordel at sætte Raspberry op til at benytte fast ip. Så der ikke skal ændres i Router ved strømsvigt.

Har kun testet systemet på "kontoret" hvor jeg har en ekstra 6 styring. Der ikke er monteret. Her fungerer det perfekt med at hente, se og redigere i styringen.

Hvis du har mod på at prøve. Kan jeg give dig adgang til mit Google drev. Og ligge image op til deling. Det et image fra et 4 GB sd kort.


Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Okt 18, 2014, 08:47
Hej Klaus

Jeg vil meget gerne prøve med dit image.

Har prøvet at installere med script og manuelt og får error ved begge metoder.

Jeg har jo så også brug for en forklaring på, hvordan jeg skifter navn og password.

Jeg har erfaring med at sætte op til en fast ip.

Du kan jo evt. sende oplysninger om dit Google drev på en mail - adressen er på min profil.

Hilsen og tak
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 18, 2014, 09:20
If you could copy the errors you get and paste them here I'm sure we can get it sorted out. (And it would also help me to improve the instructions)

I verified that the installation instructions work on a clean raspbian installation not long ago without doing anything but copy/pasting the instructions, so it's probably something simple.

Nice that you got it working nordgren!

Titel: Sv: PellMon på Raspberry
Indlæg af: nordgren.dk efter Okt 18, 2014, 11:53
Hi Motoz

The installation vent smooth. And all my old USB port connectors works to. This was a big issue with StokerCloud on the Raspberry.   

I having some problem with making the email alarm working. My provider is one.com. In the log its sayes "2014-10-18 12:33:08,194 - INFO - error trying to send email" PLS help

Have about making the time setting like the new 10.512. have you seen it ?
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Okt 18, 2014, 13:33
Hej Nordgren

Jeg havde problemer med en Gmail konto, indtil jeg gav Google/Gmail "lov" til at benytte mindre sikre apps til mail. (ikke at jeg aner hvad det betyder :-)

Måske din mail udbyder også har nogle begrænsninger på.

Mvh
Ole
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 18, 2014, 15:13
Hello Nordgren,

I see you have changed the mail port to 25, that might mean that your mail provider uses SSL instead of TLS (which gmail, and pellmon uses).

Sending an email using SSL should be just as easy, so if you like to try editing one file we could test it right away.

The file is /usr/local/bin/pellmonsrv.py (open with eg nano as root, sudo nano /usr/local/bin/pellmonsrv.py)

Locate this line in the beginning of the file:
from smtplib import SMTP

change it to :
from smtplib import SMTP_SSL as SMTP

and then on row 345  (in function sendmail_thread) locate this:
        mailserver = SMTP(conf.emailserver)
        mailserver.starttls()
        mailserver.login(conf.emailusername, conf.emailpassword)
        mailserver.sendmail(msgRoot['From'], msgRoot['To'], msgRoot.as_string())
        mailserver.quit()

you need to remove the mailserver.starttls() call by adding a comment mark:
        mailserver = SMTP(conf.emailserver)
        #mailserver.starttls()
        mailserver.login(conf.emailusername, conf.emailpassword)
        mailserver.sendmail(msgRoot['From'], msgRoot['To'], msgRoot.as_string())
        mailserver.quit()

Then restart pellmonsrv with:
sudo service pellmonsrv restart

Then it might work, if SSL instead of TLS was the problem... In that case I'll add a setting the the config file so both are supported.

(Gmail has started to more and more move away from standard mail protocols, favouring web access and their own mail apps, so the setting to enable 'less secure apps' probably means 'allow access using standard protocols instead of only our own secret stuff)

What about the time setting? Have never seen a V10 in real life...

Titel: Sv: PellMon på Raspberry
Indlæg af: nordgren.dk efter Okt 18, 2014, 15:39
Hi Motoz
I give it shot. Changing the mail in some dayes, and I get back to you  :-)

Here the step in StokerCloud when I control the start/stop periode in my new 10.512


Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Okt 18, 2014, 16:15
Hi Motoz

Im trying to make an alarm, which should alarm me of low magazine content, but Im a bit unsure of how to do it, would you please help me.

I have made the following in Pellmon.conf

alarm2_item = magazine_content
alarm2_comparator = <
alarm2_level = 10
alarm2_status =
alarm2_enum =

I cant figure out what I should type in line 4 and 5.

Mvh Ole
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 18, 2014, 16:38
Kivi:

The documentation says:[plugin_CustomAlarms]
# Define an alarm by creating four parameters:
# xxx_item = item to read
# xxx_comparator = >|>=|<|<=|==|!=
# xxx_level = level to compare against
# xxx_status = item to hold the result of the comparision, 1=True, 0=False
# optional:
# xxx_enum = FalseText|TrueText

xxx_status defines the name of a new parameter to create, to hold the result of the comparision. That means it could be named anything (as long as it doesn't confilict with any existing parameter, and it might be a bit picky about some special characters)

The xxx_enum is optional, it is used to display a text when reading the status parameter instead of 0/1.

Like this:
alarm1_item = magazine_content
alarm1_comparator = <
alarm1_level = 30
alarm1_status = magazine_supv
alarm1_enum = OK|Pellet magazine low

Then you get a new parameter named 'magazine_supv' which reads 'OK' or 'Pellet magazine low', and also an email when it changes state if you have enabled email for alarms.

Nordgren:

I have thought about adding some kind of task scheduler to pellmon, but I don't really have any use for it myself so it hasn't been done. PellMon however has a command line interface meaning that you can use any task scheduler to change any parameter. Every unix since the dawn of time has come with the cron task scheduler which can be used to run commands on specified days, hours, minutes and so on. It's not very easy to use, but there are visual helper programs like eg. http://www.corntab.com/pages/crontab-gui. To turn on the burner use the command '/usr/local/bin/pellmoncli.py set burner_on 0' and to turn it off '/usr/local/bin/pellmoncli.py set burner_off 0'. Open your 'crontab' with 'sudo crontab -e' and paste the line there and you should be set.

Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Okt 18, 2014, 16:46
Thank you Motoz, ill try that out.

Mvh
Ole
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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.

(http://s30.postimg.org/xcwenq7gd/system_nbe.jpg) (http://postimg.org/image/xcwenq7gd/)
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter 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
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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!
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter 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
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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:
(http://s16.postimg.org/qcyjw39sx/silolevel.jpg) (http://postimg.org/image/qcyjw39sx/)

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.
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter 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
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter 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.

(http://s30.postimg.org/xcwenq7gd/system_nbe.jpg) (http://postimg.org/image/xcwenq7gd/)

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
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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/
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter 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.?
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter 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.
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter 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
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 25, 2014, 10:35
That is strange... I just double-checked, it really does install all 5 svg files here.

Do you have the new svg files in your home directory where you unzipped it?

Did you unzip on top of the old files? That could maybe possible be the problem. The 'configure' step creates the makefiles that handles the installation step, if they are already there but too old I think they should be rebuild, but if not then you have the old makefiles which doesn't install the new svg files.

I did some googling, apparently IE still handles especially resizable svg images quite differently than the rest, but it could possibly be worked around. Android 2.x does not support svg at all as it seems, so sadly nothing to do there.
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Okt 25, 2014, 10:50
Hej Motoz

Did you unzip on top of the old files? -- Ja jeg foretog ingen ændringer.

Men det er også ligemeget. Det fungerer alligevel.
Så jeg stopper for denne gang.

Tak for et program, der kører og viser, hvad der foregår med mit pillefyr.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 25, 2014, 12:02
Suddenly a lightbulb went off in my head.

The 'how to upgrade' instructions don't say how to download the new version so you most probably do that the same way as in the detailed install instructions.

Then you also most probably already have the old master.zip file in place when you run the 'wget' command to retrieve a new version. The thing is that wget will kindly NOT overwrite any file that you happen to already have, so it will instead download the new version  to master.zip.1, or if that also exists master.zip.2 and so on.

So by following the instructions you then unzip the old version again, instead of the new one.  I'll fix the upgrade instructions to be clearer.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Okt 25, 2014, 12:14
Ja jeg lavede den fejl nogle gange før jeg opdagede det ;)

Har du haft tid til at kigge på timer funktionen, altså at kunne indstille klokkeslet.

Ellers stor tak for et godt stykke software, der bare kører.

Mvh
Ole
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 25, 2014, 13:02
No, not yet.. maybe when it starts snowing I'll find more time for indoor activities. I'll close the issue when it's fixed, and you can also follow the commit list to see whats happening (even if the comments are a bit short). Nice to hear you find it useful!
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 26, 2014, 18:14
I believe I found a workaround for the internet explorer bug which caused the system image to be too small to see (and the logo didn't display either). Should be fixed in latest master.
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Okt 27, 2014, 09:03
Hej Motoz

Tak.
Det virker med mit IE.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 27, 2014, 09:17
Great! Hope it didn't break anything else then (and hopefully microsoft get their act together someday so these kind of IE specific workaounds could finally be a thing of the past)

Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Okt 27, 2014, 09:34
Hej Motoz

Jeg er glad for at kunne bruge dit setup som erstatning for Stokerkontrol.
Jeg bliver jo hele tiden klogere på, hvordan det virker.
Mit næste ønske er, at adressen på min router ikke fremgår, når andre skal ser mit Pellmon på Stokerforum.
Jeg har fundet frem til, at frameset kan være løsningen og også forsøgt med en html-fil

http://www.hoganet.dk/scotte/pellmon_frame.html

<html>
<frameset rows="100%">
  <frame src="http://31.185.72.77:8081">
</frameset>
</html>

Så vises adressen på html-filen fra vores domæne.
MEN Pellmon vil ikke ændre på visningen af grafen. F.eks. ikke skifte fra 1 time til 3 timer.

Det er på ingen måde noget, der haster!

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 27, 2014, 10:53
The pellmon_frame.html works fine here (including shifting 1 to 3 hours), but the ip is not hidden (it's not in plain view in the url bar any more, but every link still goes directly to your ip:8081). You can't both give access to your pellmon server and also hide it. If you can view a website then you also have it's public address.

If you have access to a server somewhere else and can set it up as a reverse proxy to your pellmon server, then that other server will be the visible part. I have that setup myself, with apache2 as the the public server, proxying access to pellmon on my raspberry on an internal ip. There is a piece on how to set up the reverse proxy on the wiki. But you won't get that kind of access from a typical web hotel.

PellMon doesn't really fit the use case of 'giving everyone access to my data' without also exposing your own network to the internet in some way. As for the security of exposing your ip, that is really up to you. I have honestly made pellmon as secure as I am possibly able to, but I am not willing to give any guarantees. "If it breaks you get to keep both pieces" and so on...  There ARE some risks involved when having a possible way for an intruder to change your burner settings, but those risks are still there when using stokercloud in my opinion. Not that I consider stokercloud insecure, but when the connection is made there is an open channel and the rest is up to the security over at stokercloud. I guess the main  difference is that stokercloud is a business and likely takes security very very seriously but you have to trust them completely,  pellmon is made by 'some guy on the internet' but is completely open so you can check everything yourself.

There are some missing parts in pellmon security, mainly that you can't easily use an encrypted transport (https), meaning that your login password is transmitted in plain text. This does not affect security at all if you only ever log on locally, and you can also fix it by reverse proxying through apache and adding encryption there (looks like stokercloud allows but does not enforce https on login so you mostly have the same situation there). Someday I will add support for https transport to pellmon directly, the server module (cherrypy) supports it so it mainly requires gathering all the pieces and working out how to deal with the certificate handling mess.
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Okt 27, 2014, 11:36
Hej Motoz

Jeg kan godt se, at det virker her også - i Crome.
Så det bliver løsningen indtil videre.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Nov 03, 2014, 12:58
Hello Kivi, I closed issue 49 https://github.com/motoz/PellMon/issues/49. All timers and current time are now in the format hh;mm instead of minutes since midnight.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Nov 03, 2014, 14:46
Hej Motoz

Det er bare SUPER  :)

Det virker perfekt, tak for det.

Mvh
Ole
Titel: Sv: PellMon på Raspberry
Indlæg af: nordgren.dk efter Nov 03, 2014, 18:16
Hej Ole. Kunne jeg lokke dig til åbne, så vi andre kan se hvad du får af data fra PellMon. Et link til din httt udefra. Eller hvis du uploader det på en hjemmeside. Vh. Klaus
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Nov 03, 2014, 19:17
Ja det vil jeg prøve, skal lige finde ud af min router, mon ikke det er noget med portforwarding der skal til.

Ole
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Nov 03, 2014, 19:30
Just make sure  you have changed the pellmon username  and password first!

Nordgren, I just pushed a version with an SSL email option if  you want to check it out.
Titel: Sv: PellMon på Raspberry
Indlæg af: nordgren.dk efter Nov 03, 2014, 20:01
Du skal have åbnet for adgang gennem din router. Du har vel også selv brug for at kunne fjernaflæse dit fyr. Går ud fra, at du har sat alarm med email. Ved fejloptændning m.v.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Nov 03, 2014, 20:03
Virker det ikke?

Har prøvet via min tlf. der virker det.
Titel: Sv: PellMon på Raspberry
Indlæg af: nordgren.dk efter Nov 03, 2014, 20:25
Hej Ole. Det kører perfekt, tak for det. Årsag, har selv roddet med raspberry pi og StokerCloud. Uden noget godt resultat. Andet end at jeg har investeret i en V.10 styring. Har dog stadig 3 raspberry pi og en bunke usb adapterer liggende. Som jeg har besluttet skal komme til ære og værdighed med PellMon, hos et par gode kammerater. Har kun testet PellMon på en v.6 styring som ikke er tilsluttet et fyr. Hvorfor det hjælper på, at se det kører hos dig. Hvordan med tidsstyring i PellMon. har du gennemskuet det, eller tager du den lange vej ud til styringen. når det skal ændres. Vh. Klaus
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Nov 03, 2014, 20:31
Glad for at kunne hjælpe.

Ja som du sikkert ved prøvede jeg også stokerkontrol først uden held.

Men Pellmon virker bare og kører stabilt.

Motoz har lige i dag lavet en opdatering så tidsstyring nu foregår med klokkeslet i stedet for minutter, så nu er alt perfekt :)

Mvh
Ole
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Nov 04, 2014, 08:43
Hej Klaus

For mig kører Pellmon også - en stor lettelse i forhold til Stokerkontrol på RaspberryPI.
Data og grafer er også online - se link nedenfor.

Jeg har en RaspberryPI mere, som kører som et alternativ til airplay og spiller musik på vores anlæg streamet fra pc-er. På RaspberryPI hedder programmet Shareport.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 02, 2014, 10:18
Hello PellMon users! PellMon now draws all graphs in the browser instead of drawing server side and downloading bitmap images. This means that it is much faster (less data to download) and puts even less strain on the raspberry cpu. It also enables fancy zooming/panning in the graph and tooltips on the curves (ie. shows numerical point data in a small popup when hovering on a curve)
(http://s3.postimg.org/ghhzo0b5b/pellmon.jpg) (http://postimg.org/image/ghhzo0b5b/)

The silo level plugin now also provides a numerical value for the remaining level 'silo_level', which has replaced the burner calculated parameter 'magazine_content' in the default system images to avoid having to set two different parameters every time filling up the silo.
(http://s29.postimg.org/tjk9wjf8z/silolevel.jpg) (http://postimg.org/image/tjk9wjf8z/)
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Dec 02, 2014, 10:30
Hej Motoz
Jeg får lavet opdatering en af dagene for at se forbedringerne.

Jeg har et lille irritationsmoment: Styringens ur taber godt 1 minut om dagen. Det gjorde den ikke tidligere. Jeg kan sagtens leve med det. Men det ville da være sjovt, hvis man kunne vænne den af med det. Tiden i RaspberryPi er ok. Så måske kunne man lave et crontabjob, der fik det justeret f.eks. en gang i døgnet.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 02, 2014, 11:07
Good idea!
Something like this seems to work in crontab:
Kode: [Vælg]
* * * * * date +\%H\;\%M|xargs /usr/local/bin/pellmoncli.py set time_minutes
This runs every minute, but I think might be better that way since then it wont make any big jumps.


Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 02, 2014, 11:10
Uh, apart from the small issue that it writes a line to the log every minute, it works fine...
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 02, 2014, 15:05
Hej Motoz

Jeg har opdateret mit Pellmon og må sige det ser godt ud, men jeg har et problem med magasin indhold.

Hvis jeg går på Pellmon fra min Macbook, kommer der ingen tal i siloen men, hvis jeg benytter min iPad så kommer der tal.

Der kommer heller ingen "Silo level" graf mere, hverken på computer eller iPad.

Se evt. vedlagte billeder.


Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 02, 2014, 15:57
The iPad probably still uses a cached version of the old system.svg (which has 'magazine_content' instead of the new 'silo_level' parameter), you need to do a 'ctrl-F5' refresh equivalent thing to reload all cached images, but I have no idea how to do that on an ipad.

But silo_level is not working obviously, do you have the 'silo fill up level' and 'silo fill up time' parameters set?

Everything else works fine then?

Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 02, 2014, 16:05
Ja det virker til at alt andet virker fint.

Jeg har prøvet at ændre silo fill up level uden der sker noget, den retter heller ikke selv silo fill up time, det skal gøres manuelt.

Jeg prøver lige at nulstille safari på iPad og ser om det hjælper.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 02, 2014, 16:09
Ja nu forsvandt magasin indhold også fra iPaden og den skriver error kg i silo level.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 02, 2014, 16:18
Found it (or at least one problem). Latest master should (hopefully) work. I didn't test everything as thoroughly as I thought, as usually happens...

Thanks for testing!
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 02, 2014, 16:46
No problem
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 02, 2014, 19:28
Ja hvad blev der lige af resten af mit forrige indlæg ?  :)

Nå men nu har jeg installeret seneste master, men stadig ingen tal i silo.

Er der noget jeg gør forkert?

Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 02, 2014, 20:07
Nu fik jeg så tastet noget ind i silo fill up level, det hjalp vist  ::)

Så må vi se om den også opdaterer.

Thanks Motoz
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 03, 2014, 09:55
Det ser ud til at køre fint nu
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Dec 04, 2014, 05:38
Uh, apart from the small issue that it writes a line to the log every minute, it works fine...

Hej Motoz
Jeg prøver med en gang i døgnet.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 05, 2014, 08:46
I was experimenting a bit with the silo level plugin, trying to make it more intelligent. For instance to get a prediction for how long it will last:
(http://s23.postimg.org/lp5h9poev/silolevelprediction.jpg) (http://postimg.org/image/lp5h9poev/)
This works for now by replaying last years consumption starting with today's remaining level until the level is zero. Obviously this method works only when there is data for at least one year back, and even if it probably gives the best possible estimate for a big silo lasting several months it could be way off in the short term. For a smaller week-silo I guess last weeks consumption gives the best estimate for the next week, but I suppose the silo level graph is not that useful anyway in that case. Maybe the estimate could be based on some near term consumption with preset scaling factors for each month until there is real data from last year, and of course weather forecast data could be useful in the near term also but that might be total overkill...

What do you think, what would give the best estimate or is this worth doing at all?
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 05, 2014, 15:04
Det er ikke umiddelbart en funktion jeg savner, men jeg har jo også kun en 300 L silo.

Men i forhold til sidste opdatering, har jeg et problem med magasin indhold.

Når jeg opdaterer "silo fill up level" så opdateres magasin indhold i styringen ikke, jeg skal så indstille det en gang til i "magazine content"

Jeg skal altså stadig indtaste to forskellige steder.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 05, 2014, 15:25
That is not something new, the 'silo_reset_level' parameter belongs to the silo level plugin and is used with 'silo_reset_time' to calculate 'silo_level', and to plot the graph. 'magazine_content' belongs to the 'scottecom' plugin, and its value comes from the corresponding data in the burner control box.

Previously the silo level plugin didn't provide any numerical value for the remaining level, it only plotted the graph, so the only place to get a value to put on the system image was to read from 'magazine_content'. Now that there is a 'silo_level' parameter calculated by the silo_level plugin I replaced 'magazine_content' in the default system image with this 'silo_level' (which you can change back if you like), but that doesn't mean 'magazine_content' is automatically set, it just mean that you can ignore it if you want to.

(Or you could use the 'calculate' plugin to make a small script to automatically set magazine_content with the value from  silo_reset_level whenever silo_reset_time changes, everything is possible...)
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 05, 2014, 15:35
Ja det sidste lyder nok som en løsning, så må jeg se at få lært mig lidt mere om Linux  ;)
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 05, 2014, 20:52
I meant using the 'calculate' plugin in PellMon (nothing linux specific about that). One way to do it is like this:

Enable the calculate plugin (in the configuration file):

# The calculate plugin lets you calculate your own data from existing data items
p04 = Calculate

and add this small script:

calc1_prog = if silo_level get magazine_content get != then silo_level get magazine_content set
calc1_taskcycle = 10

then magazine_content will be written with the value from silo_level whenever they are different.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 06, 2014, 09:55
The last 'solution' causes lots of noise in the log since it will set 'magazine_content' every now and then whenever silo_level and magazine_content is not exactly the same.

This is much better:

Kode: [Vælg]
# The calculate plugin lets you calculate your own data from existing data items
p04 = Calculate
Kode: [Vælg]
calc1_prog = 0 oldlevel gdef if silo_reset_level get oldlevel grcl != then silo_reset_level get magazine_content set end silo_reset_level get oldlevel gsto
calc1_taskcycle = 10

This script checks if the 'silo_reset_level' changes, and only then it writes the value of 'silo_reset_level' to 'magazine_content', so there won't be any extra noise in the log.

Or maybe this is still better, whenever 'magazine_content' is increased, it's new value is copied to 'silo_reset_level'. Then it can be set with the control box keypad and the silo level graph will follow automatically:
Kode: [Vælg]
calc1_prog = 0 oldlevel gdef if magazine_content get oldlevel grcl > then magazine_content get silo_reset_level set end magazine_content get oldlevel gsto
calc1_taskcycle = 10

Anyway, I just wanted to show off some of the scripting capabilities of PellMon. By using these small scripts mostly anything can be automated in some way or another. Keep in mind you have full access to 26 general purpose inputs/outputs on the raspberry and potentially unlimited number of onwire temperature sensors.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 06, 2014, 14:02
Tusind tak Motoz for at du gider bruge din tid på en it novice  :)

Jeg skal lige være helt sikker, disse scripts skal ind i Pellmon.conf filen eller hvordan?
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 06, 2014, 15:12
Yep. Make sure they are in the correct section, like this:

...

Kode: [Vælg]
[enabled_plugins]
p04 = Calculate

...

Kode: [Vælg]
[plugin_Calculate]
calc1_prog = 0 oldlevel gdef if magazine_content get oldlevel grcl > then magazine_content get silo_reset_level set end magazine_content get oldlevel gsto
calc1_taskcycle = 10

...
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 07, 2014, 17:59
It's always the details... The script above to set 'silo_reset_level' whenever 'magazine_content' is increased has a bug. It will copy magazine_content to silo_reset_level every time PellMon starts. The initial value for the variable 'oldlevel' should be a big value so will always be bigger than magazine_content the first time the script runs:

Kode: [Vælg]
[enabled_plugins]
p04 = Calculate
[plugin_Calculate]
calc1_prog = 50000 oldlevel gdef if magazine_content get oldlevel grcl > then magazine_content get silo_reset_level set end magazine_content get oldlevel gsto
calc1_taskcycle = 10
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Dec 08, 2014, 06:16
Hej Motoz
I går fik jeg opdateret Pellmon.
Det virker og går lidt stærkere end før.
Jeg har et lille problem med ie (igen). Vil jeg skifte fra visning af 1 time i graferne til f.eks. 3 timer, må jeg opdatere visningen, f.eks. med F5.
Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 08, 2014, 06:43
Okay... once again every browser works except IE. It's probably this: http://www.dashbay.com/2011/05/internet-explorer-caches-ajax/. Seems easy to fix, eg. http://stackoverflow.com/questions/4303829/how-to-prevent-a-jquery-ajax-request-from-caching-in-internet-explorer

I'll make an update later, thanks for reporting.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 08, 2014, 17:49
Should be fixed now.
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Dec 09, 2014, 06:30
Hej Motoz

Mange tak. Det fungerer også med IE nu.

Hilsen
Albert

Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 09, 2014, 14:16
Hi Motoz

Jeg prøvede dette script men det giver en fejl; Plugin Calculate Init Failed, hvad kan jeg have gjort galt?

Kode: [Vælg]
[enabled_plugins]
p04 = Calculate
[plugin_Calculate]
calc1_prog = 50000 oldlevel gdef if magazine_content get oldlevel grcl > then magazine_content get silo_reset_level set end magazine_content get oldlevel gsto
calc1_taskcycle = 10

(http://s21.postimg.org/kunj1dvmr/Fejl.jpg) (http://postimg.org/image/kunj1dvmr/)
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 09, 2014, 15:33
Og så lige et andet problem.

Jeg har lagt returtemp ind i min graf, slettet rrd.db filen som beskrevet og nu er al min historik forsvundet, er der noget jeg har misforstået?
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 09, 2014, 15:49
That script as copied from your post works fine for me, there must be something else in your config file that's causing trouble. Could you PM me the complete contents of the config? (without pellmon & email passwords of course).

Regarding the history. The rrd.db file is where all history is saved (except the event log, that's a separate text file), so when you delete it all history is lost. It is possible to add a new datasource name to an existing rrd database, the pellmon wiki has a text on that topic, but it's not that easy. I suppose there should be a warning in the config file that deleting the file removes all history.

Btw, it's a good idea to backup the rrd.db file every now and then to avoid losing all history if the sd-card fails.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 09, 2014, 15:55
Det vil sige at jeg altid vil miste historikken, hvis jeg vil ændre i graferne, eller gør jeg noget forkert?

Jeg sender min config fil til dig, hvis du vil være så venlig at kigge på den.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 09, 2014, 16:15
You have your 'Calculate' script definition in the middle of the [enabled_plugins] section.  The config you have causes the  [enabled_plugins] section to end where your [plugin_Calculate] starts, and then the line 'p06 = SiloLevel' belongs the [plugin_Calculate] instead of [enabled_plugins], which it can't make any sense of so it fails.

You need to move it out, there is already a [plugin_Calculate] section a bit further where you can put your script, which also has some example scripts and and documentation for the 'script language'.

No, you only lose history if you for any reason lose the database file. PellMon will never delete it, but sadly it's not that easy to add new 'columns' to an RRD database, so the easiest way is to delete it and let PellMon create a new one with the new definition. As I said there are ways (look in the wiki) to add new 'ds-names' without deleting it, and you can also add a bunch of 'for future use' ds-names which can be taken into use later if needed, when creating the RRD.

And further, I see you still have the same number of ds-names in your RRD file as in default since you have removed these two:
d05 = oxygen_desired
d06 = oxygen
and replaced with these:
d05 = hotwater_temp
d06 = boiler_return_temp

As explained in the comment the ds_names does not matter at all, you could have left them at their default and just 'repurposed' them for use with hotwater temp and return temp, since you have no use for the oxygen readings. The connection between the RRD ds_names and the real data to put in them are made in the following [Pollvalues] section. (I know it's quite a lot to get a grip of, I think I have to break up the configuration file in smaller pieces sometime)

To remove something from the graph, just remove it from the [graphcolors] section then it won't show up.
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 09, 2014, 16:38
Tusind tak nu virker det. Det er ikke sådan når man ikke læser det der står  ::) ::)

Jeg skal lige være sikker på jeg forstår det rigtigt.

Hvis jeg vil erstatte grafen ilt med f.eks. retur temp, så skal jeg bare rette det i pollvalues og behøver ikke slette rrd.db, er det korrekt.

Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 09, 2014, 17:03


Hvis jeg vil erstatte grafen ilt med f.eks. retur temp, så skal jeg bare rette det i pollvalues og behøver ikke slette rrd.db, er det korrekt.



Ja det virker har jeg lige konstateret og jeg havde heldigvis en kopi af rrd.db så nu kører alt vist som det skal  ;D
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 09, 2014, 18:50
Great!
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 13, 2014, 13:49
Hej Albert

Fik du dette til at virke og i så fald, hvor skal html filen gemmes henne.


Mit næste ønske er, at adressen på min router ikke fremgår, når andre skal ser mit Pellmon på Stokerforum.
Jeg har fundet frem til, at frameset kan være løsningen og også forsøgt med en html-fil

http://www.hoganet.dk/scotte/pellmon_frame.html

<html>
<frameset rows="100%">
  <frame src="http://31.185.72.77:8081">
</frameset>
</html>

Så vises adressen på html-filen fra vores domæne.
MEN Pellmon vil ikke ændre på visningen af grafen. F.eks. ikke skifte fra 1 time til 3 timer.

Det er på ingen måde noget, der haster!

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: albert efter Dec 13, 2014, 16:32
Hej Ole

Jo, det virker.
MEN hvis man i browservinduet i IE vælger "Vis Kilde", vil man stadig kunne se ip på min router.

Hilsen
Albert
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Dec 13, 2014, 16:42
Det var nu også mest for ikke at skulle "reklamere" med ip adressen f.eks. her i forummet.

Men jeg kommer til at tænke på at det vel også kræver sit eget domæne, hvilket jeg ikke har.
Titel: Sv: PellMon på Raspberry
Indlæg af: Clausj efter Dec 28, 2014, 22:41
Hi Motoz,

I am working on converting my PLC controlled Woody burner to be controlled by my Raspberry pi running Pellmon.
I would like to include the functionality currently handled by my PLC, like when to check the temperature of the hot Water, timer settings...
To do this, I guess I need to create a new plugin (or use the Testplugin) containing scripts with my extra functionality.

I have been searching the internet and watching a lot of toturials regarding Phyton programming, and also the wiki on Github, but I am not quite sure how to get started on this.
Could you give me an advice on how to get started?

Thank you in advance.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Dec 29, 2014, 07:17
Hello Clausj,

There are several ways to extend the functionality of PellMon.
1. Use the build in 'Calculate' plugin. A 'Calculate' script can read/write all parameters and can be set up to execute cyclically.
2. Call the command line utility pellmoncli from a shell script or cron job (or mostly any other language). Pellmoncli can read/write all parameters.
3. Use the DBUS interface. With the DBUS interface you can read and write all parameters and also listen for changes.
4. The web 'api' is not that well thought out for 'external' use but you can eg. read parameter values in json from eg. http://pellmonIP:8081/getparamlist/mode,version,boiler_temp
5. Make a new plugin. The plugin interface gives you access to everything without modifying PellMon code, but the plugin could possibly brake with future versions of PellMon if things you depend on are changed.
6. Modify PellMon directly to do what you want. No limits but upgrading can be lots of work.

Which way is most suitable depends very much on what you want to do. #1 is quick and easy for very simple stuff. #2 is a good way if you are familiar with another language. #3 could be a good way if you happen to know your way around DBUS already. #4 is very limited and likely to change in future versions.

If you end up writing a new plugin, you should start by setting up some kind of development environment, meaning you should be able to run your code without first installing it, and also run it in the foreground (not in daemon mode) so you can see error messages.  You can get by with doing everything on a raspberry over putty, but it's much easier to develop on a linux pc (or a virtual pc with linux). Have you tried running pellmon directly from the source checkout without installing it? The wiki text 'contributing to pellmon' covers some use cases. Basically when you have a new plugin you activate it in the config file and start pellmonsrv in debug mode to be able to see error messages. The most simple way to debug is to add lots of 'print' statements to your code and watch the output.

Titel: Sv: PellMon på Raspberry
Indlæg af: Clausj efter Dec 29, 2014, 09:47
Hi Motoz,

Thank you for your reply.

I think i will go for the Command line or DBUS solution.
I don't have knowledge about DBUS, but I will do some reading to see if that could be the best solution.

I thought the new plugin was the way to go, but as you say it could cause problems when upgrading Pellmon.

I will do some more investigation and possibly give an update in the forum, when I start to get some Progress on my project.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Mar 04, 2015, 09:01
The 'develop' branch of PellMon now has a completely configurable frontpage where every element (widget) can be freely placed or removed. For instance this config creates a frontpage matching the old hardcoded one:

Kode: [Vælg]
# Select which widgets are displayed on the frontpage
[frontpage_widgets]
row_1 = systemimage,events
row_2 = graph
row_3 = consumption24h,silolevel

Some 'widgets' are build in (systemimage, events, graph) and some are supplied by plugins (silolevel, consumption24h, consumption7d, consumption8w, consumption1y). Since plugins now can supply new 'widgets' the door is open for new and interesting plugins, like for instance solar panel energy monitoring or electricity monitoring. Could be a while before this ends up in 'master', but please go ahead and try the develop version if you are interested.
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Apr 06, 2015, 15:58
Så fik jeg sgisme også klasket en RPi på fyret, efter længe at have ville skifte styringen ud med en nyere, for netop at have muligheden for bla at kunne lave en bedre styring i overgangen mellem sommer og vinter, og få en alarm hvis skidtet af en eller anden årsag skulle dø ud. Jeg er ovenud imponeret over hvad man kan udrette, men det kræver en lille smule nørden i fyrrummet og ved computeren, for at tweake til de man (måske) ønsker - men mulighederne er der! Jeg har den tudse gamle styring med 4 LED segmenter (tror den hedder v1), med en 4.99F chip i, og det hele spillede med det samme, helt uden hokus-pokus.  O0

Jeg er sikker på at der kommer en masse spørgsmål hen ad vejen fra min side, da jeg bestemt er novice inden for Linux, men må så også sige, at jeg er imponeret over den support Motoz giver her på siden, og den hjælp andre brugere herinde giver, for at vi sammen kan få en logger der kan tilpasses os alle  ;D

Til dem der tøver - sæt i gang! Det er slet ikke så svært, og der er masser af hjælp at hente med opsætningen. En RPi, en USB til RS232, og så er man stort set i gang  ;)

/Kristian
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Apr 09, 2015, 08:47
Great, I'm glad you find it useful! You are the first PellMon user with a 4.x box that I know of so it's nice to know that it works as intended. Just ask if there is anything.
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Apr 16, 2015, 14:23
Great, I'm glad you find it useful! You are the first PellMon user with a 4.x box that I know of so it's nice to know that it works as intended. Just ask if there is anything.

Hi Motoz!

I am really happy with the solution, and it is nice and easy to setup :-)

My box was not prepared for serial interface, so at first I had to insert a MAX232 capable chip, before I could communicate with it - afterwards it was a piece of cake, to install the PellMon/RPi interface  :D

I would really like to change the descriptions/text on the webpages that PellMon uses, but as I'm not the Linux-Superuser (never had used Linux at all before), I can't figure out where the files are placed - can You please help me sort it out??

Thank You, for the great work developing PellMon!  :D

Regards Kristian.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Apr 16, 2015, 18:57
Wow, thats a super tidy installation, my own raspberry bows it's head in shame right now where it sits on a shelf half buried in a tangle of cables with the box half open...

All 'parameters' in pellmon are supplied by a 'plugin', of which there are several installed and activated by default. I guess you mean the 'scotte' parameters, they are handled by a plugin called 'ScotteCom'. The names and descriptions for the 'scotte' parameters are all in the file src/Pellmonsrv/plugins/scottecom/descriptions.py in a structure like this:

Kode: [Vælg]
dataDescriptions = { #name, unit, description
    'magazine_content': ('magazine content', 'kg', 'Calculated magazine content'),
    'power': ('power', '%', 'Modulated power level'),
    'power_kW': ('power kW', 'kW', 'Calculated power level'),

where for every parameter you have
    'ID': ('visual name', 'unit', 'longer description text'),

You can edit these (just not the ID, that needs to stay as it is) as you like and then install it as usual then it will be moved into the correct place, or you can edit the installed file directly at /usr/local/lib/Pellmonsrv/plugins/scottecom/descriptions.py (since it is an interpreted language the source files are executable). Of course installing a new version of PellMon will overwrite these changes so you need to keep track of them and redo the changes. (Using the GIT version management system really helps but it can be hard to get started with)

Other parameters comes from other plugins which mostly consists of just a single file called __init__.py, eg the SiloLevel plugin defines a couple of parameters like this in /src/Pellmonsrv/plugins/silolevel/__init__.py:

Kode: [Vælg]
itemList=[{'name':'silo_reset_level',  'longname':'Silo fill up level',
           'type':'R/W',   'unit':'kg'   ,   'value':'0', 'min':'0', 'max':'50000'},
          {'name':'silo_reset_time',   'longname':'Silo fill up time',
           'type':'R/W',   'unit':''    ,   'value':'01/01/14 12:00', 'min':'0', 'max':'-'},
...

itemDescriptions = {'silo_reset_level':     'Silo fill up to this amount',
                    'silo_reset_time' :     'dd/mm/yy hh:mm Automatically set when setting fill up level',
...

The html templates for the webpages are in src/Pellmonweb/html, but the texts defined there are mostly some headlines, and I'm about to move most of that to the plugin system also.

Hope this helps, just ask if you need more pointers / help.

...I suppose PellMon should really have some support for language translations by now, I did not give that much thought when I started as there were only one user then...
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Apr 16, 2015, 20:54
Thank You very much for Your reply, Motoz.

I will see if I can get the time, to dig into the files in the weekend :-)

/Kristian

Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Okt 15, 2015, 07:58
Nogen der vil sende deres opsætning af fungerende SMTP konfiguration til Gmail (uden personlige oplysninger, naturligvis!)???
Jeg har lige siddet og nørdet lidt med det Motoz har nævnt på side 1, men kan ikke rigtigt finde hoved og hale i, hvor jeg skal redigere i filen, og om hvorvidt paranteserne skal slettes, eller ej...

/Kristian.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 15, 2015, 09:22
Hello,
check this out: https://github.com/motoz/PellMon/wiki/Gmail-and-PellMon

The stuff on page one was to test out email with a provider that doest not support TLS, and instead used the older SSL method. This is already included in pellmon since a long time and is not needed with GMail anyway. But google does not like TLS anymore either, they want everything to go through their webinterface (to be able to show ads one might presume...), so you probably have to enable TLS in the GMail settings (or 'less secure applications' as they like to call it...)
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Okt 15, 2015, 15:05
Tnx for Your quick answer, Motoz :-)

I had found that info in the Wiki, but was a bit confused over, where to put the strings???

Is it just anywhere in the pellmonsrv.py???
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 15, 2015, 15:53
Now I'm confused... If you still mean the stuff on page one in this thread, then yes that would go into pellmonsrv.py, but it is already there since a long time ago.

To activate email notifications you only have to add the settings found in the wiki page to your configuration file at /etc/pellmon/pellmon.conf where pellmon has all of it's settings.

The strings are already there, you just need to find them (look towards the end of the file),
https://github.com/motoz/PellMon/blob/d84ee73b65913e7f954c49d4b633f0044cc6c91f/src/pellmon.conf.in#L243
remove the '#' comment mark from the beginning of the needed strings and change them as in the wiki example, then restart to activate the change. (And also change the 'less secure...' settings in your GMail settings)


Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Okt 16, 2015, 08:13
Ahh :-)

It's working 100% - thanks a lot!  ;)
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Okt 16, 2015, 08:25
Hi Motoz...

For getting an notification on silolevel, this should work, right???

alarm1_item = SiloLevel
alarm1_comparator = <
alarm1_level = 32
alarm1_status = SiloLevel
alarm1_enum = OK|SiloLevel - Refill needed!
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 16, 2015, 09:29
Not quite, you need to use the 'id' of the parameter you compare with, not the label. In this case 'silo_level'.
Every parameter has an 'id', and optionally a label and a description. You can see the 'id' by clicking on the parameter in the parameters page, then it opens like this:
Citér
Silo Level
id: silo_level
Remaining amount of pellets in silo

Kode: [Vælg]
alarm1_item = silo_level
alarm1_comparator = <
alarm1_level = 32
alarm1_status = SiloLevel
alarm1_enum = OK|SiloLevel - Refill needed!

The 'alarm1_status' is for creating a new item to holds the status of the comparision. You can use 'SiloLevel' since there is no item with that id already existing, it has to be something unique. You will then get a parameter named 'SiloLevel' that reads '0' when the comparition is false and '1' when the comparition is true.

Note that if you have a new enough version of pellmon you can also set the alarm on the remaining days instead of the remaining amount of pellet.

(http://forumbilder.se/ECRL8/days-left.png?width=150) (http://forumbilder.se/ECRL8/days-left)

The calculation is based on the current consumption, such that when there is less than about a month left it's calculated from last weeks mean consumption, when there is more than that it is calculated from last moths consumption weighted according to a 'standard' monthly distribution of pellet consumption over a year, and finally if you have been using PellMon for over a year it then replays last years consumption forward in time to find out when the hopper becomes empty. The last one gives a very accurate estimate even when filling up a big silo for the whole year.

You also get a silo level graph covering the 'future':
(http://www.stokerpro.dk/gallery/image/2215/mini) (http://www.stokerpro.dk/gallery/image/2215)
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Okt 16, 2015, 09:48
My version is new enough, as I have the graphs.

Should this setup work for getting alarms on low silo-level and high temp?

alarm1_item = silo_level
alarm1_comparator = <
alarm1_level = 32
alarm1_status = SiloLevel
alarm1_enum = OK|SiloLevel - Refill needed!

alarm2_item = boiler_temp
alarm2_comparator = >
alarm2_level = 80
alarm2_status = boiler_temp_supervision
alarm2_enum = OK|Boiler temperature too high

[email]
# Uncomment and set these for email on mode/alarm status changes
# This server:port works with gmail and TLS authentication
server = smtp.gmail.com:587
username = username@gmail.com
password = password
from = PellMon
to = mymail@gmail.com
subject = PellMon Status

# TLS is used by default, to use SSL instead set this:
#auth = SSL

# Send email when any of these change (remove the unwanted conditions)
#conditions=alarm,mode,parameter
conditions = alarm

Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 16, 2015, 10:28
Can't spot any error so I suppose so.
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Okt 16, 2015, 14:37
Not getting any mails from PellMon, nevertheless what i do  :(

I have checked the PellMon email settings against my SynoDS NAS, and my Syno sends mails, when i detects errors or alarm states.

Also I have rebooted PellMon, everytime I have maked changes to the .conf file - weird...
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Okt 16, 2015, 16:09
I thought you had it email working?
Citér
It's working 100%

If you change 'conditions' to:
Kode: [Vælg]
conditions=alarm,mode,parameter
Then you should get an email whenever the boiler starts/stops and when you change any parameter so it's easier to test that it is working.

Do you get any errors in the event list when it tries to send an email?

I think that possibly the 'from' setting should look like an email address, I have 'from=user@mail.com' in my conf and that works with gmail. Google rewrites the 'from' field to match the account you are logged in to anyway, but it might possibly be rejected if it's not an email address at all.

And did you activate 'allow less secure apps' in  your gmail settings? It does not work without that.
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Okt 16, 2015, 19:14
It seems like the string 'from = PellMon', has to be the same adress, as user account.
After changing that, I've received a mail after changing system clock parameter via PellMon WebIF - thank You wery much  8)
 

I thougt it worked after putting the info You gave me at first into the .conf, but unfortunately I just hoped too much, and final test failed... ::)
Titel: Sv: PellMon på Raspberry
Indlæg af: Jinkz efter Jan 16, 2016, 16:00
hey er der nogen der har et image af sin pellmon installation da jeg ikke kan får det installeret.???

på forhånd tak
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Jan 16, 2016, 18:54
Det kan jeg ikke lige hjælpe med, men hvad virker ikke?

Hvis du følger installationsvejl. slavisk så skulle det virke, jeg har ingen erfaring overhovedet med linux og det lykkedes for mig.

Har du husket alle "dependencies"
Titel: Sv: PellMon på Raspberry
Indlæg af: Jinkz efter Jan 16, 2016, 19:52
dependencies ???

 ;D
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Jan 16, 2016, 20:15
Skal det forståes som at det virker nu? O0
Titel: Sv: PellMon på Raspberry
Indlæg af: Jinkz efter Jan 16, 2016, 20:33
Nej desværre ikke er i tvivl om hvad det er ???
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jan 17, 2016, 09:14
Hello Jinkz, if you can say where you get stuck I'm sure we can get you up and running. Any errors? Something needs more explaining?
Titel: Sv: PellMon på Raspberry
Indlæg af: Jinkz efter Jan 17, 2016, 18:46
når jeg prøver at konfigurere så skriver den at filerne ikke eksistere eller hvis jeg får åbnet filerne i text editor så er de tomme???

kan ikke finde installations biblioteket
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jan 17, 2016, 19:06
I suppose that means that the installation was successful and you have pellmon up and running in your browser? The default configuration should not need any changes at all to work with a scotte burner, but when you want to change something you can use the included tool 'pellmonconf', which is a text editor that runs in your browser.

Kode: [Vælg]
$ sudo pellmonconf
Open http://<ip>:8083 with your webbrowser to view the configuration tool
Run as root to be able to save changes
Quit with CTRL-C

Navigate http://<raspberryip>:8083 and you will se something like this:
(http://forumbilder.se/ED5Q6/pellmonconf.png) (http://forumbilder.se/ED5Q6/pellmonconf)

Of course you can use a 'normal' text editor instead, for instance 'nano' in the terminal:
Kode: [Vælg]
sudo nano /etc/pellmon/pellmon.conf
Titel: Sv: PellMon på Raspberry
Indlæg af: Jinkz efter Jan 17, 2016, 20:13
hmm det virker ikke den skriver komandoen ikke eksitere 
tror ikke det er instaleret rigtigt! :P

vil du evt hj;lpe mig over remote desktop p[ et tidspunk
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jan 18, 2016, 06:29
I could do something like that (but I prefer a remote ssh shell in a reverse tunnel in that case). But you are right, the installation apparently has failed. If you could try to repeat the installation by copy-pasting all the steps from here https://github.com/motoz/PellMon/wiki/How-to-install-PellMon into the terminal window and copy-pasting anything that looks like an error here then I'm sure we'll find out what went wrong.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jan 25, 2016, 08:12
With the new 0.6.1 release PellMon is now super-easy to install, check out https://github.com/motoz/PellMon/wiki/How-to-install-PellMon

And for those who are already running a version older than 0.6.1, here are the new upgrade instructions: https://github.com/motoz/PellMon/wiki/How-to-upgrade-PellMon
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Jan 25, 2016, 15:18
Looking forward to try it out!

Thank You, for still developing  :)
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Apr 27, 2016, 17:10
The new PellMon plugin for V7/V13 controllers is starting to become usable.

(http://forumbilder.com/images/2016/04/27/v7_3.md.png) (http://forumbilder.com/images/2016/04/27/v7_3.png)

Stokercloud and the official android app can of course be used in parallel.

The PellMon plugin requires controller version 7.0636 or newer (or the matching V13 version). The only configuration required for the plugin to work is to add the controller serial number and password in the configuration file:
Kode: [Vælg]
[plugin_NBEcom]
serial = 01012
password = 0123456789
And for those that like me have been using PellMon with an old controller for a while, the complete history ie. graphs, events and consumption charts will be kept when changing the controller to a V7, just switch the scottecom plugin to the new nbecom, and adjust configuration for the data written to the database. (Not released yet but the source code is available on github in the 'feature/nbecontrol' branch)
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Maj 12, 2016, 19:28
Beta 1 release of PellMon version 0.7.0:
https://github.com/motoz/PellMon/releases

One of the highlights is of course the new NBEcom plugin for V7/V13 controllers. Installing is as simple as downloading the file and running:
Kode: [Vælg]
sudo gdebi pellmon_0.7.0.beta1-1_all.debUpgrading from 0.6.1 is just as easy. The installation might pause and ask what to do with a configuration file that has been changed, just press enter to confirm that you want to keep your own modifications.

To be able to use the new NBEcom plugin a new dependency 'xtea' is needed that unfortunately is not available in the debian repository. It can be installed with pip:
Kode: [Vælg]
sudo pip install xtea
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Maj 24, 2016, 12:18
The V7 vcontroller is doing watchdog resets every now and then while using the UDP protocol, so I can't recommend using the NBEcom plugin with a 'live' burner yet. The problem is still there on the latest V7 version 7.0638. I could probably paper over the controller bug by slowing down the communication, but that probably only makes watchdog resets occur more seldom.

Titel: Sv: PellMon på Raspberry
Indlæg af: BoinkUser efter Jun 19, 2016, 16:18
The V7 vcontroller is doing watchdog resets every now and then while using the UDP protocol, so I can't recommend using the NBEcom plugin with a 'live' burner yet. The problem is still there on the latest V7 version 7.0638. I could probably paper over the controller bug by slowing down the communication, but that probably only makes watchdog resets occur more seldom.

Hi Motoz

Looks good 8)

Can you somehow isolate the reset problem? We do not see any resets here, but you might send request in another way/order/timing, i will be happy to solve it.

Regards Jens
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jun 20, 2016, 07:21
Don't really have any time to spare for this project now (summer and all), but it's running nonstop so I try to keep an eye on the logs. There is a watchdog powerup maybe once or twice a week but I have not tried to look into what message sequence leads to it.

The pellmon plugin renews the xtea key quite aggressively (probably excessively so) and if there is any problem with setting the new xtea key (eg. timeout) it gives up immediately and switches to rsa for writing settings, because then it's not known if the controller uses the new or the old xtea key so it's simpler to handle it that way. The next xtea key renewal will then use rsa encryption, and I I have a feeling that it might be the rsa decryption on the controller that can cause a watchdog reset.

You could try latest pellmon beta and see if you get the same behaviour, or with my test client something like:
Kode: [Vælg]
watch -n 5 ./client.py -p 1234567890 set settings/boiler/temp 60to provoke it by causing an rsa decryption every 5 second
Titel: Sv: PellMon på Raspberry
Indlæg af: BoinkUser efter Jun 21, 2016, 07:04
Don't really have any time to spare for this project now (summer and all), but it's running nonstop so I try to keep an eye on the logs. There is a watchdog powerup maybe once or twice a week but I have not tried to look into what message sequence leads to it.

The pellmon plugin renews the xtea key quite aggressively (probably excessively so) and if there is any problem with setting the new xtea key (eg. timeout) it gives up immediately and switches to rsa for writing settings, because then it's not known if the controller uses the new or the old xtea key so it's simpler to handle it that way. The next xtea key renewal will then use rsa encryption, and I I have a feeling that it might be the rsa decryption on the controller that can cause a watchdog reset.

You could try latest pellmon beta and see if you get the same behaviour, or with my test client something like:
Kode: [Vælg]
watch -n 5 ./client.py -p 1234567890 set settings/boiler/temp 60to provoke it by causing an rsa decryption every 5 second

Hi Motoz

I will try that out and see what happens.

Regards Jens
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jun 22, 2016, 10:07
Fwiw, here's a log with pellmon+nbecom plugin and the nbetest client writing to settings/boiler/temp every 5 second:

2016-06-22 12:00:20,872 - INFO - "Auger feed time at 10%" changed from 1.75% to 0.34%
2016-06-22 12:00:10,588 - INFO - type: 2, id: 3, v1: 13, v2: 638
2016-06-22 12:00:10,588 - INFO - "Auger feed time at 10%" changed from 0.34% to 1.75%
2016-06-22 12:00:05,198 - INFO - Reconnected to controller on 192.168.1.123
2016-06-22 11:59:59,974 - INFO - Lost connection to controller
2016-06-22 11:59:30,623 - INFO - "Auger feed time at 10%" changed from 1.75% to 0.34%
2016-06-22 11:59:15,305 - INFO - type: 2, id: 3, v1: 13, v2: 638
2016-06-22 11:59:15,305 - INFO - "Auger feed time at 10%" changed from 0.34% to 1.75%
2016-06-22 11:56:01,647 - INFO - "Auger feed time at 10%" changed from 1.75% to 0.34%
2016-06-22 11:55:43,700 - INFO - Reconnected to controller on 192.168.1.123
2016-06-22 11:55:43,552 - INFO - type: 2, id: 3, v1: 13, v2: 638
2016-06-22 11:55:43,552 - INFO - "Auger feed time at 10%" changed from 0.34% to 1.75%
2016-06-22 11:55:38,940 - INFO - Lost connection to controller
2016-06-22 11:25:13,561 - INFO - "Auger feed time at 10%" changed from 1.75% to 0.34%
2016-06-22 11:24:55,200 - INFO - type: 2, id: 3, v1: 13, v2: 638
2016-06-22 11:24:55,197 - INFO - "Auger feed time at 10%" changed from 0.34% to 1.75%
2016-06-22 11:24:52,949 - INFO - Reconnected to controller on 192.168.1.123
2016-06-22 11:24:38,890 - INFO - Lost connection to controller
2016-06-22 11:07:38,053 - INFO - "Wanted boiler temp." changed from 58C to 61C
2016-06-22 08:57:11,531 - INFO - Connected to S/N 23015 on 192.168.1.123
2016-06-22 08:57:10,529 - INFO - Activated plugins: SiloLevel, Consumption, Cleaning, NBEcom
2016-06-22 08:57:10,493 - INFO - starting pelletMonitor

Four watchdog resets in about half an hour.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jul 01, 2016, 16:51
Citér
I will try that out and see what happens.

Do you see the watchdog resets or not?
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jul 01, 2016, 21:44
This python snippet resets my burner immediately, probably any other burner in the network also:

Kode: [Vælg]
import socket

m = [32, 32, 99, 106, 104, 101, 107, 97, 101, 106, 38, 101, 100, 106, 103, 104, 104, 106, 42, 255, 83, 26, 1, 238, 107, 82, 196, 213, 205, 220, 226, 207, 93, 175, 27, 245, 207, 100, 255, 42, 27, 176, 53, 171, 161, 12, 55, 124, 67, 112, 4, 25, 234, 125, 236, 101, 3, 228, 126, 53, 147, 92, 65, 82, 152, 253, 237, 106, 197, 18, 183, 56, 150, 9, 147, 193, 53, 20, 35, 63, 173, 34]

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)

s.sendto(''.join([chr(int(c)) for c in m]) , ('<broadcast>', 8483))
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jul 03, 2016, 14:41
The bug in the controller seems to be that any rsa chiphertext shorter than 64 bytes locks up the controller and cause a watchdog reset.

When encrypting the frame I sometimes (depending on the plaintext contents, for instance the included timestamp varies) get only 63 bytes chiphertext, which then causes the reset. The too short chiphertext appears to be completely valid, I get the same behaviour with a key I generated myself and then the 63 byte chiphertext decrypts correctly. I wonder if this is possibly caused by the protocol using 'plain RSA' without applying any standard padding scheme like PKCS or OAEP. This comment here: http://stackoverflow.com/questions/25699187/rsa-encryption-output-size
Citér
Being somewhat pedantic I could argue that if the modulus is small for its bit size (say it begins with the bits 100) then you have a fair chance to get a ciphertext that is actually a bit shorter than the the modulus.
seems to support that the behaviour is expected and not a bug in the python library.

Anyway, I can avoid the issue by simply adding a different random padding and encrypting again when the message is too short. By doing this there are no watchdog resets, even when abused by the 5s 'watch' script in parallel with pellmon.
Titel: Sv: PellMon på Raspberry
Indlæg af: BoinkUser efter Jul 03, 2016, 18:01
The bug in the controller seems to be that any rsa chiphertext shorter than 64 bytes locks up the controller and cause a watchdog reset.

When encrypting the frame I sometimes (depending on the plaintext contents, for instance the included timestamp varies) get only 63 bytes chiphertext, which then causes the reset. The too short chiphertext appears to be completely valid, I get the same behaviour with a key I generated myself and then the 63 byte chiphertext decrypts correctly. I wonder if this is possibly caused by the protocol using 'plain RSA' without applying any standard padding scheme like PKCS or OAEP. This comment here: http://stackoverflow.com/questions/25699187/rsa-encryption-output-size
Citér
Being somewhat pedantic I could argue that if the modulus is small for its bit size (say it begins with the bits 100) then you have a fair chance to get a ciphertext that is actually a bit shorter than the the modulus.
seems to support that the behaviour is expected and not a bug in the python library.

Anyway, I can avoid the issue by simply adding a different random padding and encrypting again when the message is too short. By doing this there are no watchdog resets, even when abused by the 5s 'watch' script in parallel with pellmon.

Hej Motoz

Thats great, we will look into this issue, we could at least reject the package with a invalid message code when this happens.

Thank you.

Regards Jens
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jul 14, 2016, 18:18
Beta2 for release 0.7.0 published: https://github.com/motoz/PellMon/releases

The V7/13 support is now completely stable and usable (no known bugs, but the parameter menus could be more user friendly).

Installation howto: https://github.com/motoz/PellMon/wiki/How-to-install-PellMon

Dowload the beta2 .deb file with:
Kode: [Vælg]
wget https://github.com/motoz/PellMon/releases/download/v0.7.0-beta2/pellmon_0.7.0.beta2-1_all.deb
And remeber to install the additional dependency xtea if you are going to use PellMon with a V7/13 controller:
Kode: [Vælg]
sudo apt-get install python-pip
sudo pip install xtea

Since PellMon by default logs data from the scottecom plugin (V4/5/6 burners) you need to make some changes to the configuration to work with a V7/13, first the scottecom plugin should be disabled and NBEcom enabled:
/etc/pellmon/conf.d/enabled_plugins.conf:
Kode: [Vælg]
#p01 = ScotteCom
p12 = NBEcom

Then you need to add some data to be fed into the database in the file /etc/pellmon/conf.d/database.conf
Anything available in the parameters page can be logged and graphed by changing that file.

There is no system image with data from the NBEcom plugin included yet but you can of course make your own.

Have fun.
Titel: Sv: PellMon på Raspberry
Indlæg af: khe efter Jul 29, 2016, 16:36
Hi Motoz!

Hope you are enjoying summertime  ;)

I'm preparing for next season, and decided to update my Pi to Weezy and Pellmon 0.6.1, and got it all up and running, except from the database with consumption log - is it possible to transfer it to the new version?

I have copied  RRD database from the old install: /usr/local/var/lib/pellmon/rrd.db to the new install: /var/lib/pellmon/rrd.db - do I miss some point of config setup or so, to get it to work?

I have followed the description in your Wiki here: https://github.com/motoz/PellMon/wiki/Backup-or-Move-PellMon

Thanks in advance - Kristian.
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Jul 31, 2016, 13:22
Answered in the other thread...
Titel: Sv: PellMon på Raspberry
Indlæg af: motoz efter Mar 12, 2017, 18:26
New PellMon release v0.7.0 with lots of new functionality since 0.6.1:
https://github.com/motoz/PellMon/releases

The new NBEcom plugin has been running with my V7 controller since last spring without a single issue or lost connection so it's very stable. The release contains a ready made system image and an example database configuration for the V7 controller which makes it as easy to use with a V7/10/13 controller as with a V4/5/6.

https://github.com/motoz/PellMon/wiki
Titel: Sv: PellMon på Raspberry
Indlæg af: Hemhems efter Jun 30, 2017, 11:48
Great, I'm glad you find it useful! You are the first PellMon user with a 4.x box that I know of so it's nice to know that it works as intended. Just ask if there is anything.

Hi Motoz!

I am really happy with the solution, and it is nice and easy to setup :-)

My box was not prepared for serial interface, so at first I had to insert a MAX232 capable chip, before I could communicate with it - afterwards it was a piece of cake, to install the PellMon/RPi interface  :D

I would really like to change the descriptions/text on the webpages that PellMon uses, but as I'm not the Linux-Superuser (never had used Linux at all before), I can't figure out where the files are placed - can You please help me sort it out??

Thank You, for the great work developing PellMon!  :D

Regards Kristian.

Skal man stadig konvertere rs232 til usb, eller kan man bare skrælle et usb kabel og montere RX/TX og stel til +- og stel på usb kablet..

Ville prøve samme setup på min 6.76 styring, men gætter nok på at interfacene mellem usb og rs232 ikk kan snakke sammen umiddelbart.

Rasp pi 3 - plus noget konverter og usb kabel og så er man vel kørende?
Titel: Sv: PellMon på Raspberry
Indlæg af: MHES efter Jun 30, 2017, 18:49
RS232 og USB er to vidt forskellige ting, så man kan ikke "skrælle" et USB-kabel og forbinde til et RS232 interface  ;)

Det kræver lidt elektronik at lave konverteringen  ;)

Helt fundamentalt er RS232 et "point-to-point" system, mens USB (Universal Serial Bus) som navnet siger er et BUS-system hvor der kan være flere enheder på samme kabel.

Hilsen
Michael

Great, I'm glad you find it useful! You are the first PellMon user with a 4.x box that I know of so it's nice to know that it works as intended. Just ask if there is anything.

Hi Motoz!

I am really happy with the solution, and it is nice and easy to setup :-)

My box was not prepared for serial interface, so at first I had to insert a MAX232 capable chip, before I could communicate with it - afterwards it was a piece of cake, to install the PellMon/RPi interface  :D

I would really like to change the descriptions/text on the webpages that PellMon uses, but as I'm not the Linux-Superuser (never had used Linux at all before), I can't figure out where the files are placed - can You please help me sort it out??

Thank You, for the great work developing PellMon!  :D

Regards Kristian.

Skal man stadig konvertere rs232 til usb, eller kan man bare skrælle et usb kabel og montere RX/TX og stel til +- og stel på usb kablet..

Ville prøve samme setup på min 6.76 styring, men gætter nok på at interfacene mellem usb og rs232 ikk kan snakke sammen umiddelbart.

Rasp pi 3 - plus noget konverter og usb kabel og så er man vel kørende?
Titel: Sv: PellMon på Raspberry
Indlæg af: Hemhems efter Jun 30, 2017, 21:55
Hej

Ja dumme spørgsmål bevares jo normalvis korrekt.. :D

Nå nu fatter jeg hvad der skal til, men at finde delen i europa er så en anden sag...
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Jun 30, 2017, 22:56
Arh, det er vist ikke et stort problem.

https://www.av-cables.dk/usb-til-seriel-adapter/
Titel: Sv: PellMon på Raspberry
Indlæg af: Hemhems efter Jun 30, 2017, 23:05
Arh, det er vist ikke et stort problem.

https://www.av-cables.dk/usb-til-seriel-adapter/

Det kan laves på flere måder, synes mest om et stik og breakout board på printet..
Titel: Sv: PellMon på Raspberry
Indlæg af: MHES efter Jul 01, 2017, 10:12
Der findes ikke dumme spørgsmål  ;)
...vi lærer ved at spørge og undres  ;)

Go' jagt

Hilsen
Michael

Hej

Ja dumme spørgsmål bevares jo normalvis korrekt.. :D

Nå nu fatter jeg hvad der skal til, men at finde delen i europa er så en anden sag...
Titel: Sv: PellMon på Raspberry
Indlæg af: Uff82 efter Feb 02, 2020, 18:25
Hej alle,
Ved godt tråden er gammel, men er der nogle der har en pellmon installations image.img eller ligne til at ligge de vil dele?
Jeg har hart det satup på min Scott v6.22 . men sdkortet døde og fik aldrig lavet en backup af det. og nu kan jeg bare ikke få den til at virke igen:-(
Titel: Sv: PellMon på Raspberry
Indlæg af: kivi efter Feb 02, 2020, 18:33
Du kan bare hente installationsfilen her.

https://github.com/motoz/PellMon/wiki/How-to-install-PellMon