Page 3 of 4

Re: IOT_Made_Easy - or not?

Posted: Fri May 10, 2024 5:14 pm
by MJU20

Re: IOT_Made_Easy - or not?

Posted: Fri May 10, 2024 5:59 pm
by mnfisher
Thanks - no I hadn't. I'll try it too - thanks for the guide. I'm still not sure how to use the iot_madeeasy component - so more experimenting needed🙂

Martin

Re: IOT_Made_Easy - or not?

Posted: Fri May 10, 2024 7:36 pm
by mnfisher
That seemed to give the necessary final 'piece' of the IOT_MadeEasy jigsaw..

Set the data field string to "channels/CHANNEL_ID/field1" etc

This worked - but only for two entries before grinding to a halt again.

So back to my code - I noticed that there was a BCN (presumably beacon? (or bacon :-) )) timeout - and that the esp32 which had been running overnight had made some entries.

So - since I want the esp32 to sleep - I added a esp_deep_sleep to my code - and added a dht22 sensor - then posted 10*current temp as an integer. Note that the esp32 is reset when waking from deep sleep (I've posted about how to save some variables and check the reason for restart in the past) so random numbers for example will always have the same seed (and thus the same value) unless the user sets a random seed (using srand)
Note that esp_sleep.h is included in supplementary code.

So this seems to work reliably. It seems to need a short (I have 2s but this might be excessive) delay before sleeping (which kills the wifi)

So this is my take on a MQTT temperature monitor using a DHT22 - recording the temperature (*10 here) every 22s (or so) It could possibly do with a timeout on the dht22 read loop - then if it fails to read value the next reset might succeed - but otherwise no entry is made...
TempMQTT.fcfx
(21.55 KiB) Downloaded 48 times

Martin

Re: IOT_Made_Easy - or not?

Posted: Fri May 10, 2024 7:52 pm
by chipfryer27
Hi

Work not holiday and I didn't know about the pencil museum. 2B or not 2B I guess?

Fueled by Raven Red I discovered if I add in the IME component before I add in the Network Comms component, then no matter how many times I try the NC is a no show.

However if I add the WLAN ESP32, then the Network Component, connect them, then add in the IME I can connect IME to NC.

Assuming I add in the correct credentials I should now be able to connect but can't test just now as I'd need to leave my Raven alone and I'm scared it may disappear.....

Regards

Re: IOT_Made_Easy - or not?

Posted: Fri May 10, 2024 8:59 pm
by mnfisher
Almost a holiday - change of air AND time to enjoy a beer!

Definitely something a little squiffy with the linking of components - though mostly works well. I'd like to see some hints as to what needs linking too!

My temp reader seems to work nicely now up to 150 (2 minute) readings. So now just need to wire in a battery pack, water level sensor and visit the loft..

The Raven Red will disappear either way ?

Martin

Re: IOT_Made_Easy - or not?

Posted: Fri May 10, 2024 9:10 pm
by chipfryer27
Hi

The Raven has indeed disappeared but a Black Swan has taken it's place. Best not to leave that unattended.

Although both good, not as nice as Puffin (5000 years in the making, or something like that).

I have a few more bird related beers to get through...:)

Regards

Re: IOT_Made_Easy - or not?

Posted: Sat May 11, 2024 5:14 pm
by MJU20
Haven't read everything but I use the project in: https://flowcode.co.uk/forums/viewtopic ... eak#p13978 with a BME280 sensor (barometric pressure/humidity/temperature).

This project uses the sleep function too. It wakes up every 10 minutes, checks if there is an AP in the neighbourhood that it knows. Connects.
Performs a measurement, post it onto the MQTT server (Thingspeak), and goes back to sleep for 10 minutes.
If any of these steps fails it goes back to sleep for about 3 minutes before it tries again.

These projects (I have actually two of them running) work now for more then a year.
They work on a 18650 battery and we charge them every 2 weeks.

Re: IOT_Made_Easy - or not?

Posted: Sat May 11, 2024 9:44 pm
by mnfisher
Sounds good - I was going to power with 3x1.2V rechargeables as a test (not being able to get lithium batteries in the post is a pain) - I've currently got the board sleeping for 60minutes and seems good. I was hoping for a bit more battery life - and will need less frequent sampling (though now I have temperature and humidity it's hard to let go!)

Re: IOT_Made_Easy - or not?

Posted: Sun May 12, 2024 1:59 am
by chipfryer27
Hi

Admittedly I'm not that up to speed with this, but couldn't you use one of those generic 32's that have onboard charging? Power via USB and if "mains" fails, battery takes over?

Regards

Re: IOT_Made_Easy - or not?

Posted: Sun May 12, 2024 8:56 am
by mnfisher
There's no power (easily) - it's the loft of an outbuilding. I don't like going up there - a couple of years ago the ladder 'slipped' an inch and snapped my little finger. Now I avoid ladders whenever possible :-( So the longer the battery lasts the happier I am - or maybe I should just go up and down a few times and get over it. Man up (and back down) literally and figuratively?

One option would be a solar panel - but it would entail quite a bit of wiring and I'm not sure it's worth the bother...