Search found 49 matches

by bulthaup
30 Jul 2020, 00:04
Forum: ESP Easy: Projects / Applications
Topic: Keep highest en lowest value in dummy via rules
Replies: 4
Views: 18415

Re: Keep highest en lowest value in dummy via rules

Ok, I still need to set the initial lowest value after booting so my rule looks like this now and it seems to be working. On System#Boot do TaskValueSet,4,1,[serre#Temperature] TaskValueSet,4,2,[serre#Humidity] TaskValueSet,4,3,[serre#Pressure] endon On serre#Temperature Do If [serre#Temperature] > ...
by bulthaup
29 Jul 2020, 09:26
Forum: ESP Easy: Projects / Applications
Topic: Keep highest en lowest value in dummy via rules
Replies: 4
Views: 18415

Keep highest en lowest value in dummy via rules

I have an ESPEASY system running with a BME280 sensor. I would like to keep the highest and lowest value of the temperature sensor inside a dummy task until I reset the device. This is probably possible with an easy rule but I totally lack knowledge of writing rules. My first attempt (not tested) on...
by bulthaup
17 Apr 2020, 13:07
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Hi,

You can start from the pull request and browse the code from that specific commit.
Untitled.png
Untitled.png (37.24 KiB) Viewed 13358 times
by bulthaup
16 Apr 2020, 20:16
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

can somebody perhaps share their build so i can test with that one.(i downloaded build dated 15-04 23:30 so maybe i am doing something wrong) You can clone or download zip from this repo https://github.com/letscontrolit/ESPEasy/tree/1cf4bb43dcccd183160172e682d70f0f55666354 or this https://github.co...
by bulthaup
15 Apr 2020, 23:05
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Great, I found you guys on Patreon meanwhile. Keep it up!
by bulthaup
15 Apr 2020, 20:16
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

I made an update to the pull request. Can you test it? Hi, confirmed working! - Changing the GPIO of a task doesn't reset the Total count.- - Deleting a task and re-adding it again with same parameters won't restore an earlier saved value from RTC for that task. So I guess all is working like it sh...
by bulthaup
14 Apr 2020, 23:26
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

I just made a build in VScode but the issue is still there.

Setting task1 to 999 with formula %value%/100 gives 9 after a 1st reboot (999/100= 9,99 --> rounded to 9 because of decimals)

After a second reboot, Total count becomes 0 (9/100= 0,99 --> rounded to 0)
by bulthaup
14 Apr 2020, 18:24
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

are you saying that this formula is applied after you delete a device and add it again? Well, the formula is applied once again to the existing Total pulse count value upon reboot. So if I would collect 99 pulses from my gasmeter with the current setup (I'm talking about not using SetPulseCounterTo...
by bulthaup
14 Apr 2020, 17:28
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Because the formula %value%/100 was still there, setting the value to 999 with the command, caused the unit to to 999/100 = 9,99. Because I set the decimals to 0, 9,99 was rounded to 9... This actually shouldn't happen imho. The formula should only be accounted for when new pulses are added to the t...
by bulthaup
14 Apr 2020, 17:22
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Hold your horses, I think I found the culprit! Haha, you will not believe this... I'm using a formula because the gasmeter needs 100 pulses for 1m3 of gas. Capture.PNG Obviously, every time I set the value of task1 (the only task where I eventually set the formula %value%/100 ) and I reboot the D1, ...
by bulthaup
14 Apr 2020, 17:05
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Can you send me an updated bin file again please? I'll try yours..
by bulthaup
14 Apr 2020, 14:39
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Try setting a different value, so you can see to what task it is written. For example "100" and "200" and try sending it to task 3, just to make sure I didn't mess up with the offset GravityRZ, Is it possible to perform the following tests? - Take blank D1 Mini, flash firmware w...
by bulthaup
13 Apr 2020, 23:55
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

I don't have any industrial psu here atm due to corona lockdown. The best I could try was a phone adapter from samsung and a very short usb cable. Could this really be an issue? I thought that psu issues were more current when the esp is crashing or rebooting all of a sudden. Writing to RTC is not r...
by bulthaup
13 Apr 2020, 19:57
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Did some more tests. - Task 1: Pulse counter (reed switch) on GPIO14(D2) and GND 1) SetPulseCounterTotal,99,1 2) Reboot ESP 3) Total Count resets to 0 - Added task 2: Pulse counter (this time I didn't set a GPIO, just left it at NONE) 1) SetPulseCounterTotal,99,2 2) Reboot ESP 3) Total Count restore...
by bulthaup
13 Apr 2020, 15:58
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Something is still not right though..

Setting the value of a Total pulse count to 250 and then rebooting the device gives a weird result of 2 ???

Check the video I made here:

https://www.dropbox.com/s/9cub18irohqbe ... 9.mp4?dl=0
by bulthaup
13 Apr 2020, 15:07
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Sorry, I had to edit my first "positive" post.. I have built my own bin file with VSCode. At first I added the gasmeter pulse counter with a simple reed switch. Total count was saved and survived warm reboot. Then I added an NPN sensor and generated a few pulses. Suprisingly, both Total co...
by bulthaup
12 Apr 2020, 11:32
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Hmm that's an interesting point you just made. If we delete the task, the task value data is not removed from the RTC stored data. So it may cause other issues (maybe) if you change tasks. I will add a clear of the data stored in the UserVar if a task is removed. I doubt it will be a real issue wit...
by bulthaup
12 Apr 2020, 11:23
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

GravityRZ wrote: 11 Apr 2020, 15:10 whatever i do i can not replicate it.
What pulse meter do you use? Do you have a simple reed switch to test also?
by bulthaup
10 Apr 2020, 23:51
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

I don't think so. I switched the reed switch to D7 (GPIO-13) and the issue remains. The sensor is adding pulses so I don't know why they are not kept in RTC memory :( I hooked up a NPN sensor as well on task2. It's same scenario as my "production" system. In this test setup on a D1 mini, I...
by bulthaup
10 Apr 2020, 20:43
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

I can reproduce the issue with a D1 Mini. A simple reed sensor (Aleph PS-3150 Proximity Sensor) is connected to GPIO-14 (D5) and the other leg to GND. Adding it to task1 or task2 doesn't make any difference. Executing the "taskrun, 1" command also does not trigger the values to be stored t...
by bulthaup
10 Apr 2020, 19:52
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Well, for both counters I use mode FALLING. Debounce time of 500ms
by bulthaup
10 Apr 2020, 19:23
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Hi, thanks for the build. It still doesn't work for me :( As you can see, the "Time" value for the gasmeter (task 2) got restored somehow?? I'm going to make a new system with a D1 mini to rule out that the nodemcu is bugging me. I'll provide some feedback asap Before: before.jpg After reb...
by bulthaup
10 Apr 2020, 11:41
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

I looked at the code and one thing jumps to mind. The values are restored after the callback functions are set, so maybe the unit receives a pulse almost immediately and that may overwrite the values in the UserVar array. I will swap it so you can test it. Edit: See https://github.com/letscontrolit...
by bulthaup
10 Apr 2020, 08:43
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

TD-er wrote: 06 Apr 2020, 23:26 I think not updating on every pulse, or at least frequently is cause for confusion.
Just did some tests with your change in the rule but after a reset, only the Total counts of task 1 is restored. Task 2 stays 0 again.

Is there a way of debugging this?
by bulthaup
08 Apr 2020, 19:36
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

On my system, the only rule I have active and running is this one:

On Clock#Time=All,23:59 do
timerSet 1,55
Endon

on Rules#Timer=1 do
resetpulsecounter,1
resetpulsecounter,2
EndOn


It basically resets all pulse counters 5 seconds before midnight.
by bulthaup
08 Apr 2020, 10:08
Forum: ESP Easy: General Discussion
Topic: %syshour% and %sysmin% issue
Replies: 5
Views: 6425

Re: %syshour% and %sysmin% issue

ThomasB wrote: 07 Apr 2020, 02:27

This code is untested, so may require tweaks.

- Thomas
It seems it already existed :)

https://github.com/letscontrolit/ESPEasy/issues/2991
by bulthaup
07 Apr 2020, 20:05
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

It could be related. Hi TD-er, Did another test today. I had collected 180 pulses for water and 43 pulses for gas today after 15 hours runtime since 00u00. (resetpulse command). I deliberately executed the "taskrun, 1" and "taskrun, 2" command and after a reboot, all pulses were...
by bulthaup
07 Apr 2020, 00:09
Forum: ESP Easy: General Discussion
Topic: %syshour% and %sysmin% issue
Replies: 5
Views: 6425

Re: %syshour% and %sysmin% issue

Now the time (HH:MM:SS) can be displayed with leading zeros using this syntax: [VAR#5#D2.0]:[VAR#6#D2.0]:[VAR#7#D2.0] Hi ThomasB, thanks for your input. I created a rule on System#Boot do let,5,%syshour% let,6,%sysmin% endon and filled the line 1 of the LCD2004 like this. %sysday%/%sysmonth%/%sysye...
by bulthaup
06 Apr 2020, 23:03
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Well, I did some tests on another nodemcu before upgrading to the release where you added the pulsereset command. My tests were fine. I could add 2 pulse counters and both tasks survived a reboot, but I only counted a few pulses on each task and didn't let the nodemcu run for a few hours. Neverthele...
by bulthaup
06 Apr 2020, 20:59
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

The pulse counter does not save the data on every count, so if the task has not been "run" (see taskrun command) and/or the interval is set to 0 or a very long interval, then you will miss all pulses since the last time the task was "run". Hi TD-er, The interval is set to 10 sec...
by bulthaup
06 Apr 2020, 19:35
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

I was thinking about the same idea, to make it an option, with a "minimum time between events" Hi TD-er, I have a nodemcu v3 running mega-20200328 and it collected pulses from my NPN sensor and reed sensor the whole day for water and gas. I have been using the resetpulsecounter command su...
by bulthaup
06 Apr 2020, 00:08
Forum: ESP Easy: General Discussion
Topic: %syshour% and %sysmin% issue
Replies: 5
Views: 6425

%syshour% and %sysmin% issue

Hello, I like to have my LCD2004 in dutch language and for time annotation we like to use "15u00" for 3PM. According to the documentation https://www.letscontrolit.com/wiki/index.php/ESPEasy_System_Variables the notation should be like this: %syshour% Current hour (hh) %sysmin% Current min...
by bulthaup
28 Mar 2020, 12:32
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Hi TD-er, I'll keep an eye on the commits in the next couple of weeks then! thanks! Well you can try last night's build. I had to fix a recent change in PlatformIO to make the build work, but eventually I was able to get it running and I noticed there was a zip file attached. See: https://github.co...
by bulthaup
28 Mar 2020, 08:57
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Hi TD-er,

I'll keep an eye on the commits in the next couple of weeks then! thanks!
by bulthaup
27 Mar 2020, 23:12
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Yes, the Dummy plugin should get the last values restored after a reboot. There is however a very big BUT here. These values can only be kept if the ESP is not loosing its power. If you remove power, the RTC memory is lost in which these values are being stored. If you need that, then you have to w...
by bulthaup
09 Sep 2019, 19:08
Forum: ESP Easy: Hardware
Topic: New hackable ESP gadgets in local budget store "action" !!!
Replies: 112
Views: 248776

Re: New hackable ESP gadgets in local budget store "action" !!!

Hi, please keep this thread alive. Hacking these Action things is always fun :)
by bulthaup
06 Sep 2019, 23:08
Forum: ESP Easy: Hardware
Topic: New hackable ESP gadgets in local budget store "action" !!!
Replies: 112
Views: 248776

Re: New hackable ESP gadgets in local budget store "action" !!!

I found some more info and a tear-down of these devices on a the German forum mikrocontroller.net . It seams that the OTA update with Tuya-convert has been disabled by Tuya with a new firmware and these devices would have the new update. Also some of these devices don't have the esp8266 or esp8285 ...
by bulthaup
30 Aug 2019, 15:50
Forum: ESP Easy: Hardware
Topic: New hackable ESP gadgets in local budget store "action" !!!
Replies: 112
Views: 248776

Re: New hackable ESP gadgets in local budget store "action" !!!

How can you put the LSC door sensor in flash mode?
by bulthaup
16 Aug 2019, 21:23
Forum: ESP Easy: Software
Topic: Instant pulse sending via MQTT
Replies: 9
Views: 5882

Re: Instant pulse sending via MQTT

Hi Thomas, This is what I use now but I still think the amount of lines in this rule is too much for what I need? on System#Boot do let,3,[watermeter#Total] endon on watermeter#Total do let,1,[watermeter#Total] let,2,[VAR#1]-[VAR#3] let,3,[VAR#1] if [VAR#2] > 0 Publish /sensors/watermeter/Total,[wat...
by bulthaup
09 Aug 2019, 10:20
Forum: ESP Easy: Software
Topic: Instant pulse sending via MQTT
Replies: 9
Views: 5882

Re: Instant pulse sending via MQTT

The Total value will only be sent when the counter's values change. Hi Thomas, thanks for your assistance so far. I just think a few things are missing from the rule. The / in front of sensors for example. If I don't add this, the rule is not pusblishing anything to the broker. Publish /sensors/wat...
by bulthaup
08 Aug 2019, 23:00
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Re: Change Total value of a pulse counter with command

Then you can set the offset again in a dummy variable and just let the rules output the sum of both. Would you mind explaining this further in an example? Does the value of such dummy variable survive a reboot? Because I'm issuing a reboot every night at 0:00 with a rule to start collecting the Tot...
by bulthaup
08 Aug 2019, 22:51
Forum: ESP Easy: Software
Topic: Instant pulse sending via MQTT
Replies: 9
Views: 5882

Re: Instant pulse sending via MQTT

The basic idea is to use rules to send the counted value only when it has changed. Hi Thomas, I tried to read and analyse your rule but I'm having a hard time understanding it. I'm not really sure if this is what I need. How to approach this when I only want to send the Total value if it changes (g...
by bulthaup
08 Aug 2019, 20:46
Forum: ESP Easy: Software
Topic: Instant pulse sending via MQTT
Replies: 9
Views: 5882

Re: Instant pulse sending via MQTT

Hi Thomas, better to dig up an existing topic then spoiling the forum with double entries ;)

Thanks for your suggestion. I'll surely test it out soon!


I also encountered another problem with pulse counters.

viewtopic.php?f=6&t=6926&p=38441#p38441
by bulthaup
08 Aug 2019, 20:41
Forum: ESP Easy: Software
Topic: Change Total value of a pulse counter with command
Replies: 85
Views: 42770

Change Total value of a pulse counter with command

Hi, Sometimes I need to do maintenance in my electrical/network setup and I have to reboot the ESPEasy device during the day. I'm running pulse counters and after a reboot the total of the day so far is lost. Luckily I can gather the collected amount of pulses from my mqtt broker logs. I'm looking f...
by bulthaup
01 Aug 2019, 14:03
Forum: ESP Easy: Software
Topic: Instant pulse sending via MQTT
Replies: 9
Views: 5882

Re: Instant pulse sending via MQTT

+1 for this feature!
by bulthaup
29 Jul 2019, 15:53
Forum: ESP Easy: Projects / Applications
Topic: Getting a LJ12A3-4-Z/BX-5V NPN Pulse Counter to work
Replies: 0
Views: 12895

Getting a LJ12A3-4-Z/BX-5V NPN Pulse Counter to work

Hi all, this is my first post. I have been reading here for a while now to find cool projects to learn from in my home automation setup. I have very poor knowledge of electronics but I would like to learn more so please spare me if I made a rookie mistake :) Hopefully others will be able to learn to...