Brultech GreenEye Energy Monitor (GEM)

Ok. I can telnet to 8000 no issue but the addin does not appear to be connecting. Any recommendations to test?

ok. the format looks correct.

There should be a lot line in your logs of the form:

Running Network Attached I_BrultechPowerMeter.xml on %s:%s Device# %s, id %s

Can you grab a copy of that?

If it’s missing, then the code failed during startup somewhere, and I’d need a greater sample of the LuaUPnP.log file to work out that issue.

ok. I’m pretty inept, but managed to get ssh’d in, cranked up logging, and this is the only instance I found in the log run:

50 11/05/14 20:47:08.705 luup_log:181: GarageDoor Status: 181 Status: 1 <0x2b99d680>
50 11/05/14 20:47:08.774 luup_log:195: Brultech PowerMeter: Running Network Attached I_BrultechPowerMeter.xml on 192.168.1.64:8000 Device# 195, id LEAK this:12288 start:245760 to 0x1611000 <0x2b99d680>
09 11/05/14 20:47:09.101 ZWaveJobHandler::FindCustomDeviceType node 2/0 has custom 2120 file class desc <0x2b79d680>

I include the preceding and post lines for reference.

Let me know what else to try.

ok, cool, so it’s starting correctly. If you enable Verbose logging in Vera, and then capture about 1-2 minutes of the log file, then I should have enough to go by.

Can you PM me a link to that (Dropbox, Box.net, etc)?

I’ve probably missed something obvious, but at least the starting part of the output looks correct. Usually there will be repeating log lines after that occur every (in your case) 8 seconds. These will be most obvious when Vera’s Verbose logging is enabled (although, they wont all start with “Brultech” in their string.

I’m interested in this app but can’t get it because repository hosting wants money?

Is this project still active, how do I get it?

Se my comment in the other thread you posted on:
http://forum.micasaverde.com/index.php/topic,5518.msg226487.html#msg226487

Thanks, got it working will keep my GEM comments here on this thread. The ECM info on the wiki didn’t say much about the GEM which led me to assume I needed to use the ECM emulation on the GEM. Once I figured that was wrong assumption on my part I came here.

Also seems blanking the HTPP URLs in the GEM setup breaks the plugin, seems the HTTP URL and extension need something in them.

I saw your comment about resources, I will let you know how I get on using the edge if you are interested? I already submitted a bunch of UI7 bugs, like having 32 meters breaks the type view in devices :slight_smile:

Also I seem unable to stop the 2 temperature and 2 pulse counter sensors from showing up even though I am not using them and they are unchecked in the GEM setup. Every time I delete the 1,2, it comes back. I checked my packet format is sending the following at the end to indicate no data from the pulse or temp. &PL=0,0,0,0&T=,,,,,,,&key=&Resp= HTTP/1.1 Do you think there is a plugin bug or UI7 bug? If there is a UI7 bug I will email them and open a ticket (I know you have had your fill of banging your head against that wall.

Also if you want help with the GEM stub page I am happy to take screen shots an write up what I did for UI7?

Alex

The values are sent automatically calls by the GEM and I parse them out ONLY if the parameters are spec’d in Vera.

You should be able to edit & save those values in Vera and it’ll stop creating the respective child devices for temp or whatever.

Nope. I can delete them and then the variable fields actually disappear in the UI. But then they come back. I also had it disappear the whole root device and all the 32 child’s created. Luckily there is now a button to ‘create device’ - that let me reconfigure but still with the same issue. I guess “another fine moment brought to you from our sponsors ‘Vera’ and ‘UI7’ :-(”

Yeah, in the field that has ‘1,2’, you can just blank out those values in UI5, and then Save, and Vera will do the right thing.

If that level of functionality is broken in UI7 after this length of release/availability, well, um …

[quote=“guessed, post:28, topic:172782”]Replace this file, and it should work:
http://code.mios.com/trac/mios_brultech-power-monitor/export/49/trunk/L_BrultechMeter1.lua[/quote]

Hi Guessed,

I’ve started my GEM today and it’s missing the temperature value. I’ve been trying to download modified .lua file but aparently I need an account to log in to your trank data.
How can I get an access?

Regards

LoWang

[quote=“guessed, post:70, topic:172782”]Yeah, in the field that has ‘1,2’, you can just blank out those values in UI5, and then Save, and Vera will do the right thing.

If that level of functionality is broken in UI7 after this length of release/availability, well, um …[/quote]

Yes it is broken (or at lest different) :slight_smile: I just created a support ticket to get it fixed. It seems it is related to how null variables are treated. For example if I just put 1 in each field that is ok - I only get one of each device. it seems when the variable is null, it is saved, obeyed (the devices disappear and so do the variable fields in the UI!) but a few minuets later (maybe due to lua startup) the null variables get recreated and repopulated.

I found the workaround is to set the two variables ‘,’ (comma, no spaces, I assume this is the equivalent of null,null. This seems to work. Is it possible that your plugin is doing a re-initialize for some reason because it thinks the variables being empty is an issue requiring setup? Or do you think it is that the UI7 needs to correctly set the variable to ‘null’?

I will keep you posted about the support ticket (they are actually quite responsive on some of the smaller issues like this).

[quote=“LoWang, post:71, topic:172782”][quote=“guessed, post:28, topic:172782”]Replace this file, and it should work:
http://code.mios.com/trac/mios_brultech-power-monitor/export/49/trunk/L_BrultechMeter1.lua[/quote]
Hi Guessed,

I’ve started my GEM today and it’s missing the temperature value. I’ve been trying to download modified .lua file but aparently I need an account to log in to your trank data.
How can I get an access?[/quote]

I’ve pushed a 0.3 version of the Plugin for MiOS-Team approval to bundle the latest changes. Will wait until MiOS team approves it, then it’ll be available via the standard app-store download.

[quote=“scyto, post:72, topic:172782”]Yes it is broken (or at lest different) :slight_smile: I just created a support ticket to get it fixed. It seems it is related to how null variables are treated. For example if I just put 1 in each field that is ok - I only get one of each device. it seems when the variable is null, it is saved, obeyed (the devices disappear and so do the variable fields in the UI!) but a few minuets later (maybe due to lua startup) the null variables get recreated and repopulated.

I found the workaround is to set the two variables ‘,’ (comma, no spaces, I assume this is the equivalent of null,null. This seems to work. Is it possible that your plugin is doing a re-initialize for some reason because it thinks the variables being empty is an issue requiring setup? Or do you think it is that the UI7 needs to correctly set the variable to ‘null’?[/quote]

If it was working previously, then Blank values should continue to work. It was working in UI5, and “blank” values are legal user-input (which isn’t null behind the scenes, it’s just an empty string once it’s initially been set… at least it was in UI5)

I will keep you posted about the support ticket (they are actually quite responsive on some of the smaller issues like this).

Thanks!

This was approved by the MiOS Team this morning, so all current code changes for the Brultech are now present in apps.mios.com.

Should pushing the release have had any impact on UI5 ??
My GEM has been taking fine to my UI5 for years, and on March 29th, it still communicates, but I only get Voltage and Temperature, all Watt readings are zero. If I restore from early on the 29th, all works for a short while, then same result
…Barry

[quote=“bgrubb1, post:76, topic:172782”]Should pushing the release have had any impact on UI5 ??
My GEM has been taking fine to my UI5 for years, and on March 29th, it still communicates, but I only get Voltage and Temperature, all Watt readings are zero. If I restore from early on the 29th, all works for a short while, then same result
…Barry[/quote]

It’s possible. The apps.mios.com Developer experience is extremely error prone, so it’s very easy to introduce a subtle error while setting up a release.

I manually went through and validated/eyeballed that the apps.mios.com version of the files matches the corresponding one that I have, so they’re at least in agreement.

I also had Vera create a new Device from the latest Apps.mios.com version, and it created ok. That said, it had to startup (reload) twice to pickup/download/unpack the changes correctly.

The Device was created, along with the Children, and I can see that it’s attempting to connect to the IP:Port that I specified in the IP Address field.

Unfortunately, my GEM is tied up at the moment, so I won’t be able to test the next-steps, which is to cutover the GEM to be used by this Vera.

What errors are being reported in your logs?

grep -i brultech /var/log/cmh/LuaUPnP.log

Pages and pages of

50 03/31/15 6:45:34.912 luup_log:68: Brultech PowerMeter: Unknown token=key <0x2e6a5680>
06 03/31/15 6:45:34.914 Device_Variable::m_szValue_set device: 68 service: urn:brultech-com:serviceId:PowerMeter1 variable: Seconds.01000300 was: 1762059 now: 1762079 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e6a5680>
50 03/31/15 6:45:54.885 luup_log:68: Brultech PowerMeter: Unknown token=key <0x2e6a5680>
50 03/31/15 6:45:14.891 luup_log:68: Brultech PowerMeter: Unknown token=key <0x2e6a5680>
06 03/31/15 6:45:14.894 Device_Variable::m_szValue_set device: 68 service: urn:brultech-com:serviceId:PowerMeter1 variable: Seconds.01000300 was: 1762039 now: 1762059 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e6a5680>

Thank you for looking into it
…Barry

That’s really odd, the timestamps are all out of order.

These lines are just noise and can safely be ignored:

luup_log:68: Brultech PowerMeter: Unknown token=key <0x2e6a5680> 06 03/31/15 6:45:34.914 Device_Variable::m_szValue_set device: 68 service: urn:brultech-com:servic

It does mean that data is coming in generally the correct format. I’ll need you to enable Verbose logs, and restart, then send me the complete log for the few minute coverage period that has the data in it. That’ll let me see exactly what’s coming in, and what’s being applied to State Variables (etc).

I will PM an email address for you to send the Logs. I’m am fairly busy through the next few days, but will see what I can do.

[quote=“bgrubb1, post:76, topic:172782”]Should pushing the release have had any impact on UI5 ??
My GEM has been taking fine to my UI5 for years, and on March 29th, it still communicates, but I only get Voltage and Temperature, all Watt readings are zero. If I restore from early on the 29th, all works for a short while, then same result
…Barry[/quote]

With a great deal of assistance from @bgrubb1, we’ve managed to localize the cause of the issues being observed in the newest Brultech Plugin codebase.

At some point, Brultech “extended” their existing Channel format to provide information about Current Flow. In order to not break compatibility, they added a Flag:

    [Include Current in Packet]    (x) On     () Off

With this option set, the Packet format is tweaked, so that the Channels have 3x number attributes instead of 2x numbers.

Looking at the cNN= segments in the raw data stream, if the option is set (On), they look like:
c10=454690928,13294,.14

and if the option is not set (Off), they look like:
c10=2839988,0

Older units were upgrades with the option Off, and newer units upgraded with the option On.

I made code changes (about 1 yr ago) that tightened the parsing logic in order to extract information for W and Wh. This change, combined with the “defaults” change to the GEM, causes the issue.

I’ll make tweaks in the next week or so to allow for handling of either format. In the meantime, simply switch the option OFF in the GEM.