Good morning all together ...
... some hint to lighten the day:
Code: Select all
For men over 50, a urine sample in the garden is sufficient for a health check:
Go to the garden early in the morning on an empty stomach and pee.
- If ants gather on the ground, you have elevated sugar and probably diabetes
- If it drips onto the tips of your feet, you have problems with your prostate
- If your wrist hurts when you shake it off, then you have osteoarthritis
- If you can't stop shaking, you have Parkinson's
- If you're back in the apartment and it's still hanging out, then you have Alzheimer's
- If you no longer know why you were in the garden, then it is dementia
Ok, back to topic...
The route via the framed display doesn't really work as well as I thought it would. I'm encountering display problems that I didn't expect. But one after anonther:
1.: Header line
It actually works, apart from the fact that the WLAN symbol cannot be removed or, at best, you can choose one symbol from several (WLAN, BT, GPS, ...). However, this immediately goes wrong if you set "Header" = Date and "Header (alternate)" = Time. The two data sets then overwrite each other alternately. I assume this is a BUG?
2.: Font
Unfortunately, the font is not proportional. This makes it extremely difficult to format the output data fairly neatly on the display.
3.: Justification
I read in https://espeasy.readthedocs.io/en/lates ... /P036.html that you can use the pipe in the command "oledframedcmd,<line>,<text>" to create a quasi-justified sentence, which means that the left part is shown left-aligned and the right part is shown right-aligned in the display. But this doesn't seem to work if I use the pipe symbol in the line contents of the device itself; doesn't work here (or I'm doing something wrong).
So if I enter e.g. in line 2 in the device itself...
Oil consumption: | 1329,8L
... then the pipe itself is displayed, but the line is otherwise not formatted in justified form as expected.
^forget point 3; I'm simple stupid
Video for 1 can be found here:
https://steamradio.de/esp/240410,%20fra ... oblems.mp4
Last but not least, I unfortunately had to realize that I had forgotten a lot in the many months that I hadn't worked with ESPeasy.
Because of point 1. I actually wanted to switch off the header completely and build my own, which should look like this (_ is space):
dd.mm.yy__var__hh:mm:ss
I wanted "var" filled with "GPS", "NTP" or "???", depending on where the time information comes from. It took me quite a long time to remember that I can't save ASCII in a custom-var or a dummy. I put that aside for now because I ran out of ideas...
Now I will go to my garden and check my healthy ...
EDIT:
Is it possible to create an event by any valoe of an device insteed of a single / named value?
Example:
Device TEMP have 3 values from 3 sensors, let say T1, T2 and T3. So this work well as known:
Code: Select all
On TEMP#T1 Do
oledframedcmd,2,'WW: [TEMP#T1] °C
Endon
So I like to create an event independent from T1 to T3. With other words: If one of the values T1, T2 or T3 change. So like this (what don't work):
Code: Select all
On TEMP# Do
oledframedcmd,2,'WW: [TEMP#T1] °C
Endon
Is there a way to do that?
EDIT 2:
I have try to work on the counter. Base is a generic switch where I like to count the time the switch is "on" (GPIO to GND). For that I have defined the counter2 with 100ms.
If the switch goes to GND and create an event, I start the counter. If the switch goes open and also create an event, I stop the counter and try to grab the time the counter was running meanwhile.
I have try to use the example written in the docs under "Sub-second resolution and loop timers" but the %eventvalue2% is ever "0". I can see the timer running and stoping in the log viewer but that's it.
Code: Select all
On Ventil#STA Do
If [Ventil#STA]=0
looptimerset_ms,2,100
Elseif [Ventil#STA]=1
looptimerset_ms,2,0
logentry,%eventvalue2%
TaskValueSet Speicher,S,'[Speicher#S] + %eventvalue2%
Endif
Endon
I think the %eventvalue2% will give me the status of the Switch-value and not the counted time from timer2.
So question is how I can grab the count-value and store them into the dummy "Speicher"?
EDIT 3:
This is a possible solution but limited to 1sec resolution and not 100msec I like to have:
Code: Select all
On Ventil#STA Do
If [Ventil#STA]=0
Let,5,%unixtime%
Else
TaskValueSet Speicher,S,'[Speicher#S] + %unixtime% - %v5%'
Endif
Endon
EDIT 4:
And now nothing goes... The ESP isn't able to connect to the known WiFi. Have try to unpower a longer time, do a reset and some mor... No way...
Code: Select all
00:07:13.412 : (252596) Info : WIFI : Arduino wifi status: WL_DISCONNECTED 6 ESPeasy internal wifi status: DISCONNECTED
00:07:13.412 : (252720) Info : WiFi : WifiDisconnect()
00:07:13.624 : (252176) Info : WIFI : Disconnected! Reason: '(1) Unspecified'
00:07:13.725 : (252680) Info : Reset WiFi.
00:07:13.728 : (252616) Info : WiFi : Start network scan all channels
00:07:16.314 : (251744) Info : WiFi : Scan finished, found: 12
00:07:16.316 : (252372) Info : WiFi : Best AP candidate: Buchholz 3C:37:12:5F:4E:E1 Ch:4 (-45dBm)WPA2/PSK (bgn)
00:07:16.327 : (252432) Info : NVS : Load WIFICANDIDATE
00:07:16.328 : (252504) Info : WiFi : Added known candidate, try to connect
00:07:16.330 : (251836) Info : WIFI : Connecting Buchholz 38:10:D5:32:43:42 Ch:4 (RTC) WPA2/PSK (bgn) attempt #49
00:07:16.346 : (252348) Info : WIFI : Arduino wifi status: WL_DISCONNECTED 6 ESPeasy internal wifi status: DISCONNECTED
00:07:16.357 : (252324) Info : WiFi : WifiDisconnect()
00:07:16.559 : (252552) Info : WIFI : Disconnected! Reason: '(1) Unspecified'
00:07:16.660 : (252480) Info : WiFi : WifiDisconnect()
00:07:16.862 : (252464) Info : WIFI : Disconnected! Reason: '(1) Unspecified'
00:07:16.963 : (252440) Info : Reset WiFi.
00:07:16.966 : (252376) Info : WiFi : Start network scan all channels
00:07:19.553 : (251652) Info : WiFi : Scan finished, found: 11
00:07:19.554 : (252196) Info : WiFi : Best AP candidate: Buchholz 3C:37:12:5F:4E:E1 Ch:4 (-46dBm)WPA2/PSK (bgn)
00:07:19.555 : (252252) Info : NVS : Load WIFICANDIDATE
00:07:19.566 : (252328) Info : WiFi : Added known candidate, try to connect
00:07:19.578 : (252188) Info : WIFI : Connecting Buchholz 38:10:D5:32:43:42 Ch:4 (RTC) WPA2/PSK (bgn) attempt #50
00:07:19.584 : (252168) Info : WIFI : Arduino wifi status: WL_CONNECT_FAILED 4 ESPeasy internal wifi status: DISCONNECTED
00:07:19.695 : (252292) Info : WIFI : Set WiFi to OFF
00:07:20.012 : (268080) Info : WIFI : Set WiFi to STA
00:07:20.119 : (252300) Info : WIFI : Connecting Buchholz 38:10:D5:32:43:42 Ch:4 (RTC) WPA2/PSK (bgn) attempt #51
00:07:20.748 : (252036) Info : EVENT: WiFi#Disconnected
00:07:20.893 : (252432) Info : EVENT: WiFi#Disconnected
00:07:20.933 : (252520) Info : EVENT: WiFi#Disconnected
00:07:20.999 : (252616) Info : EVENT: GPS#LostFix
00:07:21.306 : (252616) Info : EVENT: GPS#GotFix
00:07:40.124 : (252640) Info : WIFI : Arduino wifi status: WL_DISCONNECTED 6 ESPeasy internal wifi status: DISCONNECTED
00:07:40.124 : (252760) Info : WiFi : WifiDisconnect()
00:07:40.336 : (252744) Info : WIFI : Disconnected! Reason: '(1) Unspecified'
00:07:40.437 : (252720) Info : Reset WiFi.
00:07:40.440 : (252648) Info : WiFi : Start network scan all channels
00:07:43.027 : (251868) Info : WiFi : Scan finished, found: 11
00:07:43.028 : (252408) Info : WiFi : Best AP candidate: Buchholz 3C:37:12:5F:4E:E1 Ch:4 (-46dBm)WPA2/PSK (bgn)
00:07:43.039 : (252480) Info : NVS : Load WIFICANDIDATE
00:07:43.040 : (252544) Info : WiFi : Added known candidate, try to connect
00:07:43.042 : (252404) Info : WIFI : Connecting Buchholz 38:10:D5:32:43:42 Ch:4 (RTC) WPA2/PSK (bgn) attempt #52
00:07:43.058 : (252388) Info : WIFI : Arduino wifi status: WL_DISCONNECTED 6 ESPeasy internal wifi status: DISCONNECTED
00:07:43.069 : (252512) Info : WiFi : WifiDisconnect()
00:07:43.271 : (252592) Info : WIFI : Disconnected! Reason: '(1) Unspecified'
00:07:43.372 : (252520) Info : WiFi : WifiDisconnect()
00:07:43.574 : (252504) Info : WIFI : Disconnected! Reason: '(1) Unspecified'
00:07:43.675 : (252480) Info : Reset WiFi.
00:07:43.678 : (252416) Info : WiFi : Start network scan all channels
00:07:46.265 : (251776) Info : WiFi : Scan finished, found: 10
00:07:46.266 : (252232) Info : WiFi : Best AP candidate: Buchholz 3C:37:12:5F:4E:E1 Ch:4 (-46dBm)WPA2/PSK (bgn)
00:07:46.267 : (252304) Info : NVS : Load WIFICANDIDATE
00:07:46.278 : (252368) Info : WiFi : Added known candidate, try to connect
00:07:46.290 : (252228) Info : WIFI : Connecting Buchholz 38:10:D5:32:43:42 Ch:4 (RTC) WPA2/PSK (bgn) attempt #53
00:07:46.296 : (251684) Info : WIFI : Arduino wifi status: WL_DISCONNECTED 6 ESPeasy internal wifi status: DISCONNECTED
00:07:46.397 : (251972) Info : WIFI : Set WiFi to OFF
00:07:46.724 : (268120) Info : WIFI : Set WiFi to STA
00:07:46.831 : (252352) Info : WIFI : Connecting Buchholz 38:10:D5:32:43:42 Ch:4 (RTC) WPA2/PSK (bgn) attempt #54
00:07:46.849 : (252440) Info : EVENT: WiFi#Disconnected
00:07:47.404 : (252380) Info : EVENT: WiFi#Disconnected
00:07:47.445 : (252420) Info : EVENT: WiFi#Disconnected
00:07:48.098 : (252616) Info : EVENT: GPS#LostFix
00:07:49.290 : (252260) Info : EVENT: GPS#GotFix
Last EDIT:
I'm tired and giving up; no chance of getting it back into the network, neither as a client nor via AP mode.
I'll throw that one away and, perhaps in the coming days, flash the next one and start over. But if he dies also within 2 or 3 days, then I will bury the project.
After all, what use is a great oil meter if at some point it can no longer be read? Well... it's no use at all...