Home

Welcome! Log in or Join us

call: 1300 889 851

Forums SEGmeter segmeter commandibility

Subscribe to segmeter commandibility 16 posts, 3 voices

Reply to topic
 

 
Kayno_medium
Dec 1, 2010 11:51pm
40 posts

@samotage

trying to get the relay to work from the web. from the arduino on the segmeter, over usb, i can control the relay by sending “(seg_meter (relay on 0 7334));” via arduino app.

from the segbox, i killed aiko_gateway.lua and typed “telnet localhost 2000” at the command line. when i type in “(seg_meter (relay on 0 7334));” and press enter, no response comes back. i do see the odd seg_meter reading though coming through.

when i run aiko_gateway.lua from the command lines, i see:

 

root@ranger:~# ./aiko_gateway.lua 

[Aiko-Gateway V0.4 2010-11-28]

SEG command sending now: (seg_meter (relay off 0 41816))

SEG command sending now: (seg_meter (relay off 0 41816))

 

Not sure what is going on where things are going wrong… i have the latest aiko_gateway.lua on board my segbox. any ideas?

 

 
Samotage_300_medium
Dec 2, 2010 1:12am
407 posts

Hey Kayne,

The command should get through to the device from the SEGbox directly over telnet like you mention.

If it’s not, it’s likely there is some kind of Zigbee problem?  Have you configured the one in the SEGbox as a Gateway and the other as an endpoint?  This could be your problem.

One test to try, would be to run the SEGbox serial header to the UART on the SEGmeter.  This should transmit the command directly.

Sam.

 

 
Kayno_medium
Dec 2, 2010 1:21am
40 posts

ive configured 3 xbees the same – i reset them and set the baud rate to 38400.

im pretty sure this is ok – i have the third sitting in an arduino xbee shield and have removed the atmega from the arduino. using the arduino app serial monitor, i can see power readings coming from the segmeter, and when i send the relay command, i get confirmation. if i turn it on for 10secs, after 10secs i get the relay off command coming back.

when ssh’ing into the segbox and telnet’ing to port 2000, do i just put a semi colon at the end of the relay command and press enter?

 
Samotage_300_medium
Dec 2, 2010 1:23am
407 posts

Yes, it needs the semicolon at the end.

 
Samotage_300_medium
Dec 2, 2010 1:43am
407 posts

Also, how have you connected your Zigbee to the SEGbox?  Using the internal serial port or other?

 
Kayno_medium
Dec 2, 2010 2:32am
40 posts

internal serial port of an asus wl520gu

 
Samotage_300_medium
Dec 2, 2010 12:18pm
407 posts

Thinking about this, I’ve got some Series 1 Zigbees that have this problem… not sure what it is exactly?  One I think is damaged.

The other thing, could you post a pic of your inner SEGbox Zigbee setup?

Sam.

 
Kayno_medium
Dec 2, 2010 11:14pm
40 posts

 

switched back to the 6V 1500ma plug pack and now i can command the relay. really not sure what is going on, but will monitor to see how it goes. 

http://twitpic.com/3ceiyn

http://twitpic.com/3ceisu

 

 
Fox_medium
Dec 11, 2010 5:52am
14 posts

Can you tell me how to enable this from the web ? how do you enable a control device on the segmeter in the dashboard ?

 

 
Samotage_300_medium
Dec 11, 2010 12:59pm
407 posts

Hey Hennie,

With command in alpha, just let me know what device you’d like commandable.  I can set up the big switch and then if you’ve got the current SEGbox and SEGmeter code running, it should send the commands to turn the relay on and off.

There are some nice controls coming that will enable group switching and other things like control of the switch from another stream, e.g. a temperature sensor.

Sam.

 
Fox_medium
Dec 12, 2010 12:36am
14 posts

Hi thanks for the explanation , i’m thinking about hooking up an co2 sensor to the segmeter, which triggers something like a fan to bring the co2 level back to something i can live a bit longer here… Cool

 
Samotage_300_medium
Dec 12, 2010 2:28pm
407 posts

Hey Hennie,

This is an interesting twist on the control logic we are developing, essentially the values from one data stream trigger switching of multiple devices, so sure!

Sam.

 
Fox_medium
Dec 23, 2010 7:21am
14 posts

Hi, thanks for enabling the relay on the web for me, but i cant get it to work.

When i stop lua , and connect with telnet to the ser2net on port 2000 and give the following commands , the relay is switched

(segmeter_sirion (relay on 0 7334));
(segmeter_sirion (relay off))

But using the web not… ?

 
Fox_medium
Dec 23, 2010 7:23am
14 posts

Hi , suddenly i see this in my terminal screen when pushing the button on the web…

SEG command sending now:     segmeter_sirion 2010-12-23T15:21:37 (relay true nil))
SEGmeter message not correctly bracketed:     segmeter_sirion 2010-12-23T15:21:37 (relay true nil)))
Message joining attempt:     1
SEGmeter message not correctly bracketed:     segmeter_sirion 2010-12-23T15:18:41 (relay false nil))segmeter_sirion 2010-12-23T15:21:37 (relay true nil)))
SEGmeter message not correctly bracketed:     segmeter_sirion 2010-12-23T15:21:37 (relay true nil))
Message joining attempt:     2
SEGmeter message not correctly bracketed:     segmeter_sirion 2010-12-23T15:18:41 (relay false nil))segmeter_sirion 2010-12-23T15:21:37 (relay true nil)))segmeter_sirion 2010-12-23T15:21:37 (relay true nil))
SEG command sending now:     segmeter_sirion 2010-12-23T15:22:05 (relay false nil))
SEGmeter message not correctly bracketed:     segmeter_sirion 2010-12-23T15:22:05 (relay false nil))
Message joining attempt:     3
SEGmeter message not correctly bracketed:     segmeter_sirion 2010-12-23T15:18:41 (relay false nil))segmeter_sirion 2010-12-23T15:21:37 (relay true nil)))segmeter_sirion 2010-12-23T15:21:37 (relay true nil))segmeter_sirion 2010-12-23T15:22:05 (relay false nil))
SEGmeter message not correctly bracketed:     segmeter_sirion 2010-12-23T15:22:05 (relay false nil))
Message joining attempt:     4

 
Samotage_300_medium
Dec 23, 2010 1:25pm
407 posts

Hey Hennie,

Ahhh…. that makes perfect sense… SEG has been sending you an older command format.  I’ve just disabled this old format (it’s not being used anymore) so you should get good fresh commands coming thorough.

Let us know how it goes!

Sam.

 
Fox_medium
Dec 23, 2010 11:31pm
14 posts

Yip it works ! so cool !

Log in to reply to this topic

Forums SEGmeter segmeter commandibility

copyright © 2013 Smart Energy Groups pty ltd