NodeMCU deepSleep Fehler vermeiden

NodeMCU

Während meiner Versuche mit dem NodeMCU und deepSleep stieß ich auf zwei Fehler die man machen kann, aber nicht sollte. Der erste lies mich den Baustein nicht mehr mit neuem Code bespielen. Der Grund ist, dass der Baustein während er im deepSleep Mode ist, sich nicht mehr flashen lässt. Die Lösung des Problems ist hier beschrieben:

Solution: https://forum.arduino.cc/index.php?topic=613412.0

You do not say what version of ESP8266 your using but if it has two buttons on the module (maybe called Reset & Flash) then hold down the flash button, briefly press the reset button and then after a second or two release the flash button. This should put the ESP into programming mode where the built in bootloader is running instead of your sketch.

Is there any other method putting the Wemos into programming mode instead of the second (flash) button?
Connect GPIO0 (that I think is pin D3 on the D1 Mini) to GND and then press the reset button.
You may also need to remove the D0-RST link but I’m not sure.

Der andere schwierig zu findende Fehler war, (vor lauter Begeisterung vergessen 😉 ) abzufangen, falls mal keine Verbindung zustande kommt. Hier ganz einfach mit dem Zähler tries behoben. Ansonsten geht er in Endlosschleife …

//connect to your local wi-fi network
WiFi.begin(ssid, password);/check wi-fi is connected to wi-fi network
int tries = 0;
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
tries++;
if (tries > 10) {
// wenn keine verbindung gelingt
Serial.println("No WiFi! Gonig to Sleep");
ESP.deepSleep(10e7);
}}
Serial.println("");
Serial.println("WiFi connected..!");
Serial.print("Got IP: "); Serial.println(WiFi.localIP());

Mount Synology on Raspberry

  1. create a user on Synology nas: pinas
  2. On raspberry mkdir a directory: NAS2
  3. mount:
sudo mount -t cifs //192.168.178.25/home /home/pi/NAS2 -o user=pinas,pass=xxxx,uid=1000,gid=1000,dir_mode=0700,file_mode=0600,vers=1.0

or add to /etc/fstab:

//192.168.178.25/home /home/pi/NAS2 cifs user=pinas,pass=xxxx,uid=1000,gid=1000
,dir_mode=0700,file_mode=0600,nounix,vers=1.0 0 0

ioBroker with docker, docker-compose, Homematic, grafana some hints

some hints which helped me:

docker-compose.yml, some ports

version: '2'

services:
iobroker:
restart: always
image: buanet/iobroker:latest
container_name: iobroker
hostname: iobroker
ports:
- "8081:8081"
- "1880:1880" #node-red
- "1883:1883" #mqtt
- "2001:2001" #homematic
- "2010:2010" #homematic
- "8082:8082" #iobroker admin
- "8282:8282" #flot
- "8088:8088" #terminal
- "8284:8284" #socketIO
- "33980:33980" #Alexa
- "37325:37325" #Alexa
volumes:
- ./iobrokerdata:/opt/iobroker

Adapter alexa 2.0

Externer Container: IP docker container
Proxy-Port choose at free will and add it to the docker ports

Grafana

to use grafana with docker-compose and to share a panel in vis in ioBroker I used this in docker-compose.yml:

grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
- "3306:3306"
volumes:
- ./grafanadata:/grafana
- /var/lib/grafana:/var/lib/grafana
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_SECURITY_ALLOW_EMBEDDING=true

Homematic IP: Ablernen eines Tür- Fensterkontaktes

Als meinen ersten Homematic Beitrag verlinke ich hier das Video, wie es gelingt einen Fensterkontakt zu reseten (habe ich lange gesucht/probiert).

Batterie raus. Knopf gedrückt halten, während dessen Batterie rein. Nach 4 sec loslassen und nochmals 4 sec drücken. Bei grün loslassen. Haben aber trotz Video mehrere Anläufe gebraucht(?).

Mering

Momentane Temperatur (und 24h Historie):

Bahn

Für München Pendler: https://pendlerinfo-mering.de/ oder https://marudor.de/Mering

Wertstoffhof (Hermann-Löns Straße 60 Karte) Öffnungszeiten:

Montag:15.00 – 19.00 Uhr
Dienstag:15.00 – 19.00 Uhr
Freitag:09.00 – 17.00 Uhr
Samstag09.00 – 16.00 Uhr

Bücherei Mering (Bachstr. 1 Karte) Öffnungszeiten:

Mo. & Mi.:15.00 – 18.00 Uhr
Di.:10.30 – 13.00 Uhr
Do.:15.00 – 20.00 Uhr
Fr.:
10.30 – 18.00 Uhr

Links:

Abfuhrkalender

Karten:

Wetterlinks

https://www.meteoblue.com/de/wetter/woche/mering_deutschland_2871813

Wasserstand Paar: https://www.hnd.bayern.de/pegel/donau_bis_kelheim/mering-13201000

Webcam Mandichosee: https://www.addicted-sports.com/webcam/lechstaustufe/mandichosee/

PlantUML – Text to Gantt

PlantUML is also able to generate Gantt. You can test it at: https://www.planttext.com

Above are all available elements I found in PlantUML to build gantts.

@startgantt
Project starts the 5th of august 2019
saturday are closed
sunday are closed
2019/08/15 is closed
[Prototype designx] as [TASK1] lasts 6 days
[TASK1] is colored in Lavender/LightBlue
[Prototype design] lasts 13 days
[Prototype completed] happens at [Prototype design]'s end
[Test prototype] lasts 14 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/FF0000
[Ein Vorgang] starts at [Prototype designx]'s end
[Ein Vorgang] lasts 5 days
[Ein Vorgang2] starts at 15th of august 2019
[Ein Vorgang2] lasts 7 days
[Ein Vorgang3] starts at [Ein Vorgang2]'s end
[Ein Vorgang3] lasts 5 days
[Ein Vorgang4] lasts 9 days
[Ein Vorgang5] lasts 6 days
[Ein Vorgang4] starts at 2019/08/17
[Ein Vorgang5] starts 5 days after [Ein Vorgang2]'s start
[Task1] on {Alice} lasts 10 days
[Task2] on {Bob:50%} lasts 2 days
then [Task3] on {Alice:25%} lasts 1 days
@endgantt