Last visit was: It is currently Sun Feb 25, 2018 12:55 am


All times are UTC - 5 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Mon Aug 08, 2016 2:54 pm 
Site Admin
BrulTech Staff

Joined: Fri Jun 04, 2010 9:39 am
Posts: 3016
mcblitz wrote:
Yes, several times. Searched through emoncms logs and /var/logs/* and didn't find redis errors.

Just to make sure:

Code:
pi@raspberrypi:/var/log $ sudo pecl install channel://pecl.php.net/dio-0.0.6 redis swift/swift
Ignoring installed package pecl/dio
Ignoring installed package swift/swift
Skipping package "pecl/redis", already installed as version 2.2.5
No valid packages found
install failed
pi@raspberrypi:/var/log $ cat /etc/php5/fpm/conf.d/20-dio.ini
extension=dio.so
pi@raspberrypi:/var/log $ cat /etc/php5/fpm/conf.d/20-redis.ini
extension=redis.so


Looks like I might've missed a step. Check your EmonCMS dir, there's a file called settings.php. There should be a Redis section, make sure that it's configured.

_________________
Ben
Brultech Research Inc.
E: ben(at)brultech.com


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Mon Aug 08, 2016 3:01 pm 
Registered users

Joined: Sat Sep 07, 2013 3:40 pm
Posts: 18
Yeah, I just figured that out a minute before your reply. That fixed it.

thanks.


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Mon Aug 08, 2016 3:07 pm 
Registered users

Joined: Sat Sep 07, 2013 3:40 pm
Posts: 18
Ok. Now that redis works (yippie). The next problem is initializing the device from the device page.

On the devices page, it says that "Updated" is "n/a". That may be fine, I don't know. But when I click on the initialize icon, I get an error. See attached images.

I originally thought this was due to the "redis" problem.

I see the following in /var/log/nginx/error.log

Code:
2016/08/08 20:16:05 [error] 684#0: *309 FastCGI sent in stderr: "PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object
2016/08/08 20:16:05 [error] 684#0: *309 FastCGI sent in stderr: "PHP message: PHP Notice:  Trying to get property of non-object in /var/w" while reading upstream, client: 192.168.1.14, server: _, request: "GET /emoncms/device/inittemplate.json?id=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.15", referrer: "http://192.168.1.15/emoncms/device/view"
2016/08/08 20:16:06 [error] 684#0: *309 FastCGI sent in stderr: "ww/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP me
2016/08/08 20:16:06 [error] 684#0: *309 FastCGI sent in stderr: "PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object i" while reading upstream, client: 192.168.1.14, server: _, request: "GET /emoncms/device/inittemplate.json?id=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.15", referrer: "http://192.168.1.15/emoncms/device/view"
2016/08/08 20:16:07 [error] 684#0: *309 FastCGI sent in stderr: "n /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 116
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/html/emoncms/Modules/feed/feed_model.php on line 115
PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/html/emoncms/Modules/feed/feed_model.php:115) in /var/www/html/emoncms/index.php on line 186" while reading upstream, client: 192.168.1.14,


Attachments:
devices error.jpg
devices error.jpg [ 33.54 KiB | Viewed 1518 times ]
devices.jpg
devices.jpg [ 37.84 KiB | Viewed 1518 times ]
Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Mon Aug 08, 2016 3:44 pm 
Site Admin
BrulTech Staff

Joined: Fri Jun 04, 2010 9:39 am
Posts: 3016
Make sure you have GEM Firmware 4.20 at least as it has EmonCMS fixes in the packet format.

The device setup will stay as N/A, I'm not sure about those errors but they might also remain. As long as it created the inputs/feeds, you're OK.

_________________
Ben
Brultech Research Inc.
E: ben(at)brultech.com


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Mon Aug 08, 2016 7:55 pm 
Registered users

Joined: Sat Sep 07, 2013 3:40 pm
Posts: 18
Thanks Ben,

I have the latest firmware, and the input and feeds appears to be created and workings.

marty


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Wed Nov 09, 2016 9:36 pm 
Registered users

Joined: Wed Oct 14, 2015 1:08 am
Posts: 22
I'm getting the same redis errors as Marty.

I'm using the emonCMS build instructions from openenergy.org (i.e. no nginx). But I have the GEM device git from brultech and am getting inputs with the "no redis" error.

What exactly in the setting file redis section needs changing?

Thanks, Marty.


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Wed Nov 09, 2016 9:47 pm 
Registered users

Joined: Wed Oct 14, 2015 1:08 am
Posts: 22
Don't worry....figured it out.

redis_enabled needs to be change from false to true.

But I am not getting any values on the inputs despite lots of trial and error.

The inputs are reading as updated n/a and value NaN.

Am I supposed to use the key from the devices page ("Device access key") or the my account "write API key". I have tried putting both into the GEM data post Token field. I have nothing in the 'long token' and 'Key1' fields.

Should I be rebooting the GEM every time I make any changes to the data post fields?

I have also ticked all the 'POST Channel Select' boxes, including temperature and pulse counters.

Any help would be appreciated. Have spent a whole day on trying to get this to work.

Marty


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Thu Nov 10, 2016 11:41 am 
Site Admin
BrulTech Staff

Joined: Fri Jun 04, 2010 9:39 am
Posts: 3016
mminehan wrote:
Don't worry....figured it out.

redis_enabled needs to be change from false to true.

But I am not getting any values on the inputs despite lots of trial and error.

The inputs are reading as updated n/a and value NaN.

Am I supposed to use the key from the devices page ("Device access key") or the my account "write API key". I have tried putting both into the GEM data post Token field. I have nothing in the 'long token' and 'Key1' fields.

Should I be rebooting the GEM every time I make any changes to the data post fields?

I have also ticked all the 'POST Channel Select' boxes, including temperature and pulse counters.

Any help would be appreciated. Have spent a whole day on trying to get this to work.

Marty


Going from your previous post in the other thread, it sounds like you're already sending to HS3.

You won't be able to (easily) use the methods described in this thread due to needing to use the EmonCMS packet format.

The only way I can think of is to somehow feed HS3 through your GEMs COM2 port, then use COM1 to send to EmonCMS. I'm not sure how your communication with HS3 is setup however.

The alternative option is to use BTmon.py, which should do all the watt/kWh calculations and send them directly to EmonCMS (if I remember correctly). All the extra configuration through the EmonCMS device module isn't needed. This is assuming you can hook up the Raspberry Pi to COM2 of the GEM via a serial-to-USB cable or something similar.

If you get BTmon.py working, you can also look in the other options available like Grafana.

_________________
Ben
Brultech Research Inc.
E: ben(at)brultech.com


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Sun Mar 12, 2017 7:48 pm 
Registered users

Joined: Sun Mar 12, 2017 7:45 pm
Posts: 22
Ok, I've been trying to get mine up and running with EmomCMS all day. I've got it up to the point where I think I have everything correct, and fixed the Redis error (using redis_enabled needs to be change from false to true.). I wasn't for sure what else needed to be changed.

//2 #### Redis
$redis_enabled = true;
$redis_server = array( 'host' => 'localhost',
'port' => 6379,
'auth' => '',
'prefix' => 'emoncms');


I'm also not sure I have the right keys in the right places. I have:

URL Address: Address to my raspberry PI running EmonCMS
URL Extension:/index.php/ecmEngine/greeneye
Token: 'write key' found on emoncms
Node: Name defined in emoncms
Long token: left at default
Key1:left at default

But under the inputs page, updated stays n/a, value stays at NaN. I've read through this thread, but I couldn't find an answer. Could anyone point me in the right direction?

Also, I wanted to add, I have the latest firmware for the GreenEye. The raspberry Pi has been rebooted a few times. And when I try to initialize after adding the device in EmomCMS, I get an error of undefined, but then under inputs it did seem to create the inputs.

Greeneye:
COM firmware ver: 4.32
ENG firmware ver: 1.49
RealTime Status: ON
Packet Send Interval: 10
Pri. Packet Format: 10
Sec. Packet Format: 0
Sys Status: OK

This is what the packet looks like from the Greeneye:
GET /index.php/ecmEngine/greeneye?apikey=5be0cac36e29eef65a7a26b69de645b7&node=ConcreteGEM&json={SC:10523104,V:3573,E1:1095819756611,P1:9095,E2:887235303919,P2:273,
E3:970341098394,P3:2,E4:785860290254,P4:1,E5:475580416411,P5:0,E6:119157616555,P6:3,
E7:270702396272,P7:109,E8:434634415033,P8:91,E9:914762358382,P9:0,E10:755824623892,
P10:1,E11:988940335288,P11:0,E12:898247518414,P12:1401,E13:285665830060,P13:0,
E14:607037487229,P14:1345,E15:851992577439,P15:7,E16:773444399236,
P16:36,E17:556529798953,P17:80,E18:1061510089333,P18:0,E19:655092756232,
P19:58,E20:691295045835,P20:314,E21:657841795201,P21:179,E22:582260301847,P22:256,
E23:780418435812,P23:441,E24:1031725734467,P24:238,E25:180542866922,P25:38,
E26:625530089315,P26:5,E27:852549021480,P27:497,E28:564502965248,P28:0,
E29:156209898294,P29:0,E30:548706203291,P30:0,E31:259800537408,P31:6,
E32:925914983732,P32:251,C1:0,T1:nc,T2:x,T3:x,T4:x,T5:x,T6:x,T7:x,T8:x,X:0}
HTTP/1.1 Host: 192.168.143.158


Top
Offline Profile  
 
 Post subject: Re: Adding Brultech Devices to EmonCMS
PostPosted: Mon Mar 13, 2017 9:58 am 
Site Admin
BrulTech Staff

Joined: Fri Jun 04, 2010 9:39 am
Posts: 3016
brassfly wrote:
Ok, I've been trying to get mine up and running with EmomCMS all day. I've got it up to the point where I think I have everything correct, and fixed the Redis error (using redis_enabled needs to be change from false to true.). I wasn't for sure what else needed to be changed.

//2 #### Redis
$redis_enabled = true;
$redis_server = array( 'host' => 'localhost',
'port' => 6379,
'auth' => '',
'prefix' => 'emoncms');


I'm also not sure I have the right keys in the right places. I have:

URL Address: Address to my raspberry PI running EmonCMS
URL Extension:/index.php/ecmEngine/greeneye
Token: 'write key' found on emoncms
Node: Name defined in emoncms
Long token: left at default
Key1:left at default

But under the inputs page, updated stays n/a, value stays at NaN. I've read through this thread, but I couldn't find an answer. Could anyone point me in the right direction?

Also, I wanted to add, I have the latest firmware for the GreenEye. The raspberry Pi has been rebooted a few times. And when I try to initialize after adding the device in EmomCMS, I get an error of undefined, but then under inputs it did seem to create the inputs.

Greeneye:
COM firmware ver: 4.32
ENG firmware ver: 1.49
RealTime Status: ON
Packet Send Interval: 10
Pri. Packet Format: 10
Sec. Packet Format: 0
Sys Status: OK

This is what the packet looks like from the Greeneye:
GET /index.php/ecmEngine/greeneye?apikey=5be0cac36e29eef65a7a26b69de645b7&node=ConcreteGEM&json={SC:10523104,V:3573,E1:1095819756611,P1:9095,E2:887235303919,P2:273,
E3:970341098394,P3:2,E4:785860290254,P4:1,E5:475580416411,P5:0,E6:119157616555,P6:3,
E7:270702396272,P7:109,E8:434634415033,P8:91,E9:914762358382,P9:0,E10:755824623892,
P10:1,E11:988940335288,P11:0,E12:898247518414,P12:1401,E13:285665830060,P13:0,
E14:607037487229,P14:1345,E15:851992577439,P15:7,E16:773444399236,
P16:36,E17:556529798953,P17:80,E18:1061510089333,P18:0,E19:655092756232,
P19:58,E20:691295045835,P20:314,E21:657841795201,P21:179,E22:582260301847,P22:256,
E23:780418435812,P23:441,E24:1031725734467,P24:238,E25:180542866922,P25:38,
E26:625530089315,P26:5,E27:852549021480,P27:497,E28:564502965248,P28:0,
E29:156209898294,P29:0,E30:548706203291,P30:0,E31:259800537408,P31:6,
E32:925914983732,P32:251,C1:0,T1:nc,T2:x,T3:x,T4:x,T5:x,T6:x,T7:x,T8:x,X:0}
HTTP/1.1 Host: 192.168.143.158


It looks like you almost have it configured.

/index.php/ecmEngine/greeneye is likely giving you errors. Go to the Data Post section and click the DashBox/Standalone Dashboard button to get rid of the extra fields.

URL Address will be the address of your EmonCMS server (looks like possibly 192.168.143.158).
URL Extension will be blank or it'll be any subfolder you're using in your webroot.

Save that and go back to Packet Send. Click the Show Packet button. The URL there should match where ever your EmonCMS is hosted. (for example, if i'm hosting at http://192.168.143.158/emoncms/ it should show GET /emoncms/?...,T8:x,X:0}).

_________________
Ben
Brultech Research Inc.
E: ben(at)brultech.com


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net & kodeki