@NeverDie I am happy to report that my batteries arrived yesterday!
OldSurferDude
@OldSurferDude
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)
Latest posts made by OldSurferDude
-
RE: Old hardware migration
@dbemowsk
I will share my limited MySensors experience with you.I'm pretty sure that your old hardware will be compatible 2.3.2 gateway.
I don't think you can have two MQTT gateways. First, I don't think Home Assistant (HA) will allow you to do that. I would suggest you try it, though, but, obviously, back everything up before you try.
Now that said, I'm pretty sure you can have add a serial and/or ethernet gateway. Each gateway would run on a different channel.
I run HA in a Virtual Box (see HA docs for installing it) and the virtual machine is running in an Ubuntu computer.
On that computer I am running my MQTT broker.
It's a little tricky poking a hole for a serial connection into the virtual machine. You have to do this if you are going to have a serial gateway. And you'll have to this if you have a z-wave dongle. (I have a Zooz module and have found the documentation at Zooz for doing this)
I see that you're pretty experienced and I'd advise you to have a development machine on which you would do your experimenting. This has saved me untold grief when things start to get funky. I even developed a script for recreating my development virtual machine because I've buggered it so many times or I want to have a clean install when I'm trying to learn something new. (Latest was ESPHome)
It's a good project and you, because of your experience, won't have any significant problems. Well, if you're not a yaml or python guy, HA is going to drive you nuts.
-OSD
ps, I sent you an email on you switch -O
-
RE: GatawayESP8266 - Compile error
@eiten That's good to hear! Obvisouly I misunderstood the meaning of
// How many clients should be able to connect to this gateway (default 1) #define MY_GATEWAY_MAX_CLIENTS 2
thinking it meant nodes, but as you say, it means controllers.
Considering that one can get and ESP12F, a power supply, and an nRF24l01+ radio for it for about US$3 makes the ESP8266 much more desireable than an RPi at US$56.
There is one thing that is troubling and that is support. Already noted is that the current revision of the ESP8266 board in the Arduino IDE does not support the ESP8266 gateway. It appears that MySensors, too, is losing adherents.
-OSD
-
Gateways
I've been experimenting with gateways. I've been using an MQTT gateway running on an RPI zero. I like this because of the fast (relatively) processor with a lot of I/O (I'm running a 25 zone irrigation system).
I am developing a low cost energy meter and to test it out on my developments system I tried to use a Serial gateway. no joy, see Serial Gateway woes
Then I tried the TCP gateway running on an ESP8266 (NodeMCU 1.0). To get that working I had to reload the ESP8266 library and the MySensors library. It works great! ... but the example is limited to 2 devices connected to it. Has anyone tried more devices? My experience with an ESP8266 access point (which is limited to 4 clients and pathetically slow) tells me that not many nodes can connected to it.
I use Home Assistant as a controller. I did discover that the MySensors integration can run the MQTT gateway and the TCP gateway. I wonder if it is possible to have multiple TCP gateways?
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: GatawayESP8266 - Compile error
@ferro Thanks for checking for me. I'll do that.
OSD
-
Serial Gateway woes
I'm working on an energy meter using an Arduino Nano. My prototype works well. It ships its data off to a MySensors Gateway running on a Raspberry Pi (RPi) which forwards the data to an MQTT broker. Home Assistant picks up the data from the broker. (Home Assistant is running in Virtual Box.) Virtual box is running on an x86 computer with Ubuntu OS) This works
But if I use a MySensors Serial Gateway I can eliminate the RPi and the MQTT broker. I can put the MySensors Serial Gateway on an Arduino Nano.
What happens, though, is that Home assistant recognizes the serial gateway, and the device is recognized but no data is accepted. When I put a serial monitor on the serial port, I see that the serial gateway is sending the data.
Has anyone successully run this configuration: Nano<-->(Nano?) Serial Gateway<-->Virtual Box<-->Home Assistant? (Note, official Uno R3 doesn't work, either.)The MySensors Serial Gateway example is only modified with my pecularities: nRF24l01 CE and CS are connected to Pins 9 and 10 and the radio channel I use is 86. Also, I comment out the #define MY_DEBUG line
Virtual Box is set up per the Home Assistant instructions In addition, a serial port must be configured (enable, Port Mode [Host Device] Path/Address [/dev/ttyUSB0]). the same thing can be done from the command line
VBoxManage modifyvm $VM --usbehci on --usb on --uart1 0x3F8 4 --uartmode1 /dev/ttyUSB0
Where $VM is the name of the virtual machine
)
Here's the steps,- I remove power from the Arduino Nana device
- I must leave the Nano running the Gateway in the USB port becase the Virtual Machine won't start without it.
In Home Assistant - Delete all MySensors devices: settings-->Devices and Services-->Devices(tab)
- Delete the MySensors Integration: settings-->Devices and Services-->MySensors-->Integration Entries (three vertical dots)-->delete
- Using Studio Code Server, delete the mysensors persistence file (it should be empty at this point)
- Reboot Home Assistant. Development tools-->[RESTART]-->Restart Home Assistant (I have also tried the option is uder a
Advanced, including powering off the computer and even re-installing Virtual Box and re-installing Home Assistant in Virtual box) - After Home Assistant returns, I configure the MySensors integration for a serial gateway. One quirk, the serial port is /dev/ttyS0, not ttyUSB0
- I restart MySensors
- I wait a minute
- I press the reset button on the Nano running the MySensors Gateway.
- I wait a minute
- At this point I can (usually) see the gateway in devices, under the MySensors integration, and, using Studio Code Server, in the MySensors persistant file.
- I power of the Nano that is the sensor device.
- I wait a minute
- I ensure that data is sent from the sensor device.
- I wait a minute
- I see the sensor device in the same places as the gateway, BUT none of those places show the data that has been sent.
Yes, it appears to be a Home Assistant issue, but I suspect a MySensors person wrote the integration.
-
RE: GatawayESP8266 - Compile error
@ajongen et. al.
2024 and alll is not well. The unmodified GatewayESP8266 does not compile now
MySensors 2.3.2
ESP8266 by ESP8266 (community) 2.7.4In file included from c:\Users\gferry\Documents\Arduino\libraries\MySensors/MySensors.h:441:0, from C:\Users\gferry\AppData\Local\Temp\.arduinoIDE-unsaved202412-16144-b9g35b.q5il\GatewayESP8266\GatewayESP8266.ino:114: c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'bool can_yield()': c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:96:26: error: too many arguments to function 'bool can_yield()' return can_yield(g_pcont); ^ c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:93:17: note: declared here extern "C" bool can_yield() ^ exit status 1 Compilation error: exit status 1
ESP8266 by ESP8266 (community) 3.1.2
In file included from c:\Users\gferry\Documents\Arduino\libraries\MySensors/MySensors.h:441, from C:\Users\gferry\AppData\Local\Temp\.arduinoIDE-unsaved202412-16144-b9g35b.q5il\GatewayESP8266\GatewayESP8266.ino:114: c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'bool can_yield()': c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:96:26: error: too many arguments to function 'bool can_yield()' 96 | return can_yield(g_pcont); | ^ c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:93:17: note: declared here 93 | extern "C" bool can_yield() | ^~~~~~~~~ c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void esp_yield_within_cont()': c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:102:2: error: 'cont_yield' was not declared in this scope; did you mean 'can_yield'? 102 | cont_yield(g_pcont); | ^~~~~~~~~~ | can_yield c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp: In function 'void loop_task(ETSEvent*)': c:\Users\gferry\Documents\Arduino\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:200:26: error: invalid operands of types 'void' and 'int' to binary 'operator!=' 200 | if (cont_check(g_pcont) != 0) { | ~~~~~~~~~~~~~~~~~~~ ^~ ~ | | | | void int exit status 1 Compilation error: exit status 1
-
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: Saving last known good state, but not in EEPROM
I have considered this @karlheinz2000. In a typical case, both lose power at the same time. Then both do not know the count.
Thanks for the input!
OSD
-
Saving last known good state, but not in EEPROM
I'm working on a low cost energy meter for my heat pump. This meter would be similar to the meter on one's house, but for one device only.
Currently my problem is storing the cummulative kWh in the likely event of a power outage. A quick search yields a heat pump can consume 2,000kWh a month. I don't wnat to live in such a place, but this is worst case. If I store each integer change in EEPROM, and the EEPROM is good for 100,000 writes, would mean about every 5 years and I have to replace the Arduino. At half that, I'd have to remember to replace the Arduino when the heat pump is replaced. This is not acceptable to me.
I also have a water meter that suffers from this same challenge.
My controller is Home Assistant (HA) and I am looking to see how I would have HA store this data and then the Arduino request it upon boot.
I have experimented with storing the data on the MQTT broker, but have not done so sufficiently to determine if this method is viable. The mosquitto MQTT broker will restore retained data upon reboot, but, apparently not subscriptions. (I hope I am wrong on this.)
OK, MySensors Universe, "Is there someone out there that has resolved this issue?|"
OSD