@ramoncarranza When I went and looked where the library manager installed the IRremote lib(for me C:\Users\User\Documents\Arduino\libraries), it had given it an odd name like arduino_294267. I renamed it to IRremote and the issue went away.
Posts made by pete1450
-
RE: 💬 Infrared Sender and Receiver
-
RE: [SOLVED] Raspberry Pi Gateway to Vera UI7 Not adding sensors
@mfalkvidd I didnt realize it was a vera specific flag. By the name it sounds like something that would be needed to include sensors on any platform. If not, fair point.
-
RE: [SOLVED] Raspberry Pi Gateway to Vera UI7 Not adding sensors
@anvil Are you kidding me! That was it. I don't have a problem fiddling with the files but I assumed the step-by-step instructions would have laid that critical step out. Or for that matter why isn't it in the source to begin with?
-
RE: [SOLVED] Raspberry Pi Gateway to Vera UI7 Not adding sensors
@blacey
I was using the serial gateway over a year ago with UI5. I decided to update to the new version and have tried UI5 and UI7 with both the serial-to-vera and raspi-as-ethernet gateways. Can't get the serial gateway to show up so I'm back to UI7 Ethernet trying to figure out what's getting lost in the messages. SHAs seem to match yours. I'm a little confused though. Aren't id's handed out by the controller only during inclusion? If I reboot my vera, start the gateway, and clear eeprom/upload a motion sketch, I get the output below. It looks like an id is handed out and I never touched the start button.root@MiOS_35029342:~# sha1sum /etc/cmh-ludl/*_Arduino* f9875310ea581c6384046dfd733dc5c9e436ef20 /etc/cmh-ludl/D_Arduino1.json.lzo e3c4493c7dff216c152b8a4d50c169acf636b1fc /etc/cmh-ludl/D_Arduino1.xml.lzo 8f0186c85c9a6ef6e0e8ba0755f88cbb5d326e30 /etc/cmh-ludl/D_ArduinoNode1.json.lzo 7d66187bb75beb01606f607ad1e82a6fa6b2a552 /etc/cmh-ludl/D_ArduinoNode1.xml.lzo 722b702937db7aedcb03346229fcc38363b2c378 /etc/cmh-ludl/D_ArduinoRelay1.json.lzo 05ea89a8d904f436c60bd326315724e79c5c47de /etc/cmh-ludl/D_ArduinoRelay1.xml.lzo ed15bfde68e6615b7615bd6230ca8040a50f5f28 /etc/cmh-ludl/I_Arduino1.xml.lzo 2f0603b6192006f88e3582788a13a168391ceee4 /etc/cmh-ludl/L_Arduino.lua.lzo dc1e8a26833890f2d1f412c9b2e915724576cbd4 /etc/cmh-ludl/S_Arduino.xml.lzo 64f886de376e2d932cd55bdf8a6367ed7a394d55 /etc/cmh-ludl/S_ArduinoNode.xml.lzo root@MiOS_35029342:~#
mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0: mysgw: Client 0: 255;255;3;0;4;1 mysgw: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=4,pt=0,l=1,sg=0,ft=0,st=OK:1 mysgw: Client 0: mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 mysgw: TSF:MSG:PINGED,ID=1,HP=1 mysgw: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 mysgw: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 mysgw: TSF:MSG:READ,1-1-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.1.0 mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 mysgw: TSF:MSG:READ,1-1-0,s=2,c=0,t=1,pt=0,l=0,sg=0: mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 mysgw: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 mysgw: TSF:MSG:READ,1-1-0,s=2,c=1,t=16,pt=0,l=1,sg=0:0 mysgw: TSF:MSG:READ,1-1-0,s=2,c=1,t=16,pt=0,l=1,sg=0:0 mysgw: TSF:MSG:READ,1-1-0,s=2,c=1,t=16,pt=0,l=1,sg=0:0
-
RE: 💬 Building a Raspberry Pi Gateway
@marceloaqno Well that fixed the connection issue. Now I'm just back to square one where pressing start doesn't do anything. Why do I not need to specify my controllers ip? That is the ip for my veralite. Whats the use case for that option.
-
RE: 💬 Building a Raspberry Pi Gateway
@marceloaqno
Ran as root and made sure I didn't have mysgw already running:rm -r MySensors/ git clone https://github.com/mysensors/MySensors.git --branch master cd MySensors/ ./configure --my-controller-ip-address=192.168.1.136 --my-port=5003 --my-rf24-irq-pin=15 make
root@raspberrypi:~/downloads/MySensors# ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.1.1 mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect
-
RE: 💬 Building a Raspberry Pi Gateway
@marceloaqno I should have specified, I'm getting the connection errors with the ethernet gateway.
-
RE: 💬 Building a Raspberry Pi Gateway
@lakshmc Make sure you don't have the daemon running already
If not, I'm getting the same problem on the 2.1.1 that was just released. 2.1.0 was working "fine"(besides my suspecting a bug that doesn't let any inclusion happen, hence I tried the new version). Time to go back to the serial gateway right into the vera.
-
RE: [SOLVED] Raspberry Pi Gateway to Vera UI7 Not adding sensors
I've got nowhere. Unless someone happens to pop up with somewhere to look I guess I'll be going back to see if the serial gateway will work. As the problems exists after valid data already comes through I'd think the problem will still exist but who knows.
-
RE: [SOLVED] Raspberry Pi Gateway to Vera UI7 Not adding sensors
I've tried going back to UI5 as well but no change. I'd really like to know for starters why the start button in the UI doesnt have any visible effect but aparently starts things behind the scenes.
-
[SOLVED] Raspberry Pi Gateway to Vera UI7 Not adding sensors
I've been banging my head against this for hours and I can't figure out why my veralite won't add my sensors. I've used this exact sensor before on UI5 and I can see the gateway acknowledging my movement. For starters I have done a factory reset and added only the gateway device and the "start inclusion" button never seems to do anything in the UI. I can see however that it calls the start procedure because something comes through to the gateway but the stop never happens either. I've been running the start, then the stop, then manually reload lua for good measure. The only thing I can find that seems relevant is copied below. Discarded seems bad.
If I'm reading correctly near the middle it goes like this:
0;0;3;0;5;1 get the gateway version
255;255;3;0;4;1 here, have node id 1
1;255;0;0;17;2.1.0 responds with version
1;255;3;0;6;0 request for config
1;255;3;0;11;Motion Sensor I'm a motion sensor
1;255;3;0;12;1.0 Sketch version
and then the node sending data againAny help would be appreciated.
-
RE: 💬 Building a Raspberry Pi Gateway
@hek It looks like development is the default branch in the repository. I was following the build instructions and couldn't figure out why I kept getting "connection refused". Just typing up a troubleshooting post when I saw my log said 2.2.0-beta. Sure enough when I grabbed master(2.1.0) instead it ran fine. Should probably add a checkout in the instructions.
-
RE: IR Record and Playback module
@BartE As I'm already using a sensor that I just control with light switch buttons in vera, I'd like to not have to add a IR receiver to the current board. Does this have the ability to let me just add the hex codes I already have?
Either way this is awesome.
-
RE: Remote Panel
@Tmaster I'm actually using a LG Exceed 2 that comes on sale for $8 at Best Buy every once in a while.
-
RE: Remote Panel
@Dwalt Oooo. Exactly what I was looking for. I'd prefer to sent my own codes but that's a good start. Thanks.
-
Remote Panel
I've got a couple sensors with IR LEDs attached to them and can control things like my projector/receiver/AC through "light switch" widgets on my veralite. With enough devices the interface gets to be quite messy and cumbersome. Is there an existing "Device" for Veras that I could use to have some sort of remote panel with multiple buttons. Something where you would put your IR codes in the settings and each button would send a different payload to the sensor.
If not, any suggestions for good tutorials on creating my own?
-
RE: Experimenting with cheap 433mhz gadgets
I've been wanting to incorporate some 433mhz weather sensors. I'll be using this!
-
RE: Problem powering sensor from external battery (100000mah)
Sorry this isnt a helpful post, but is 100000mah a typo? 100 amp hours out of something that fits in a mail box? Seems very high.
-
RE: Just starting out have a question
You can certainly have a node set up but it would just sit there asking for a node ID all day. If you want to be able to control it until you get a controller set up, slap a NRF24Lo1 on another arduino and use it plugged into a computer as a serial gateway. You'll need to send the node id manually(no controller to do it for you) through the serial consol and then it will start sending the mysensors encoded messages. You can also send commands in the same format so you'll need to read up on the API.
Once you get a controller remember for flash the eeprom clear sketch so it can request a new node ID.
-
RE: Soil Tensiometer Sensor Network
Shamelessly self-promoting my post, but it really is cheap: http://forum.mysensors.org/topic/719/graphing-sensor-data/1
-
RE: External power supply to radio
No problem connecting different power supplies, but often finicky components don't like having separate grounds. Connect the ground of everything together and see how it works.
-
RE: Another possible board - ATMega328, nRF socket, DHT22 socket, MOSFET, Uno pinout
Very nice board; almost seems like it was made for mysensors. I'm still too cheap though.
-
RE: Temp sensors showing as Celsius, looking for Fahrenheit
Just starting with the basics: Assuming you used the example temp sketch, did you set the metric boolean to false?
-
RE: Help understanding addressing and log messages
Based on this: http://www.mysensors.org/build/serial_api
Example 1
id Node-id 0
Child-id 0
internal message
no ack
payload is type I_LOG_MESSAGE
and your actual payload is "read: 21-20-0 s=0,c=1,t=0,pt=7,l=5:16.7"EDIT: I'm not sure if there is an easier place to get this, but I looked in the code for process where it prints "read" messages and found this to describe the payload. Send is also in there.
msg.sender
-msg.last
-msg.destination
s=msg.sensor
c=mGetCommand(msg)
t=msg.type
pt=mGetPayloadType(msg)
l=mGetLength(msg)
:msg.getString(convBuf)); -
RE: sensor type: "presence sensor", but not PIR
I would think you could do this by setting up a sensor as a switch. Another one would be set up to communicate with the first instead of sending to the gateway. The first one is made to set itself as "off"(no presence) on the gateway if it hasn't received a ping from the actual presence sensor in the past, say, 5 seconds. When it does see a ping, switch set to on.
-
RE: Using NO magnetic switches instead of NC
@gregl said:
I think the main reason why most door/window switches are usually NC is so that should a burglar gain access to the wires to the sensor and cup/snip them the alarm would be tripped. Of course in this type of use batteries are not a consideration....
Back to mysensors.... i too like the status sent periodically so i know if a sensor is alive or dead.
Fair point. When it really comes down to it, I got started thinking about this in relation to a mailbox sensor. I want to put it there and not touch it for a year. It's flippin cold in Tennessee right now.
-
RE: Using NO magnetic switches instead of NC
@BulldogLowell
No, you're right. I meant I'm not interested in a hearbeat so that wouldn't be a problem to me. If I wanted a regular heartbeat I would wall power.@tbowmo I agree 3 years is a good amount of time, but I have serious doubts about real world performance. I'm not trying to say the current implementation is the wrong way; it has it's uses. Just trying to come up with a way to maximize battery life and it doesn't get any better that 0mA. Just need to be aware of the tradeoffs.
-
RE: Using NO magnetic switches instead of NC
This certainly wouldn't work in that case. I'm a very lazy(and cheap) person, and if I can't easily make batteries last a year, I'm going to wall power it. I can open a window quickly every few months to make sure it still works. I meant to put something in there about battery level too. It could report that at each opening.
-
Using NO magnetic switches instead of NC
Just thinking out loud, but the window switches linked to in the build section are NC type, meaning that when the magnet is close the circuit is complete. This means you're at best using a sensor that sleeps most of the time and is drawing some power, even if you get fancy.
Wouldn't it make more sense to use a normally open switch if you are running a battery powered sensor? That way it could be off most of the time. Put the switch in line with the power so when a window opens, the switch closes and the sensor is powered so it sends a window open status. Using a couple transistors you could create a latching circuit that keeps power on after the window closes (which would open the power circuit). By also running that switch power to a pin on the arduino it can detect the switch closing and send "window closed" at that time. Once it has made the report it just opens the latch and you are drawing zero power again. Even better than sleeping.
Thoughts?
-
RE: Help getting started - temperature sensor network for beginner
I did. Vera will be the controller and the pogoplug will be used for logging data and serving pages to report on it.
-
RE: Help getting started - temperature sensor network for beginner
I should also point out; the same thing could be done by any computer you don't mind leaving on. Just install perl(and the serial/sqlite libraries) and maybe make a few tweaks to the script. You could simplify it more by just writing the data to a file as comma separated values and use excel to graph it.
-
RE: Help getting started - temperature sensor network for beginner
Shameless plug for my post, but if you don't want to involve a HA controller, my setup may be perfect. It requires some linux experience to set up but anything you need can be Googled. A perl script reads sensor data and stores it in a sqlite database where you can query it any way you want. Runs on a dirt cheap Pogoplug which has the added benefit of using very little power.
-
RE: Graphing sensor data
No, youre right, that wouldnt work for battery powered. I chop the ends off old cell phone chargers and try to keep a room's sensors down to a single box. The only one I've considered being battery powered is the "Mailbox opened" one but thats another project. The polling is really just to allow getting realtime data when you want it. If I think about it more, Ill probably leave it out. I was just thinking out loud near the end.
-
Graphing sensor data
This is still in very early stages but I wanted to share what I've got up and running.
I don't even have a controller yet but I've been meaning to use the nrf24l01+ for quite some time and finding this site with everything worked out gave me the push to pull them out of the parts bin. I'm a data hog who likes to have a record of everything so I figured I'd get a logging server set up for when I actually get the other sensors going(at minimum temp/PIR for every room).
For proof-of-concept I pulled an ultrasonic sensor out and attached it to a pro mini with the distance sketch. A nano was attached to another nrf24l01+ and sent an id to the sensor so it would quit whining. At that point I could see data coming across and moved on to what this post is really about.
The pogoplug line of devices are meant to be an easy way to make your own cloud storage by plugging a USB drive into it and then the Pogoplug into your router. Whats great is that underneath they're just an Arm processor running stripped down linux. That means they can be reloaded with other versions of linux and run as a low power server.The best part? You can find them for $6 on sale.
I'm not going to go into all the detail of getting everything set up; Google can help you get the pieces working together. I'll just give the high level overview. If you get stuck, a search for 'ArchLinux thing-im-trying-to-install' will get you to a wiki page with the exact commands you need to run.
-
I went with this guide for getting ArchLinux running. Be aware that you need to find a guide specific to your pogoplug model/processor. I happene to be using the Mobile which has only one USB port so followed the directions in that guide to run the OS off a SD card.
-
I like Perl so the libraries I used in the code were Device::SerialPort, DBD:SQLite, and GD::Graph. One or two failed on install through cpanminus if I recall because of a lack of memory(Pogoplug mobile only has 128mb). Creating a swap file took care of that.
-
CGI is a quick way to make dynamic content and using a scripting language like Perl lets you just "print" whatever you want to a page. You can use things like
<img src="/makegraph.cgi?">
in a html page to place the output of your script(in this case your graph) there. Multiple lines would put multiple graphs on one page. -
Database used is sqlite
-
Web server is lighttpd
Code to grab data off the gateway and store it. This runs continuously in the background.
use Device::SerialPort; use DBI; my $port = Device::SerialPort->new("/dev/ttyUSB0") or die $!; my $dbh = DBI->connect( "dbi:SQLite:dbname=/srv/http/distancetest", "", "", { RaiseError => 1} ) or die $DBI::errstr; # 19200, 81N on the USB ftdi driver $port->baudrate(115200); # you may change this value $port->databits(8); # but not this and the two following $port->parity("none"); $port->stopbits(1); #get rid of some junk data my $tEnd = time()+2; # 2 seconds in future while (time()< $tEnd) { my $c = $port->lookfor(); next if $c eq ""; last; } while (1) { # Poll to see if any data is coming in my $char = $port->lookfor(); # If we get data, then print it if ($char) { print "$char\n"; if($char =~ /1;1;1;0;13/){ @tmparr = split(/;/, $char); $tmpval = $tmparr[5]; print "$tmpval\n"; if($tmpval !~ //){ #sometimes a blank value comes in $dbh->do("INSERT INTO distance(distance) VALUES(" . $tmpval . ")") or die $!; } } } # Uncomment the following lines, for slower reading, # but lower CPU usage, and to avoid # buffer overflow due to sleep function. # $port->lookclear; # sleep (1); }
This is the cgi script that generates the graphs. Ideally there would be fields to fill in that are passed to the script for determining ranges... later.
#!/usr/bin/perl -w use CGI ':standard'; use DBI; use GD::Graph::lines; use strict; #use CGI::Carp qw(fatalsToBrowser); my $dbh = DBI->connect( "dbi:SQLite:dbname=/srv/http/distancetest", "", "", { RaiseError => 1} ) or die $!; my $sth = $dbh->prepare("SELECT * FROM distance"); $sth->execute() or die "Cannot execute: " . $sth->errstr( ); my $row; my @data; my @out1; my @out2; while ($row = $sth->fetchrow_arrayref()) { push(@out1, @$row[0]); push(@out2, @$row[1]); } #@out1 = (1,2,3,4,5); #@out2 = (1,2,3,4,5); $data[0] = \@out1; $data[1] = \@out2; $sth->finish(); $dbh->disconnect(); my $skip = int ((@data * 50)/(600-50) + 1); my $mygraph = GD::Graph::lines->new(600, 300); $mygraph->set( x_label => 'Timestamp', y_label => 'cm', title => 'Distance measuted at time', line_types => [1], line_width => 2, x_labels_vertical => 1, x_label_skip => 10, dclrs => ['blue'], ) or warn $mygraph->error; $mygraph->set_legend_font(GD::gdMediumBoldFont); $mygraph->set_legend('sensor1'); my $myimage = $mygraph->plot(\@data) or die $mygraph->error; print "Content-type: image/png\n\n"; #open(OUTPUT, ">$0.png") or die "Can't open $0.png: $!\n"; #print OUTPUT $myimage->png(); print $myimage->png;
And below is a graph from data that the sensor has reported today. The x axis needs work because that range is just a set spacing for each event; it's not representative of time.
Once I get a controller(hinted strongly to my wife for a Christmas Veralite), the nano will attach to that and I'll update all sensors to provide data in response to a request. A separate pro mini will be attached to the Pogoplug and send requests at set times for things like temperature. It will also recieve store-data requests for any commands a Vera would send to a sensor/control or new states something like a door sensor would have, I got this up in a bout a day of on and off work(when I should be wrapping Christmas presents) so anyone more linux savy should be able to knock this out quick. Anyone less: again, Google is your friend. It was a lot of copy/paste on my part anyway.
-
-
RE: Trouble flashing Arduino Pro Mini with a sketch
I apologize if you are aware of this, but are you pressing the reset button once the sketch is ready to transmit? Using a sparkfun FTDI board with knockoff pro minis, I press the reset button as soon as the first TX light blinks on serial board. If I don't: similar errors.