|
|
|
@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?
|
|
|
|
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.
|
|
|
|
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?
|
|
|
|
Yes, it needs the semicolon at the end.
|
|
|
|
Also, how have you connected your Zigbee to the SEGbox? Using the internal serial port or other?
|
|
|
|
internal serial port of an asus wl520gu
|
|
|
|
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.
|
|
|
|
|
|
|
|
Can you tell me how to enable this from the web ? how do you enable a control device on the segmeter in the dashboard ?
|
|
|
|
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.
|
|
|
|
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… 
|
|
|
|
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.
|
|
|
|
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… ?
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
|