I have started to use ESP8266 for some of my devices with my Vera. So a combination of mysensors and esp's.
How would I go around reading values via WIFI only(esp8266) ? I can do a HTTP request to put values but how would I do a READ ?
/M
I have started to use ESP8266 for some of my devices with my Vera. So a combination of mysensors and esp's.
How would I go around reading values via WIFI only(esp8266) ? I can do a HTTP request to put values but how would I do a READ ?
/M
@ferpando You can enable a watchdog timer on your Arduino. If your code hangs your Arduino, it should reset/reboot it. But not sure that would reset the radio.
Found good description -> http://www.megunolink.com/how-to-detect-lockups-using-the-arduino-watchdog/
How often do you read from the DHT11, might not be an issue. But think you need to wait 1-2 sec pr. poll. (Depending on DHT11/22)
Just add blink code or add an ekstra led to see if the code is running..
And you have added a cap for the radio ?
Try to add a blink, just to see if the board crashed/freezes. If not it's properly the radio.
What are you powering it with ?? 5v usb or battery ??
I was looking for the same thing. I need to implement a status on the node depending on the status of a device on my Vera. But from what I can read we "only" can read last reported value from the controller. That does not guarantee that it's valid compared too current status in the Vera.
Guess you might need to create a script on the vera that updates the status to the controller ?
Ran the nRF24 GettingStarted and got this from two different nRF24's
Standard nRF24L01+
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xa8a8e1fc62 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xff 0xc4 0xc5 0xc6
TX_ADDR = 0xa8a8e1fc00
RX_PW_P0-6 = 0x20 0x20 0x20 0x00 0x00 0x00
EN_AA = 0x3b
EN_RXADDR = 0x07
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x06
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_HIGH
nRF24L01+ with Antenna
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e7e7 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x00 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_HIGH
The one with antenna's adresse looks kind of "strange", but don't know if we can read anything out of this ????
So can we identify the "fakes" vs "real fakes" by dumping chip info or is that 100% faked to?
Yes, Nano is a bit bigger, but have own usb-serial chip so you can program it directly and have onboard 5-3.3 output. Keep forgetting that:) So if size is not an issue, got with the Nano...
Check the connecting radio and Connecting Ethernet Gateway. And get some 5.0->3.3v voltage regulators. Dirt cheap on ebay.
For ease of use I would go with the Uno + W5100 shield. Not that much more expensive vs using a Pro Mini, you will have less wiring. And then use Pro Mini's for sensors..
Check this, very good take Dave have on it.. FTDI Gate
I got hit hard at the time, had 5 chips that stopped working, was going MAD until I figure it out.
Was looking into the same and ordered 2 different 230/110v to 5v of ebay to get a cheap 5v powersource. Just got them today.
The White around $1.5 and the Black was $1.0
Before wirering everything up, I just added the smaller white's pcb to the black case incl. radio and pro mini. And there is room for a bit more.
So unless it goes up in flames I will try to create a default sensor node.
Can't remember the specs. "Normally" 3.3v is something like 3.0-3.6v..
Just did the google thingy.. 3v-5v:)
@dakky Well you can do the gateway for around $13ish and thats easy. Adding the gateway module to the running OpenHab could be easy if they can coexist. I have not done that, so again, it could be easy. But since you are just starting out, keep it easy.
And afterwards, you can reuse the uno for other projects..
OpenHab on a pi is a good choice.
I would use an Arduino Uno with an ethernet shield for the MQTT gateway, so much easier to setup.
A good 18650 3.7v battery should give you more than 6 months if you power trim you sensors.
And the transmission would be by using NRF24L01+'s.
So all about making it easy for yourself:)
So to answer you question.. Yes, should be easy to achieve fairly fast.
That lib only supports HW SPI(from what I can see) and I would need it for Pro Mini's. But tried it on a mega, almost same issue.
Did some more testing with same result. I checked the datasheets , and from what I can see, it is depending on a stabel reference voltage.
Was driving my pro mini with 5v and then regulating it to 3.3v for the MAX31855. So dataline was 5v and max31855 was 3.3. Even if this is within spec the macx31855 board I got was as cheap one, so it did not filter the voltage/data input for the chip.(Looks like the Adafruit board does?) Moving the regulator in front of it all, driving everything with 3.3v it's as stabel as could be expected.
Green is a DS18B20, Blue a DHT21 and the black is the ThermoCoupler.
Nope, using the Adafruit.. Will try this !!
Anyone done anything with this ??
At room temperature it fluctuates up to +5 (c).
Measure with the probe in the fridge at -18(c), +9(c) It hit's the -18 after around 30min, but settles after another 30min at -9
Is there a Thermocouple lib with build in correction ??
Sounds like the same issue I had.. Some time it would run for a day other times it would stop responding after an hour or so.
After reboot it was back right away. So it looks like the ENC28J60 chip is crashing.
For me fideling with it and droppinglines to 3.3v running at 8mhz worked(And working was having it up and running for at least 3-4 days compared to "normal"). But I remember seeing others having ENC28J60 issues to ?? Maybe you should check to see if you are running latest ENC28J60 Lib ??
Just rechecking the specs, and the ENC28J60 should be 5v tolerant ? I ran my at 8mhz using the internal clock.
So if it was the levelshift or 8mhz that "fixed" mine is a good question.
Have to add that the Uno+Shield I am using now for the gateway is a W5100 simply because I ordered the W5100 shield when I started having the issues.
(And this have also been running flawless from day one!)
Have had this problem. And I am pretty sure it's a power issue. Running 5v lines on a 3.3v. Works flawless when I pipe the ethernet lines through a 74LVC245 or when I replaced my "base station" with a Uno+Shield.
So try a level shifter or try running it with a 3.3v(3.7v) power supply to test ?(Remember to set the Arduino to 8Mhz so it's not overclocked)
/Mads
You have 3 components.
Sensors. Arduino + Temperature Sensor + NRF2401 module.
Gateway. Arduino + NRF2401 + Ethernet/Serial interface. This is where the sensors sends data. So the gateway is a hub for all you sensors to connect to.
"Controller" In you case OpenHAB, I have a VERA running..
Sensors delivers data to Gateway.
Gateway talks to Controller and deliver sensor reading.
Your openHAB Pi is your control center where you read the data and/or execute rules ect.
/M
Most will be of the DS18B20 kind. But still, a good silicone sealant around the sensor should still make it watertight.
/M
Even if you can't do a directly 2% -> 100% calculation because of different discharge rate. Thats really good. What capacity is the battery you are using ?
Making a few for around the house. Also making one in a watertight case for outside. Only "issue" could be that lipo only are rated for -20(c) so think I will try with some nicd for the outside one.
(Living in Denmark, we properly get a MAX of 5 days below -20(c) if at all, so purly luxury problem:)
/M
It's really hard to calculate usage on a battery.
What Thomas is doing looks about right. But there is a lot of variables. So even some minor differences can tip the calculation. But again as above, 778 vs lets say ~500 days. Both are good for me.
It's more interesting if we talk 7 days vs 7 months. So in this case I am good with both calculations. As long as I get months even 1/2 years I am good.
/M
No, the 300days is purely a ballpark figure. But let's say 250-350 days with a DHT22, depending on the battery, brand, temperature ect.
The point was the 0.02mah in sleep mode. So with a good slowdrain battery thats still gives you a very decent runtime.. But of course, this only applies to usage where long sleep time is not an issue. Or even some interrupt controlled applications could keep the power usage very low.
/M
I know this has been brought up before. But I thought I might as well share my expirence.
I have made 3 measurements, running the default Humidity sketch on a 16Mhz Pro Mini powered by 3.7v. Sleeping for 60 sec.
To quickly sum it up:
.................................. Sleeping........ Reading sensors(2 sec)
Normal mode : 2.48 mah......... 11.00 mah
No Power Reg: 2.07 mah......... 10.87 mah
No Reg and LED: 0.02 mah..... 8.90 mah
Notice the green No-LED, Had to teste with another multimeter thats more precise, but still got around 0.02mah.
So running on a 2500mah 3.7v battery gives me 300days plus. Thats pretty good if you ask me:)
/M
So I did use some time to implement a gw with local sensors.
And to be honest I gave up.. The existing code is awesome and don't have that much room to implement it. I did make some progress, but all that would be undone with an update.
So compared to the time it took me to wire up an Arduino Pro Mini with humidity and temperature sensor(20min) and the cost of it. My life is to short:)
/M
So I have had the issue with programming my Nano 3.0 because of the fakeFT232R chips.
Using FT_Prog to change the nulled id back to 6001.
So I just wanted to check for anything else, so I just had a look around and saw that output power was set to 90mA. Changing this "back" to 500mA lo and behold, I now have a working Ethernet Gateway
So could anyone else please try this ?
/M
http://www.ftdichip.com/Support/Utilities/FT_Prog_v3.0.56.245.zip
Thanks for the info. I will try a see if I can get some time during christmas. At least give it a try..
/M
Though so.. Will try to see if I can rewrite/add gw.local.send based on the original code.
/Mads
Hi,
Got a Vera Lite and would like to start out with only one nano acting as an Gateway and for a start do some basic onewire temperature operations. Later one I can all ways add more nodes when I need them(If I need them).
So can I do a "gw.send(msg.setSensor(i).set(temperature,1));" from within the gateway code and that way makes it act both like a gateway and a node ?
/Mads