@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: 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: Status of my rv(camper) home automation system 2020-2025
I think it's pretty cool. I can hear my spousal unit asking, "What are you doing with all that data?"
-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: 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: Keen to build again
@Homer I suspect the lack of interest is because there isn't much in the way of support anymore. Worse yet, I just (12h56PDT, 8 Aug 25) tried to go to the home page and it was not available. @mfalkvidd is very knowledgeable and, like me, shows up from time to time.
I think MySensors is the best "frugal tech". You can build a plethora of sensors for under USD$5 (plus housing).
I like tasmotized ESP8266, too, but that uses WiFi. These are automatically configured by Home Assistant (with the Tasmota integration). Most home routers max out on WiFi connections at 20-25, though. ESP devices can be programmed with c++ using the Arduino IDE. When configured, they can be OTA (Over-The-Air) reprogrammable.
I am under the impression that an ESP device can be a gateway. This would require the device to have a radio (nRF24?) so that MySensors sensors can connect through it.
But, the process to configure the gateway is on the homepage of MySensors. I hope it comes back
-
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: 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: 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: 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
-
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: 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
-
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: 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: Water Filtering and Sterilization and Hot Water Recirculation
Do you do gizmos for open heart surgery, too? I love all the valves!
OSD
-
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: 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'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: Nb of possible nodes in a mysensors networks with domoticz
@Sasquatch I do see what you mean about RTFM. Of course, that's the way one would do it if one only had one or two devices. My suggestion was biased by my situation
I have 7 nodes that have identical code except for the node number. The location of the sensor and the node number are linked and I keep track of these. The challenge is that when I update the code, I would have to compile it 7 times. But if the node number is in the EEPROM, I only have to compile it once. (My code takes several minutes to compile.)
This is how I upload the code multiple times without compiling multiple times:
With [in Preferences] Show verbose output during ... upload checked, I compile and upload to one of my devices. I capture the third line which looks something like:
"C:\Users\**user**\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\**user**\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM14" -b115200 -D "-Uflash:w:C:\Users\**user**\AppData\Local\arduino\sketches\B27BE0BD09045C16054140637AB4EF50/Blink.ino.hex:i"
Then I export the binary (sketch--.export compiled binary or <ctl><alt><s>) The exported binary file name is Sketchbook location/sketch name/build/arduino.avr.nano/sketch name.ino.hex. eg.
C:\Users\**user**\Documents\Arduino\_Blinkx\build\arduino.avr.nano\_Blinkx.ino.hex
This file name will replace
C:\Users\**user**\AppData\Local\arduino\sketches\B27BE0BD09045C16054140637AB4EF50/_Blink.ino.hex
in the above captured command. (between"-Uflash:w:
and:i"
)To upload the file, without compiling, paste the modified command into a command line window:
"C:\Users\**user**\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\**user**\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM14" -b115200 -D "-Uflash:w:C:\Users\**user**\Documents\Arduino\_Blinkx\build\arduino.avr.nano/_Blink.ino.hex:i"
I tried to be as generic as possible. Mine is a windows installation. user is replaced with your-user-name. My program was a saved version of Blink. My com port "-PCOM14", was 14. The location of the download program and the configuration file are also installation dependent. That's why I copy it all from the upload output.
OK, I have to compile twice, but only 1 time would I have to compile twice, because subsequent changes I would export-compiled-binary and use the same command.
When a device fails, I put the NODE_ID of the dead device in to the EEPROM as above and load the program.
So, yeah, RTFM. But sometimes the FM is doesn't connect the dots. That's why we have the forum. And, truly, thanks for the comment because I wasn't clear as to why I did it in such a convoluted way.
-
RE: Ghost Child
@FcNanoLed I'm a Home Assistant (HA) user so I don't know if this is applicable to you.
I am assuming here, because your nano is connected to your RPi through a USB port that your nano is running MySensors Gateway code. I believe that both gateway and node code has to have a radio connected to start. So I assume this, too.
The source could be an errant RF signal caused this, though unlikely.
Ghost devices in HA also show up when a device gets assigned a new node on a reboot, or were deleted improperly, eg. not deleted using the controller environment.
In either case, what has to be done in HA is basically remove all vestiges of the MySensors environment best you can.
- Ensure that the code on the device(s) that has the sensors (child) is(are) working properly
- Power down this(these) device(s)
- if you have a gateway, stop or power it down
- Delete this(these) device(s) from the host program
- Delete the integration (this is what the code running in the Controller is called in HA)
- If you use MQTT, use a program like MQTT Explorer to remove all vestiges of MySensors.
- reboot the Controller (HA in my case)
- reinstall the integration
- restart the gateway
- At this point you may still see the ghost!
** list itemFor each ghost, create a device that looks like the ghost then delete it using the controller interface.
** Then reboot the host again. - finally reconnect all of your valid devices.
Yes, it is a pain in the ***! Has a lot to do with recoving after a power failure, backups and trying to accomodate all possible scenarios.
Hope this helps
-OSD
-
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: 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: Door chime
@Paul-Scarbro There are multitude of solution, but since we are in MySensors Land, let's do a MySensors solution. You'll quickly see that doing that adds a lot of overhead.
We'll use an Arduino Nano or RF Nano if you're going to go whole hog. It can be run from 3.3V or 5V DC, not AC.
The reed switch would be connected to an input of the Nano and one of the outputs would drive a relay. The relay would drive the chime.
Your C++ program would be something like:
#define inputButton 2; // connect reed switch here #define outputRelay 4; // connect relay to this pin see MySensors Relay example #define RELAY_ON 1 // GPIO value to write to turn on attached relay #define RELAY_OFF 0 // GPIO value to write to turn off attached relay void setup() { pinmode(inputButton,INPUT); pinmode(outputRelay,OUTPUT); // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: if (digitalRead(inputButton) == 0) { digitalWrite(outputRelay,RELAY_ON); wait(2000); // wait 2 seconds digitalWrite(outputRelay,RELAY_OFF); // now wait for door to close while(digitalRead(inputButton) == 0) ; //does nothing until reed switch opens } }
There are some subtleties that I may have glossed over, but this is the gist.
By looking at the MySensors Relay example, you'll see how to integrate this into a MySensors environment. That's where you'd want to get the RF Nano.
I've made the assumption you're familiar with the Arduino IDE and you've looked into the MySensors environment.
-
RE: DHT22 wrong sensor type in Home Assistant
I'm going to make an assumption: You have connected to Home Assistant many times during your development.
Home Assistant is not very flexible with MySensors. If you change Child_IDs it sometimes ignores the change.
Try deleting your MySensors device. This is not a friendly operation. Assuming that your Uno is acting as a serial gateway and as your sensor monitory device,
- disconnect the Uno from your computer. th
- In HA: settings-->Devices and Services-->n DEVICES in MySensors integration-->click on device your going to delete-->3 vertical dots next to Remove Device from MySensors-->>Remove
Then restart HA - Developer Tools-->restart-->restart
After HA is restarted, plug your Uno back in
If your MySensors gateway is MQTT you have to stop the MQTT gateway and delete all vestiges of your device in the MQTT broker (I use MQTT Explore to do this which has to be running befor you do anything to see the topics that will be erased.)
Let us know if that fixed it.
OSD
-
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: 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
-
Interface-board-for-remote-control
I had many problems trying to bring my motor blinds into my home automation. What I ended up doing was having an Arduino Nano push the buttons of a remote control.
For the Arduino part, I started with the GatewaySerial example.
What this project shows is how to connect to a remote and get some primative feedback from the remote.
So far it works pretty well.
Find the project on my github page
-OSD
-
RE: Raspberry Pi 5: invalid GPIO 9
@igo As you may be aware, MySensors is not well supported these days. In fact, the support comes from people like you and me who still find value in MySensors.
That said, search for a replacement for raspi-gpio. There may be a few. See if they work. It's important to the MySensors community that you report your success or failure to do so.
I've done this sort of thing before and learned a lot from the experience. Let us know how it goes!
OSD
-
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: 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
-
Soil Moisture Sensor Powered by solar charged battery
A seemingly simple project that employs some challenging programming techniques: calibration, power failure recovery, low power usage, two way communication with Home Assistant, 3D enclosure and more ...
See Remote, Solar Powered (with battery backup) on github for more details
This device is a soil moisture sensor that determines a relative number between 0 and 100 indicating completely dry to entirely wet. The number is sent to a controller for further analysis and/or action. It is battery powered and the battery is recharged using a small solar panel. The device is required to be calibrated and the calibration routine is part of the software.
The components are: a soil moisture sensor, an Arduino Nano with an nRF24 radio, an 18650 Li-Ion battery, a charge controller board and a solar panel. The housing is made up of 3D printed parts.
This device is part of a system that also includes a gateway and a controller.
-
RE: HW-488 infrared sensor not detecting properly
@jaydenlord Probably you do. If you leave the EN floating, electrical noise could cause it to enable or disable randomly.
Some enable pin require a HIGH, some LOW. Connect it to VCC to see if it works more consistently. If it doesn't detect, connect it to GND.
If one of these works, then the part wasn't designed to be in a default state of enable.
Let us know your results (I found this video
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: 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: 💬 MySensors InCan double light switch
The author has done some good work ensuring good design practices; trace separation, fuses, etc. but I don't see any extra I/O brought out on this particularl switch. You would have to carefully solder to the chip itself, and modify the code a bit.
You could use magnetic switches. Put a magnet on the blinds and the switch in window sill.
The author notes that this is not an Arduino, but uses the same chip that the Arduino uses. The author doesn't explain how the chip is programmed. This method could have been used.
It may be just as easy to use an RF Nano with a little power supply. This suggestion is not nearly as robust as the author's. For example, these power supplies have gotten bad reviews mainly because the mains power traces are too close together. I justify using them because in all likelihood a failure will pop the power supply and probably the Nano, too, noting that these are cheaper than the fuses you would put in to protect them. I am fully aware of the risks involved in doing this, and you should be, too (eg. burning down your house).
-OSD
-
RE: Newbie: confused by the jargon, needing simple guidance...
@Meldrew-s-mate Digital Communications is a pretty nebulous subject. Just to name the protocols is a daunting task.
That said, I'd suggest limiting yourself to the application layer That is, what you can do by connecting to the host with a web page. You'd need to know the IP (internet protocol) address of the host. That would be in the the form of nnn.nnn.nnn.nnn. You'd open a browser and in the address field, enter https://nnn.nnn.nnn.nnn
For example, your typical home router has and IP address of http://192.168.1.1 You open that in your browser and you are able to configure the router. You can determine the router's IP address by opening a command window. In Windows that is: <windows key> then type cmd <enter> (I don't speak Mac). This is called the command line (cli). Then execute the command ipconfig. You'll see default gateway: That is your router's IP address.
When you write "how data is 'packaged' for transport" you're asking about very low level programming. This is something that is done in a library of a high level language (eg. c++). For most of what is done in home automation, even the high level language is already written for a significant portion of what you would do.
But if this is what you want to learn, start with MQTT. Read the MQTT documentation. You won't understand it in the first read. But then install an MQTT broker on your computer (search, "Install MQTT broker"). You can use command line (cli) commands to publish (write) and subscribe (read) topics. Get MQTT Explorer (easy search) to observe what is going on in the broker. All of this you can do right now.
Once you get a feel for that you could get a Raspberry Pi. You'll have to install the OS (operating system), which is well documented. Then search for "write to an MQTT topic using Raspberry Pi"
This "data from different transducers (sensors) share a common language." is the home automation controller (eg. Node-Red). Right now home automation is still nerd-land, but it is on the cusp of going mainstream. This means a lot of trial-and-error.
Do your experimenting on a computer other than the one you use regularly. A Raspberry Pi works well for this. Or, back up your computer; you're going to crash it.
-OSD
-
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: MQTT losing messages...
Check out Serial Protocol
I have four Arduinos. Each has a different MY_NODE_IDs (I use 130, 131, 132, 133). Each has four sensors: moisture, humidity, temperature, and voltage each of which has a CHILD_ID: CHILD_ID_MOISTURE is 0 , CHILD_ID_HUMIDITY is 1, CHILD_ID_TEMPERATURE is 2, CHILD_ID_VOLTAGE is 3.
When an Arduino makes a measurement, it sends that measurement to a unique MQTT topic. In the case of the Arduino with MY_NODE_ID of 130 that is sending the moisture measurement, that MQTT topic is mysensors_out/130/0/1/0/35 and the message is [something like] 760 (35 is the value type)
Similarly, when a controller sends a command to a device (Arduino), the topic is unique.
If you have two actuators with the same MY_NODE_ID and CHILD_ID (MQTT topic) there would be confusion as to what you want each actuator to do. Likewise, if two sensors had the same MQTT topic, how would the controller know how to handle the data.
-
RE: Cannot find the board: "Arduino Mini pro MYSBootloader"
I've never used the MYSBootloader firmware, but I am intrigued by being able to upload code Over the Air (OTA).
My brief research came up with this link to MySensors Forum thread: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta. It may be of some help to you.
-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: LGT8F328P and MySensors
@paede said in LGT8F328P and MySensors:
LGT8F328P
There are some instructions on this page? Here's another link that might be helpful.
I know nothing about this device other than the google search I just did on. Some red flags went up for me. The use of software for the third party board, and a newbie extoling its virtues. (astroturfing)
Even if you get it running, it may not work with MySensors. I bought three official Nano Every's with your same hopes and expectations. It claimed to be a direct replacement/upgrade. First, the MySensors nRF24 software did not work. Then I was unable to find a reliable way to put the Every into deep sleep.
I've had pretty good luck with the Nano clones on AliExpress. I'd recommend getting the RF Nano because the radio is built in. Before I put one into production, I spray it with electrical lacquer to prevent corrosion. That said, as with everything else you get on AliExpress, caveat emptor.
It will be appreciated if you get it working and present the details here as to how you did it.
-OSD
-
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: 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: MQTT-Help me understand about the MQTT Gateway.
@dpcons MQTT sounds intimidating and looks imitimidating when you see all of the options available.
Here's the scenario:
- You want to send a message. That's the -m option followed by a space and the message between " "
- the location, topic, is a tree, -t option, separated by forward slash / eg. MyRootTopic/MyTopicsSub/MyTopicSubSub
It's as easy as that if your broker, the MQTT service (program) is on the same computer as the sending program. Usually it's not.
- Specifiy the location, the host, of the broker with the -h option followed by the host name or IP address
The retain option, -r is important but explaining it is beyone the scope of this message
Receiving, subscribing, to a topic is just the same, but you wouldn't have the -m message
If you subscribe from the command line, the subscribe function waits indefinitely for messages published to the subscribed topic (unless you use the -C option) ^C to terminate the command.
A tamotized device with the MQTT configured will create a number of topics on the broker. Home Assistant will see this automatically, if you have the Tasmota and MQTT Integrations installed.
The MySensors MQTT gateway takes care of MQTT communication for a MySensors device. Again the MySensors and MQTT integrations.
I use both.
-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
-
RE: Keen to build again
I can't speak to the subtle differences between 2.3.2 and 2.3.1. I would advise on proceeding, whether upgrading or not.
A gateway to Home Assistant can run on an Arduino Nano with an nRF24 radio (or RF Nano found on AliExpress). This gateway can connect to Home Assistant via the serial port of the computer running Home Assistant.
I see that there is still a Vera integration on Home Assistant. You could probably pick up where you left off.
Yes, MySensors popularity has waned, but there are a few of us die-hards that check in from time to time. Please continue to share your experience.
OSD