%systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tklein.lotte@web.de
Normal user
Posts: 18
Joined: 29 Mar 2017, 12:05

%systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#1 Post by tklein.lotte@web.de » 29 Mar 2017, 12:19

hello,

how can I get informations of %systime% by using FHEM HTTP? It would be nice to be created/saved automatically. Do I need a Dummy Device?

My pir-sensor (HCSR501) doesn't work. How must it be configured (Pull UP, Inversed, Switch Button Type etc.) Therefor I've set the GPIO as Input.

Is it possible to set per MQTT more then 6 lines on a oled display (SSD 1306)? Is ther an other way to fill these lines by using a url?

In all cases I use a Wemos D1 mini.

It would be kind of you if somebody could help me to fix my problems.

Hoping that my englisch could be understood :-) :D

Greetings
Thomas

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#2 Post by Shardan » 29 Mar 2017, 14:11

Hello Thomas,
how can I get informations of %systime% by using FHEM HTTP? It would be nice to be created/saved automatically. Do I need a Dummy Device?
Sadly i don't have an ESPEasy here at my Office so i have to guess a bit.
- Go to "Devices" and edit an empty Task
- Search for "Sys Info" or similiar device, there might be the SysTime within RSSI, Uptime etc.
If not you'll need a dummy device indeed.
My pir-sensor (HCSR501) doesn't work. How must it be configured (Pull UP, Inversed, Switch Button Type etc.) Therefor I've set the GPIO as Input.
The HCSR501 should be supplied with 5V, not 3,3 V. It has it's own voltage regulator to 3,3V on board.
These linear type regulators need at least a bit higher voltage at the Input otherweise they fail.
It's no problem to connect the output of the PIR directly to the ESP as the PIR runs on 3,3V internally.
You may choose any free GPIO. Avoid some GPIO's witch have some "extras", i'd not use the GPIO0 for example
as it has the flashing function included.
It should not be necessary to set the pin as an "Input". it works without setting.
Oh and don't forget to connect PIR-ground to ESP-ground.
If i remember right a pullup resistor is not necessary, neither external nor internal.
"Inversed" just says if the task gives back "high" or "low" if the PIR is triggered - for testing it should give a result anyways by changing the value.
Switch type is a standard type, not Push Putton. Pushbutton "latches", first button press Switches on, second hit Switches off, that is
usually not what you might want with a PIR.
Is it possible to set per MQTT more then 6 lines on a oled display (SSD 1306)? Is ther an other way to fill these lines by using a url?
With the never Version ESPEasy 2.0 there is a "framed OLED" plugin.
If i remember right this plugin is in TESTING state, be aware! It has 12 lines for scrolling Display
I didn't test it myself so i can't say too much about it.

Don't worry about your english :)

Regards
Shardan
Regards
Shardan

tklein.lotte@web.de
Normal user
Posts: 18
Joined: 29 Mar 2017, 12:05

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#3 Post by tklein.lotte@web.de » 29 Mar 2017, 17:51

Hi Shardan,

thx a lot for your informations.
If not you'll need a dummy device indeed.
--> Do you know how this should be configured? Systime is not supported by "System Infos" (only free ram, uptime, load etc.)
You may choose any free GPIO. Avoid some GPIO's witch have some "extras", i'd not use the GPIO0 for example
--> I've changed the GPIO from 0 and then it works. :-)
With the never Version ESPEasy 2.0 there is a "framed OLED" plugin.
If i remember right this plugin is in TESTING state, be aware! It has 12 lines for scrolling Display
I didn't test it myself so i can't say too much about it.
--> I'm using the ESP Easy Mega Firmware. An other way to transmit I've found is http://<ESP IP address>/control?cmd=oled,<row>,<col>,<text> . But this doesn't work. I can only clear the display (http://<ESP IP address>/control?cmd=oledcmd,clear).

Greetings from Lotte to Bielefeld
Thomas

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#4 Post by Shardan » 29 Mar 2017, 20:01

Hello Thomas,

i didn't use dummy devices up to now so i don't know.
I've found this in the command reference https://www.letscontrolit.com/wiki/inde ... _Reference :

TaskValueSet Set values on a Dummy Task device TaskValueSet <task nr>, <value nr>, <value/formula>

So what i would try to do as an entry point is a

Code: Select all

TaskValueSet  x,y,%systime%
with x for task number, y for the value number.

About the display:

Can't say with ESPMega, didn't try that up to now.
For now i used a LCD quite a while driven from FHEM, that shows gasoline prices from the stations around.

I just made a simple breadboard test circuit with a Wemos D1 and an oled, tested it with R148 and a

Code: Select all

http://192.168.17.56/control?cmd=oled,4,1,Rumpelstilzchen
and it worked at once.
If you want to try the framed oled driver with more lines remember that you may have to use the ESPEasy 2.0.0-testing branch..
i'm not sure if this plugin is already in the standard bin-file.

Regards
Shardan
Regards
Shardan

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#5 Post by Shardan » 29 Mar 2017, 20:33

PS:

I just checked with ESPEasyMEGA on a nodeMCU - it works without issues too using the standard OLED plugin..
The "OLED framed" works, but the command for remote writing does not.

S.
Regards
Shardan

tklein.lotte@web.de
Normal user
Posts: 18
Joined: 29 Mar 2017, 12:05

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#6 Post by tklein.lotte@web.de » 30 Mar 2017, 11:05

thx a lot again.


I wasn't able to be successfull using systime. Do you see my mistake(s)?
Attachments
taskvalue.png
taskvalue.png (98.79 KiB) Viewed 6089 times

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#7 Post by Shardan » 30 Mar 2017, 14:59

hm....

i think i've made a mistake.
All the fields of a dummy variable are number values including decimals.
I don't think you can put time format values into such a variable.

One of the programmers reading? Is that possible?

Regards
Shardan
Regards
Shardan

tklein.lotte@web.de
Normal user
Posts: 18
Joined: 29 Mar 2017, 12:05

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#8 Post by tklein.lotte@web.de » 30 Mar 2017, 16:49

maybe I must do some logic in my fhem for this then.

many thx for your help!

Thomas

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: %systime% | pir-sensor (HCSR501)| oled display (SSD 1306)

#9 Post by Shardan » 30 Mar 2017, 18:49

Anytime :)
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: No registered users and 128 guests