Hello from Holland - Martinus

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Post Reply
Message
Author
martinus
Normal user
Posts: 65
Joined: 15 Feb 2020, 16:57

Hello from Holland - Martinus

#1 Post by martinus » 29 Mar 2020, 14:04

Since I'm sort of back after quite some time, it may be needed to reintroduce myself (?)

My history with ESPEasy goes all the way back to the Nodo project where it all started in 2011. I was the initial founder of ESPEasy until I handed over the project to Edwin and later on to Gijs and Jimmy.
And all three have done a really terrific job to improve ESPEasy in every possible way!

My Home Automation mainly consists of:
* Domoticz 4.10717 and Mosquitto running on a very low power Windows 10 HDMI stick
* Klik Aan/Klik Uit on some less important locations
* Philips Hue in the living room with a motion sensor and a dimmer switch
* Lots of ESP-01, Wemos D1 Mini, Lolin-32 lite, Wemos D1 Mini-32 and M5-stack modules
* Mainly DS18B20, SI7021 sensors

Obsolete items:
* A broken DKW2012 Weatherstation that still needs to be replaced (?)
* An RFID reader node that never went into production (WAF issue)
* DHT sensors because they were replaced with SI7201
* Some Sonoff basic modules that have issues with Wifi range and reliability (all 3 of them) . Will be replaced with LSC smart plug
* A whole range of devices that were needed to develop plugins but never seemed of any use to my personal HA requirements.

Main skills:
* Prototyping in every possible way :ugeek: :ugeek: (stuff often stays at that level but still in production)
* Basic level of C programming, HTML, PowerShell, MS-DotNet framework
* Z80, ATTiny85, ATMega328, ATMega2560, W5100, ESP8266, ESP32
* Testing until it drives me nuts :ugeek: But at the end it works :P
* Spending more time on my hobby than the WAF allows... :oops:

I'm in the progress of migrating all my Home Automation components to the most recent hardware where possible. ESP32 will be my main choice, preferably with 16MB flash, so i will not have to refresh again too soon. Also migrated from R120/R147 to Mega build 200204. Only my custom wordclock is still on R120.

To avoid possible confusion: I'm no longer a member of the ESPEasy development team, so i'm just a regular member like all the other enthousiastic users on this forum.

Martinus

TD-er
Core team member
Posts: 2620
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Hello from Holland - Martinus

#2 Post by TD-er » 29 Mar 2020, 14:10

Haha, nice to see you introduce yourself :)
You're indeed quite an enthusiastic user lately. Looks like you've been infected by the ESPEasy virus again.

User avatar
grovkillen
Core team member
Posts: 3582
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Hello from Holland - Martinus

#3 Post by grovkillen » 29 Mar 2020, 15:58

We're happy to have you back here. And thank you for the kind words :)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
iron
Normal user
Posts: 108
Joined: 24 Sep 2016, 08:37
Location: Veria, Greece
Contact:

Re: Hello from Holland - Martinus

#4 Post by iron » 29 Mar 2020, 20:36

Martinus,

Great to see you back.

Considering working on the ESP32 part of the ESP Easy dev ?

-D
-D

martinus
Normal user
Posts: 65
Joined: 15 Feb 2020, 16:57

Re: Hello from Holland - Martinus

#5 Post by martinus » 04 Apr 2020, 14:47

iron wrote:
29 Mar 2020, 20:36
Considering working on the ESP32 part of the ESP Easy dev ?
Development is now in the good hands of Gijs and Jimmy. But indeed the reason for me replacing all hardware with ESP32 is that i want to focus only on ESP32 and RTOS. I think the RTOS could bring some nice options of running multiple "apps" on a single unit without having to care much about timing because RTOS handles that. Maybe run some special plugin in it's own RTOS task could be fun to see if/how it works. Need to study things like concurrency/semaphore locking etc. For me RTOS is new stuff :mrgreen: :mrgreen:

TD-er
Core team member
Posts: 2620
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Hello from Holland - Martinus

#6 Post by TD-er » 04 Apr 2020, 16:42

ESP32 is indeed filled with 'new stuff', also the way how memory is shared among cores.
So I would be really glad to see a proper pull request on how data can be shared among processes running on different cores.
I don't think locking is a good idea (given how the shared resources are designed) but simple semaphores like a volatile bool (read thread sets it to 0, write to 1) may be very useful.

martinus
Normal user
Posts: 65
Joined: 15 Feb 2020, 16:57

Re: Hello from Holland - Martinus

#7 Post by martinus » 04 Apr 2020, 19:26

TD-er wrote:
04 Apr 2020, 16:42
..on how data can be shared among processes running on different cores.
I wonder if you can instruct RTOS to time slice user tasks on a single core or that it automatically schedules tasks on both cores?
For ESP32 it may still be better to grant one core to all Wifi SDK stuff and use the other for all user tasks.
I have to start reading upon how RTOS works in general and specifically how it's implemented on the ESP.

I also would like to learn what happens on a dual core system when you are inside an ISR handler routine. The core handling the ISR will not do anything else until the ISR returns (?), but what will the other core do during this process? What about things like "noInterrups()" on RTOS dual-core?

Al my low-level experience is based on ATmega single core stuff which is a lot more easy to understand.

:mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

TD-er
Core team member
Posts: 2620
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Hello from Holland - Martinus

#8 Post by TD-er » 06 Apr 2020, 16:02

You can set the core affinity when defining a task for RTOS (see ESPEasy code :) )
As far as I know, ISR calls are immutable, meaning only one (per core) will be called at once and it will not be interrupted by another ISR call.
But as always, there's a big BUT here. The ESP32 does have several levels of interrupts and this only applies to ISR calls made from the same level.
For example, let's assume (no idea if it is) the WiFi events have a more prioritized level over GPIO interrupts. If ISR calls from both do share the same data, then you may need to take precautions.
And as always, make ISR calls as short as possible, so no access to functions without the IRAM_ATTR and only access volatile declared data.

If you would use locking, then it might be both cores are affected (I would expect them to be), so better try using simple boolean flags when possible.
I have no idea what the level of impact is of a call to noInterrupts(). (e.g. is it still active when you schedule another RTOS task?)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests