Har du lyst til at støtte Stoker Pro? Læs mere her: Støt Stoker Pro Forum

MGM plugin for PellMon

Spørgsmål vedr. MGM samt det tilbehør der laves til MGM pillefyret
gordo
Stoker I
Stoker I
Indlæg: 9
Tilmeldt: 30 jan 2021 02:15
Givet likes: 1 gang

Re: MGM plugin for PellMon

Indlæg af gordo » 30 jan 2021 02:35

MGMJuniorUser skrev:
14 okt 2019 12:38
ok I will try that - thanks:)
Thank you so much guys, you are amazingly talented.

i have a TCNET boiler controller and have been looking for this logging/monitoring facility for years. Knew it should be possible but didnt have the know how. I followed your guidance and struggled with passwords bit, but have it up and running now. So happy :-). will get a RPI now that i see it working on PC. That will be another adventure into unknown technology.

My main screen graphics do not show boiler inputs in afraid, just shows "connecting". But the MGM screen will shows the inputs. any ideas to solve?


Brugeravatar
motoz
Stoker IV
Stoker IV
Indlæg: 124
Tilmeldt: 14 feb 2013 08:06
Mit fyr: BioComfort 30kW + termax 25cr
Geografisk sted: Ostrobothnia
Modtaget likes: 11 gange
Kontakt:

Re: MGM plugin for PellMon

Indlæg af motoz » 30 jan 2021 14:30

Nice to hear you find it useful!

The "connecting..." string shown is a bit misleading here. I take it you are using the default system image, there the 'connecting...' text is the default text for a string object in the svg image that is connected to a pellmon item named "alarm". When browser application has set up a websocket connection to the pellmonweb server, that text will be overwritten by whatever is read from an item called 'alarm'. The default burner connection plugin 'scottecom' creates the 'alarm' item, so whenever the connection is up and something is read from the burner, the 'connecting' text will be replaced by a burner status code.

The mgm plugin however is in a bit of a do-it-yourself, work-in-progress state, so there is no item called 'alarm' in the database created by the mgm plugin. This means that even if everything works as intended so far, nothing will remove the 'connecting...' string from the system image. We have a guide in the wiki how to create custom system image https://github.com/motoz/PellMon/wiki/C ... stem-image , using this you should be able to create something suitable for your burner. You could also just hide the system image completely in the configuration, of course (but what fun is that...). Let me know if you need help fixing the image or creating a new one.
PellMon open source pellet logger at https://github.com/motoz/PellMon

gordo
Stoker I
Stoker I
Indlæg: 9
Tilmeldt: 30 jan 2021 02:15
Givet likes: 1 gang

Re: MGM plugin for PellMon

Indlæg af gordo » 30 jan 2021 17:38

lol yeah it just a bit of tinkering for fun really. hopefully with a useful outcome.

The graph logging data function ok as well as the parameters data so that is a big step forward. Consumption isnt being calculated/recorded but ill investigate that later.

again thanks a lot

gordo
Stoker I
Stoker I
Indlæg: 9
Tilmeldt: 30 jan 2021 02:15
Givet likes: 1 gang

Re: MGM plugin for PellMon

Indlæg af gordo » 31 jan 2021 13:01

motoz skrev:
30 jan 2021 14:30
Nice to hear you find it useful!

The "connecting..." string shown is a bit misleading here. I take it you are using the default system image, there the 'connecting...' text is the default text for a string object in the svg image that is connected to a pellmon item named "alarm". When browser application has set up a websocket connection to the pellmonweb server, that text will be overwritten by whatever is read from an item called 'alarm'. The default burner connection plugin 'scottecom' creates the 'alarm' item, so whenever the connection is up and something is read from the burner, the 'connecting' text will be replaced by a burner status code.

The mgm plugin however is in a bit of a do-it-yourself, work-in-progress state, so there is no item called 'alarm' in the database created by the mgm plugin. This means that even if everything works as intended so far, nothing will remove the 'connecting...' string from the system image. We have a guide in the wiki how to create custom system image https://github.com/motoz/PellMon/wiki/C ... stem-image , using this you should be able to create something suitable for your burner. You could also just hide the system image completely in the configuration, of course (but what fun is that...). Let me know if you need help fixing the image or creating a new one.
thanks for that. advice for customizing pellmonweb server page sorted. it helped me find faults in it and now displays all the data on screen :-)

"The "connecting..." string" is now showing "OK" for a period then changes to "disconnected". happens a few minutes after "INFO - Activated plugins: SiloLevel, Consumption, Cleaning, MGM" where no more data recorded, followed by "INFO - The burner is disconnected" I'm lost to reason. The only think of note to me is in the pellmonweb MGM screen the "mode = error". looking at the /etc/pellmon/conf.d/plugins/mgm.conf file i guess this is because the Enumerations is looking for a value of 0-6, where as my boilers web uses different tags for each boiler status. im probably talking nonsense tho lol

If i can get it up and running ill post my config files to help others.

gordo
Stoker I
Stoker I
Indlæg: 9
Tilmeldt: 30 jan 2021 02:15
Givet likes: 1 gang

Re: MGM plugin for PellMon

Indlæg af gordo » 31 jan 2021 14:08

gordo skrev:
31 jan 2021 13:01
thanks for that. advice for customizing pellmonweb server page sorted. it helped me find faults in it and now displays all the data on screen :-)

"The "connecting..." string" is now showing "OK" for a period then changes to "disconnected". happens a few minutes after "INFO - Activated plugins: SiloLevel, Consumption, Cleaning, MGM" where no more data recorded, followed by "INFO - The burner is disconnected" I'm lost to reason. The only think of note to me is in the pellmonweb MGM screen the "mode = error". looking at the /etc/pellmon/conf.d/plugins/mgm.conf file i guess this is because the Enumerations is looking for a value of 0-6, where as my boilers web uses different tags for each boiler status. im probably talking nonsense tho lol

If i can get it up and running ill post my config files to help others.
i since noted that pellmonweb server page when inspected identifies some errors
"reconnectingwebsocket.js:97 WebSocket connection to 'ws://localhost:8081/websocket/ws/?parameters=boiler_temp,power_kW,mode,alarm,vvb_temp,outside_temp,feeder_capacity,silo_level,smoke_temp&events=yes' failed: WebSocket is closed before the connection is established." if that explains anything


Brugeravatar
motoz
Stoker IV
Stoker IV
Indlæg: 124
Tilmeldt: 14 feb 2013 08:06
Mit fyr: BioComfort 30kW + termax 25cr
Geografisk sted: Ostrobothnia
Modtaget likes: 11 gange
Kontakt:

Re: MGM plugin for PellMon

Indlæg af motoz » 31 jan 2021 14:47

'The burner is disconnected' comes when the update thread has failed to read and parse the xml file for a while. Unfortunately due to sloppy coding from my side, it logs this error for any kind of exception here https://github.com/motoz/PellMon/blob/7 ... __.py#L234 , so you have to run the whole thing in debug mode, or do some guessing and code reading.

But you said you have a TCNET controller (not TCNET II)? I have a faint memory that I have seen the xml file from that maybe at some point, was it so that it doesn't have RATED_POWER and PROC_ID in the xml? The current code assumes both of these here: https://github.com/motoz/PellMon/blob/7 ... __.py#L205 , which if I'm right means that you can't configure it to work with your controller, you have to change the python plugin code to match what you have in your xml.
PellMon open source pellet logger at https://github.com/motoz/PellMon

gordo
Stoker I
Stoker I
Indlæg: 9
Tilmeldt: 30 jan 2021 02:15
Givet likes: 1 gang

Re: MGM plugin for PellMon

Indlæg af gordo » 31 jan 2021 16:43

motoz skrev:
31 jan 2021 14:47
'The burner is disconnected' comes when the update thread has failed to read and parse the xml file for a while. Unfortunately due to sloppy coding from my side, it logs this error for any kind of exception here https://github.com/motoz/PellMon/blob/7 ... __.py#L234 , so you have to run the whole thing in debug mode, or do some guessing and code reading.

But you said you have a TCNET controller (not TCNET II)? I have a faint memory that I have seen the xml file from that maybe at some point, was it so that it doesn't have RATED_POWER and PROC_ID in the xml? The current code assumes both of these here: https://github.com/motoz/PellMon/blob/7 ... __.py#L205 , which if I'm right means that you can't configure it to work with your controller, you have to change the python plugin code to match what you have in your xml.
yes i think its a TCNET but not sure. I think your diagnosis is right. PROC_ID is looking for a value 0-6. the only xml value for power is for burner KW. My xml just provides led's status for.
• System On
• Auger
• Clean
• Refill
• Util. Water Pump
• Building Heating Pump
• Ignition
• Fan
https://drive.google.com/file/d/1BIf5G- ... sp=sharing

I think python plugin codes will need changed which likely above my limited abilities lol. I might just have to get a RPI with sensors set up for a generic boiler to use standard Pellmon coding. or i could do a crash course in python hahahahha

gordo
Stoker I
Stoker I
Indlæg: 9
Tilmeldt: 30 jan 2021 02:15
Givet likes: 1 gang

Re: MGM plugin for PellMon

Indlæg af gordo » 31 jan 2021 20:44

MGMJuniorUser skrev:
13 okt 2019 21:48
Thanks, It works with the user:pass@ip :) And thank you for you good work with the plugin - I have looked for years for something like this.

The tcnet controller 1 interface:
1.png

Status.xml:
2.png

<response>
<err0>0</err0>
<err1>0</err1>
<err2>0</err2>
<err3>0</err3>
<err4>0</err4>
<led0>1</led0>
<led1>0</led1>
<led2>0</led2>
<led3>0</led3>
<led4>0</led4>
<led5>1</led5>
<led6>0</led6>
<led7>0</led7>
<btemp>60</btemp>
<utemp>60</utemp>
<otemp>24</otemp>
<ftemp>64</ftemp>
<pwr>0</pwr>
<debug>38</debug>
</response>

developer tools chrome:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- ... dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title>TCNET Boiler Controller</title>
<link href="/mchp.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://gc.kis.v2.scr.kaspersky-labs.com ... C1/main.js" charset="UTF-8"></script><script src="/mchp.js" type="text/javascript"></script>
</head>

<body>
<div id="shadow-one"><div id="shadow-two"><div id="shadow-three"><div id="shadow-four">
<div id="page">

<div style="padding:0 0 5px 5px"><img src="/logo.gif" alt="Technoflame" /></div>

<div id="title"><div class="right">TCNET Boiler Controller Web Access</div><span id="hello">&nbsp;</span></div>

<div id="menu">
<a href="/index.htm">Status</a>
<a href="/tsetup.htm">Temperature Setup</a>
<a href="/wtmon.htm">Week Timer Setup</a>
<!-- <a href="/errlog.htm">Error Log</a> -->
<a href="/protect/config.htm">Network Configuration</a>
<a href="/protect/admin.htm">Administration</a>

</div>
<div id="content">
<h1>Welcome!</h1>
<p>Thank you for choosing Technoflame TCNET Boiler Controller.</p>
<p>Current status of your boiler:</p>
<div id="ignition_error" style="display:none"><p class="error">Error: Ignition failed.</p></div>
<div id="nofuel_error" style="display:none"><p class="error">Error: Out of pellets.</p></div>
<div id="overtemp_error" style="display:none"><p class="error">Error: Overtemperature detected.</p></div>
<div id="overcurrent_error" style="display:none"><p class="error">Error: Overcurrent detected.</p></div>
<div id="backburn_error" style="display:none"><p class="error">Error: Back burning to auger!.</p></div>

<div id="status">
<div id="loading" style="display:none"><p class="error">Error: Network connection lost.</p></div>

<div id="display">
<p>Temperatures:<br /></p>
<p>Building Heating: <span id="btemp" style="font-weight:normal">?</span>&deg;C</p>
<p>Utility Water: <span id="utemp" style="font-weight:normal">?</span>&deg;C</p>
<p>Outside Temp: <span id="otemp" style="font-weight:normal">?</span>&deg;C</p>
<p>Flue Temp: <span id="ftemp" style="font-weight:normal">?</span>&deg;C</p>
<p>Output Power: <span id="opwr" style="font-weight:normal">?</span>kW</p>
<p>CPU Load: <span id="loop0" style="font-weight:normal">?</span>%</p>
<p>Outputs:<br />
<span class="leds">
<table width="190" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10"><span id="led0">&bull;</span></td>
<td width="173">System On</td>
</tr>
<tr>
<td width="10"><span id="led1">&bull;</span></td>
<td>Auger</td>
</tr>
<tr>
<td width="10"><span id="led2">&bull;</span></td>
<td>Clean</td>
</tr>
<tr>
<td width="10"><span id="led3">&bull;</span></td>
<td>Refill</td>
</tr>
<tr>
<td width="10"><span id="led4">&bull;</span></td>
<td>Util. Water Pump</td>
</tr>
<tr>
<td width="10"><span id="led5">&bull;</span></td>
<td>Building Heating Pump</td>
</tr>
<tr>
<td width="10"><span id="led6">&bull;</span></td>
<td>Ignition</td>
</tr>
<tr>
<td width="10"><span id="led7">&bull;</span></td>
<td>Fan</td>
</tr>
</table></span></p>

</div>
</div>

<p>Firmware: v5.25</p>
</div>
<script type="text/javascript">
<!--
// Parses the xmlResponse from status.xml and updates the status box
function updateStatus(xmlData) {
// Check if a timeout occurred
if(!xmlData)
{
document.getElementById('display').style.display = 'none';
document.getElementById('loading').style.display = 'inline';
return;
}

document.getElementById('ignition_error').style.display = (getXMLValue(xmlData, 'err0') == '1') ? 'inline' : 'none';
document.getElementById('nofuel_error').style.display = (getXMLValue(xmlData, 'err1') == '1') ? 'inline' : 'none';
document.getElementById('overtemp_error').style.display = (getXMLValue(xmlData, 'err2') == '1') ? 'inline' : 'none';
document.getElementById('overcurrent_error').style.display = (getXMLValue(xmlData, 'err3') == '1') ? 'inline' : 'none';
document.getElementById('backburn_error').style.display = (getXMLValue(xmlData, 'err4') == '1') ? 'inline' : 'none';
// Make sure we're displaying the status display
document.getElementById('display').style.display = 'inline';
document.getElementById('loading').style.display = 'none';

// Loop over all the LEDs
for(i = 0; i < 8; i++)
document.getElementById('led' + i).style.color = (getXMLValue(xmlData, 'led' + i) == '1') ? '#090' : '#ddd';

// Loop over all the buttons
//for(i = 0; i < 4; i++)
// document.getElementById('btn' + i).innerHTML = (getXMLValue(xmlData, 'btn' + i) == 'up') ? 'OFF' : 'ON';

// Update the POT value
document.getElementById('btemp').innerHTML = getXMLValue(xmlData, 'btemp');
document.getElementById('utemp').innerHTML = getXMLValue(xmlData, 'utemp');
document.getElementById('otemp').innerHTML = getXMLValue(xmlData, 'otemp');
document.getElementById('ftemp').innerHTML = getXMLValue(xmlData, 'ftemp');
document.getElementById('opwr').innerHTML = getXMLValue(xmlData, 'pwr');
document.getElementById('loop0').innerHTML = getXMLValue(xmlData, 'debug');
}
setTimeout("newAJAXCommand('status.xml', updateStatus, true)",2000);
//-->
</script>
<div class="spacer">&nbsp;</div>
<div id="footer">Copyright &copy; 1999-2012 All rights reserved.<br>Developed by: Nusret Suzme &copy; 2010 </div>

</div></div></div></div></div>

</body>
</html>


I hope you can use this for something :)
Hi I was hoping you could let me know if you got pellmon to work with your TCNET controller. I have the same controller and firmware and keeps disconnecting. Just wondering if I’m wasting my time

skovjensen1
Stoker I
Stoker I
Indlæg: 4
Tilmeldt: 15 dec 2016 18:10

Re: MGM plugin for PellMon

Indlæg af skovjensen1 » 01 feb 2021 16:54

I have a question, if i just use the LAN connection from TCNET2 controller in my MGM Comfort and connect through a router to my PC, what is the benefit compared with Pellmon

gordo
Stoker I
Stoker I
Indlæg: 9
Tilmeldt: 30 jan 2021 02:15
Givet likes: 1 gang

Re: MGM plugin for PellMon

Indlæg af gordo » 02 feb 2021 14:24

skovjensen1 skrev:
01 feb 2021 16:54
I have a question, if i just use the LAN connection from TCNET2 controller in my MGM Comfort and connect through a router to my PC, what is the benefit compared with Pellmon
The TCNEt web face only gives live data. pellmon records the data on a database and computes consumption etc etc


Besvar