@NeverDie I am happy to report that my batteries arrived yesterday!
Best posts made by OldSurferDude
-
RE: What's a good power bank for use with IoT?
-
RE: What's a good power bank for use with IoT?
@NeverDie
I'm going to dissipate the energy through a 25 ohm resistor. It will take about 24 hours to perform one capacity test. Often times I read that the full capacity won't be available until after a few charge-discharge cycles. 2 resistors, 4 batteries, 3 tests each. Assuming that I stay on top of it, it will take at least a week of testing which won't start until I get my 25 ohm resistors. I'll post a link to my full write up. -
RE: What's a good power bank for use with IoT?
OK, I did my battery test. @NeverDie @Nca78 @mfalkvidd
You can find it hereThe batteries from Newegg and Fullbattery are good ones.
If you going to buy a large quantity and looking for a low price, then you should buy 1 or two and test them as I have done here. You might have to "kiss a lot of toads" before you find a good vendor, though.
OSD
-
RE: Saving last known good state, but not in EEPROM
@eiten said in Saving last known good state, but not in EEPROM:
This is exactly what I am seeking! Thank you!
PS I truly enjoy reverse translating! It teaches me how to better understand my first language and it gives me alternate words to use in searches. So a second thank you!
"Regelmässiges Zurücksetzen" would be best translated to English in this context as "Periodic Reset". In the English version of Home Assistant it is called "Meter reset cycle" (I remember seeing "keep dry" translated as "do not take in shower with you"
-
RE: Beginner concept question for serial communication
@hubertus I'm not getting the description of you setup. Perhaps a sketch would be good?
Wen I need serial communication, with the Arduino, I use SoftwareSerial on two other I/O lines. That way I can debug real time, SoftwareSerial is slower but you're only doing temperature so 9600BAUD would be fin
Also, don't try to do too much at once. Break the task down into small, manageable sections. You have a lot of different things going on, get one thing going at a time.
OSD
-
RE: What's a good power bank for use with IoT?
@NeverDie I like your suggestion for solar panels, though my application only requires 1x 5W panel. And I like the idea of dismantling the power packs.
I think we differ in our approaches, though. I seem to enjoy living on the "bleeding edge", that is, I'm more of a risk taker. My first house solar system, 2.8kW, was installed in 2004. When I upgraded to 4.2kW, I took the 14 panels and installed them on my hillside, so now I'm a net energy exporter. The 2.8kW portion is still producing at 85% of nameplate, shows little environmental degradation (sealant, too), and has paid for itself. The reward outweighed the risk.
In taking risks, I learn much. Yes, I have a quite a few scars, actually and metaphorically. I have discovered a philosophy: Everything is an experiment. The point of an experiment is to learn something. So every experiment is a successful, just that sometimes the desired results are not realized. Eg. leaving an Arduino outdoors results in a short useful life. Spraying on a sealant extends the outdoor life.
Good discussion. Thanks for the ideas
OSD
-
RE: Where did everyone go?
I'm new-ish to MySensors. I came here because I was looking for a gateway from RF24 to MQTT and I'm well on my way to getting the MySensors version to work.
Why isn't MySensors working? I find two things really frustrating. The documentation is spotty at best. It's taking me days to get as far as I have. When I write up my own procedure for my own documentation, I find it's maybe just 20 steps, but each step needs a detailed explanation. For example, through a lot of trial and error, I found that to turn on the relay in the relay with button example I had to publish a message of 1 to the MQTT topic mysensors-in/13/1/V_LIGHT/0/2. Only later did I find the Serial Protocol 2.x. But it does't show a V_LIGHT nor S_LIGHT. Yes, I figured out that example is out of date, but that's part of the point I'm trying to make. And how did my node ID become 13 and stay 13 when I press reset on the Arduino?
You can see more detail on my frustrations in the MQTT gateway discussion
Which segues into my other frustration. about documentation. Many members offering advice do not provide links to their statements. For example, in the MQTT gateway discussion:
gohangohan MOD 3 Sept 2017, 13:15
(at)Richard-van-der-Plas "Just clone the 2.2 dev instead of the stable, the rest is the same
(emphasis mine)How does one do that? Particularly in a world where case is important and there are three different quote marks, (excuse me, one is sometimes known as a gravé) all with different meanings.
There are many like you @NeverDie who know MySensors in-and-out. I am an experienced hardware and software engineer, retired (one of the engineers that developed ink jet printing and one of the engineers that developed a navigation system for the 747) It's not like I don't have a fundamental understanding of what's going on here. I have yet to find a way to search the forum other than using google search.
Don't get me wrong, the MySensors concept is great and functions pretty well, but if it's not well documented, then it is useless. Then when someone asks a simple questions only to get an answer with no explanation of the how, the newbie and experienced alike don't bother with the forum because the forum offers no help, either.
We had a poster at HP (when it was a great company) "No job is done until the paperwork is complete" (image of person sitting on the toilet)
-
RE: What did you build today (Pictures) ?
@NeverDie It is my understanding, though I can't wrap my head around it, that it is the length of the conductor that makes the antenna tuned to a certain frequency. If this is the case, you could run your antenna around the edge of your circular pcb which would make the effective radius only slightly bigger.
-
RE: How to optimise a code (95% memory used)
I found that timelib.h uses a tremendous amount of memory. You avoid using it by getting time string from the controller.
I have also found that when you're using that amount of memory that bad things happen, as you noted. I use global variables to avoid the transient nature of function variables.
I'll be looking forward to other comments as, I, too, do not know all the tricks;)
OSD
-
RE: What I must buy in order to measure mAh please
@DenisJ Are you measuring a USB device? Look at something like this https://www.aliexpress.com/item/33019457512.html?gps-id=pcDetail404&scm=1007.16891.96945.0&scm_id=1007.16891.96945.0&scm-url=1007.16891.96945.0&pvid=824c24fa-034b-4801-b51d-50b2ad877945&_t=gps-id:pcDetail404,scm-url:1007.16891.96945.0,pvid:824c24fa-034b-4801-b51d-50b2ad877945,tpp_buckets:668%230%23131923%2330_668%230%23131923%2330_668%23888%233325%239_668%23888%233325%239_668%232846%238110%231995_668%232717%237561%23332__668%233374%2315176%2335_668%232846%238110%231995_668%232717%237561%23332_668%233164%239976%23761_668%233374%2315176%2335
(AliExpress: Cheap prices and one could question the quality, but for the most part they work. Shipping takes about a month. rarely faster)
-
RE: How to get Water Flow Meter to record lpm to computer
I would be interested, too. I found just the sensor on Amazon and it looks like the meter is just timing the pulses per second. With a constant, one can determine the LPM You may be able to tap off of the sensor input, then through a resistor voltage divider make the output of the sensor compatible with your micro controller (Arduino). Using Processing on your computer you can capture the data from the Arduino.
Have fun!
OSD
-
RE: Future(s) of home automation (networks)
I, too, am a "gray hair" (if I had hair). I despise cloud dependent devices. The reasons are many. ISPs, despite what they say, are not reliable. ISPs are so close to be monopolies, that they act like them. Your ISP can, and will, prevent access to the cloud if they have a competing product.
The manufacturers of cloud dependent devices, sell your information and statistics on how you use the devices. This is how they make money. When one of these manufacturers goes out of business, the company that buys up the IP continues to sell that information and ceases the little support that one did get.
I might be getting a little paranoid here, but I'm pretty sure there is unrelated-to-function software (spyware) incorporated into many products. (In the late 90's, the company for which I worked resisted the temptation to do so, despite heavy pressure from marketing.) I call it "ET phone home" Maybe the software is innocuous enough, but it can be hijacked by bad actors.
There is another problem plaguing home automation and that is poorly designed and poorly documented (which leads to pathetically supported) hardware and software. More so the latter. FAQs and forums are afterthoughts of the slothful, but now it's all we have.
I agree with ProfRob and I would add "better documentation".
As a note, when I pull on my pants, I sit on my bed, start my pants onto my feet, roll back and pull both legs up at once
-
Send configuration (numbers) from HA to Arduino
I would like to make changes to my Arduino sensor after it is deployed. I have developed an autocalibration scheme, but it needs its zero point set, which can't be done until it's in its final location. Yes, I suppose I could, with long wires, connect a push button to an input. But that doesn't completely solve the problem because I need to send a number that can be interpreted to be the interval between sending data to HA.
This is my receive routine:
//-------------------------------------------------------------------------receive void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.getType()==V_VAR1) { ConfigurationFromMySensors = message.getLong(); } }
In HA, I would pack the information in a 4 byte integer (long) and unpack it in the loop where I would operate on it as needed.
But how do I send the 4 byte integer from HA?
Thanks for your consideration and hopefully, help!
OSD
-
RE: Raspberry Pi 3 (RPI 3) gateway initialization loop
@Oumuamua When you set
--my-controller-ip-address=127.0.0.1
you are saying your MQTT broker is on the same machine as your gateway. If, on your RPi you installed your broker with (what I do)
sudo apt install mosquitto
you will have to add the lines to /etc/mosquitto/mosquitto.conf
allow_anonymous true listener 1883 0.0.0.0
After that, reboot.
Alas, this may not fix your problem. I see you're looping on connecting/connected/sent. I make the assumption that the debug message aren't quite accurate because ... well ... sometimes they aren't.
Let us know if this works
OSD
-
A low cost energy meter
I am curious to know if my heat pump is actually saving energy. To know this, I would need an energy meter. So I designed and built one. You can see my projoect and I believe it is sufficiently documented for you to build your own. See Energy Meter
My nephew has done the same and is as curious as I. But he knows nothing of MySensors, and how to get the data presented in a reasonable way. I explained to him it is a small matter. This turns out to be not so. Beyond the aforementioned energy meter, it involves an Arduino MySensors Gateway (hardware and software), Home Assistant (software), Virtual Box (Software), and an i86 computer (hardware) which is running linux (software). Just writing that makes the project sound intimidating. It is not, if you break it down to its constituent parts.
The Arduino Serial Gateway (GatewaySerial) can be found as an example in the Arduino IDE, once the Arduino library is loaded. This probrammed Arduino will be connected to the target computer vie the same USB cable used to program the arduino. For my environment, I have some modifications. The wiring of the radio to the Arduino Nano is slightly different. CE is wired to D10 and CS is wired to D9. Also, I am using radio channel 86. These changes are reflected in the following three lines which are added after the line
#define MY_RADIO_RF24
#define MY_RF24_CS_PIN 9 // for compatibility with RF-Nano #define MY_RF24_CE_PIN 10 // for compatibility with RF-Nano #define MY_RF24_CHANNEL 86 // 86 is the development channel 121 is the production channel
Acquiring an adequate computer for the task can be as simple ordering one from Amazon for around UD$85. Discarded laptops can be found for as little $10 sans battery and power supply. The only important requirement is more than 2GB RAM.
See information about SSH below
Installing Ubuntu on the computer is tedious but easily done. These instructions are for the server version of the operating system (OS). This version has no graphical user interface (GUI). You will need a monitor and a keyboard. If network manager is not installed (nmcli d doesn’t work) or nmcli d doesn’t indicate a wireless network, the internet port will have to be used. If there is only WiFi, a network client device, which connects to the internet port, will have to be used. Official instructions
Installing Virtual Box is also a tedious task. By this time you’re pretty used to using the command line.
Finally, installing Home Assistant will be the training session for working with Home Assistant.
Information about SSH
SSH is programs running on your usual desktop computer and the target computer. When you installed the operating system on the target computer, you entered a username and and password. Once the target computer is up and running, and you’ve found it’s IP address (ip address) you can “ssh” from your usual desktop with “ssh username@xxx.xxx.xxx.xxx (the IP address you just found) You will be prompted for the password.This is just like being at the keyboard and monitor of your target computer. EXCEPT, you can now copy and paste from your usual desktop computer into the window of the target computer. That is, you don’t have to fret about typing in all those commands.
Challenge yourself! It's all do-able and you can do it!
OSD
The answer to your first question is, "Yes, you can do it!"
-
RE: Can I use MySensors library to have one Sensor Transmitter and one Receiver without any Gateway
One little project and you're hooked! You know you're going to want another sensor in the yard, so consider a gateway running MQTT (called a broker). Once you have that, it's really easy to add more sensors.
But if you're really strong willed an will only be using two devices ever, you might look at https://nrf24.github.io/RF24/index.html. You can get an Arduino Nano and an nRF24 radio for about $3.50 from Aliexpress (downside: delivery takes ~2 months, so get 10 each.)
MySensors Library can do this, too, but I find it a little bloated.
Personal note: I'm 70, retired engineer, and have only four projects going right now.
-
RE: Send configuration (numbers) from HA to Arduino
@mfalkvidd Thanks for the tip! It led me to the Home Assistant page that explains how to do it. I'll be having a look at that and report back what I find.
-
RE: No LAN connection ESP8266 gateway
When I saw 2.6.2 I was thinking the MySensors Library (2.3.2)! It never occurred to me it was the board manager.
So, yes! it works for me.
I just checked to see if Domoticz has an MQTT interface and it appears that it does. @Bramz, look into that. Once you have that, then it may be easy to connect other devices, like Tasmota devices, to Domoticz. MQTT requires an always-on computer connected to your network.
I have a headless (needs dummy monitor plug or 3x 75Ω resistors to boot), refurbished computer on which I run Linux OS, then both MQTT and Home Assistant running in Virtual Box.
Thanks everyone!
OSD
-
RE: Water Filtering and Sterilization and Hot Water Recirculation
Do you do gizmos for open heart surgery, too? I love all the valves!
OSD
-
RE: What's a good power bank for use with IoT?
I just ordered some batteries from fullbattery.com. I got an email that my order had been shipped. Upon further investigation, I found that only the tracking number had been pulled, but the item had not been received by the shipper from the fullbattery.com.
I've seen this before from vendors that are less reputable. Money is collected and then the vendor orders the part from another source. So the vendor gets the float on the money plus the mark-up. Sometimes, the order remains in this state for months and ultimately, the vendor cancels the order without informing you. When you contact the vendor, only then it is reported that the order had been canceled. Finally, you have to submit a request for refund, which eventually comes.
For me, the jury's still out on fullbattery.com. I'm posting this to see if anyone else has had this experience
-
RE: Send configuration (numbers) from HA to Arduino
@electrik Thanks, I think I can do the same with the MQTT integration (not MySensors MQTT)
OSD
-
RE: Bootloading a barebones arduino
@Larson said in Bootloading a barebones arduino:
once a program is loaded with the ICSP using "Sketch/Upload Using Programmer", no further USB-TTL (USART) programming can occur until "Tools/Burn Bootloader" is subsequently executed.
That is exactly right! Once you have all the wiring (I made up a wire harness for just that purpose) the processes are equally easy.
-
RE: NRF24L01 module help for IoT project!
light travels at about 30cm/nS. The Uno can capture +/- 1μS at best, so, at best, your accuracy will be +/- 30m.
In the nRF24 library I'm using, there timeouts, meaning that you will never know exactly how many μS a network.read() will take, adding multiples of 30m to the best case.
+/-2m is not possible using an Uno and any radio.
Try two GPS's, one on each module with each Nano and take the difference between the two. I'm pretty sure that would meet your spec. (Amazon) Yes, one GPS is rather inaccurate, but the inaccuracy is the same on two relatively close (google "differential GPS") That would be a cool project! And! you could log the track! You can find less expensive modules on AliExpress (caveat emptor and 20-90 days delivery)
-
RE: [mysensors] Not a valid message: invalid literal for int() with base 10: '\x00\x000'
@kiesel
The first thing I would try is to plug the Arduino into a serial port and see if there is output. This would have to be on a different port from the one the HA expects. You can use the Arduino IDE to view the out put. It probably will appear to be gibberish, as the BAUD rate must be right. And it will probably be gibberish anyway because it is probably binary. What you will know, though, is that your Arduino isn't bad.You may have to reprogram your Arduino.
Good Luck
OSD
-
RE: How to make sense of Struct data received from Arduino in RPi via NRF24?
@nrf24_is_hard When I sent data between an Aduino and the RPi I discovered that I have to make the the receiving and the sending structs the same size AND the variables be on 4 byte boundaries. Change your char name[15] to char name[16]
Another challenge is that the number of bytes of type int are different. If I remember correctly, Arduino Uno is 2 bytes and RPi is 4 bytes.
To make matters worse, some compilers make the least significant byte the first byte of a word and others make it the last byte of a word. eg, sending the value 1 would be received as 16777216 (0x00000001 vs 0x01000000)
There are a lot more gotcha's
OSD
-
RE: RFM95W sleep() directly after send() often doesn't sleep radio
@prawnpie This does not surprise me. I was losing data doing multiple sends in a row (node has multiple sensors). Putting a 500mS wait after each send() allowed the data to get through.
Also, 5mA for 1mS is not a significant draw on any battery (5mA * 1mS = 0.000002 mAh).
You could experiment with shorter wait times with
for (unsigned n = 1000;n>0;n--);
then keep lowering n until you find the threshold
And finally, assuming that the radio does have a flag to indicate that it is not ready to be put to sleep, it would be a real effort to put that into the libraries of all radios and the sleep command.
Waiting a milliSecond is actually the best solution and I am duly impressed you found it!
OSD
-
RE: NRF24L01 module help for IoT project!
(yeah, this is really old in tech years, but I post in the event someone stumbles upon this.) I actually tried the GPS suggestion. I was wrong about the error between two identical GPS's. It's quite large. Check out the other suggestion first.
-
RE: What did you build today (Pictures) ?
@NeverDie That isn't what I was thinking but after a bit of research, that's better than what I was thinking.
PCB antennae work better at > 868MHz(pg 7). A 2.4GHz signal should have an antenna length of 3.1cm The nRFl01 spec shows a PCB with an antenna that is about that length but I measure the board I have and the antenna is about 4.6cm(?) Here(pg 10) you'll find a design, though I'm not sure for what frequency as the length adds up to 4.03cm. As you can see, you must not have the ground plane near the antenna.
Here, RonM9 modifies an nRF24l01 making the antenna a dipole. I tried this and did show some improvement, but not the success he had. His wires were ~5.0cm, but bends them in the opposite directions at the edge of the pcb. Does that make the antenna length about 4cm?
The antenna for a longer wave length (lower frequency) will be proportionally longer.
I'd like to do the same testing as RonM9, but I've got some other pressing projects.
I hope this helps your research.
OSD
-
RE: Some"ting" interesting...
@NeverDie Non-internet connected networks still need NTP. I built an NTP server from a $5 gps module, a $3 Arduino nano, a $6 ethernet shield, network cable and a USB cable. A neighbor 3D printed an enclosure for me in exchange for 4 home baked cookies (they're awesome). Just for fun, I put in software for an under $2 display to make a clock.
Should we re-title this thread, "Be Afraid, and here's how to ameliorate your fear. "
-
RE: Help! Is there *any* way to squelch either robocalls or India call center telephone attacks to my phone?
@NeverDie I feel your pain. I use google voice. My strategy is that I never answer a number that is not in my contacts. Google voice has a calls screening feature.
The second part is whack-a-mole. If the caller does not leave a message, I block it, then mark it as spam. Most legitimate callers will leave a message. At first there are lots of moles to whack. I've been at this for years and I get ~10 robo-calls a week. My blocked list must be huge!
When a realtor leaves a message, I text back with, "Thank you for the interest in my property. I am currently entertaining offers in the mid 11 digits. Please be respectful of your time and mine."
Remember, every time you enter your phone number on a form, you will get at least 10 robo-calls.
good luck to us all
OSD
-
RE: ESP32 with LoRa
I am unfamiliar with an ESP32 as a MySensors sensor; though it certainly looks do-able.
Only because you won't be using the WiFi of the ESP32, I'd recommend an Arduino. The ESP32 requires 600mA.
Your radio will use up to 120mA (range of about 2km).
Of course, these power consideration aren't important if you have power at this remote location.
There are a couple of well documented hoops in getting the ESP32 board into the Arduino IDE.
On your RPi, I recommend using the MQTT interface with the MySensors Gateway. This will require an MQTT broker. You could use a public one (not recommended) or set up one on the computer that will be receiving the data into the database.
I use Home Assistant to receive data. MySensors integrates well into it. I admit that I don't know how to extract data from its database, but it provides an easy way to graph the data.
So it goes like this
-
Get the Arduino IDE
Load the ESP32 board
Select the ESP32 board
Using the library manager, download the MySensors library
Start with the example EnergyMeterPulseSensor because your wind speed sensor probably uses pulses. -
On the RPi you'll download the gateway files. The instructions here are pretty good
There are three steps,
configuration (which takes some thought)
compiling (make) (you can run the gateway at this point)
installing (make install) This makes the program run on boot -
Instructions for getting the MQTT broker installed and running are found by searching for "install MQTT broker" You'll need to know the the machine name and/or the IP address of the broker for both MySensors and Home Assistant
-
The learning curve for Home Assistant is tough. Don't be intimidated, you can do it.
Come back here if you need more help.
-
-
RE: GatawayESP8266 - Compile error
I removed both the ESP8266 library and the MySensors library, then re-installed the MySensors Library and then the 2.7.4 ESP8266 library. Works!
I did see that the default number of nodes is 2. I suspect that as a gateway, it can't handle many nodes.
OSD
-
RE: Anybody got one / a few spare minimalist rfm69hw shields for wemos d1 mini?
You highlight a problem, @kiesel. Considering that each board is effectively US$2.50, it will cost about US$2 to send one and will take a week, if not two or three, to get to you. Not to mention the time spent on handling.
I am in the same situation as you, I just ended up wire wrapping and judicious use of double stick tape. Not beautiful, but it works.
Best of luck
OSD
-
RE: Anybody got one / a few spare minimalist rfm69hw shields for wemos d1 mini?
Thanks for the offer @TheoL ! I have moved on to a differenct project. Also, a lesson that I have learned many times, "If it works, don't fix it!"
-OSD
-
RE: Running out of nodeId's
I, too, am duly impressed that you have so many nodes! Please share more.
I run a "test" and "production" gateways, too. I have a compiler directive in the sensor software that allows me to easily switch from test to production.
At one time I was running about 10 Nano nodes and it appeared to me that they were colliding with one another, symptom being slow response times As I remember, that occurred mostly on power up after power loss. Often I'd get two nodes with the same ID. I have since put my ID in NVRAM and that helped.
So I am very interested seeing what you have done.
--OSD