Comments (9)
Hi, yes stefan_bode at web de. Please see the newest version. introduced a new command counterdevider
from sonoff-tasmota.
In general no big deal to store the counter in RTC memory and maybe also in Flash. But we have to take into consideration how many pulses we expect in which timeframe. Additionally, it is interesting how you want to react on a reboot (accidentally or intended). Is there a requirement to remember the last state. What about power off? is it ok if we remember on 400 pulses and it was 415 when it was shut down on power?
Questions to anser:
1.) How many pulses in which timeframe you expect?
2.) Need the pulsescount survive a reboot? (Using RTC memory)
2.) Need the pulsecount survive power off (Using Flash)
from sonoff-tasmota.
I do see, that the behaviour is somewhere already in the code. Normally the count will only be reported by the TELEPERIOD (afaik). This will not give you exactly the state when 1L is reached, but you will get an update on the flow, for example, every 10sek.
from sonoff-tasmota.
Hi,
- Pulses not in timeframe - it could be 10, 100 in the same period of time - it is flow and when tap is open fully or many taps are opened the flow will be different.
- Currently I have AVR controller where I save value for every 100 L to EPROM. When there is power cut the latest value from EEPROM is taken - correction I send to the AFR through RMF69 and I receive through RMF69. The attache interput have 2 counters 1 is for getting 4100 for each 10 L of water and one is for counting each pulse.
- I need to keep some last value in eeprom i.e. or RTC memory, but main is a possibility to multiply counter for i.e. 410 pulses for 1 L and result it on MQTT or/and www. The best is to set somewhere the multiplayer in some variable.
PS.
Could you give me your e-mail ?
from sonoff-tasmota.
Hi,
It was tested and:
BTW - Is it possible to define COUNTERDEVIDER i user_config.h ?
I sugest to add/change to :
sonoff\xsns_01_counter.ino
line 25
uint32_t pulse_devider = COUNTERDEVIDER;
in user_config.h
line 161
#define COUNTERDEVIDER 10 // counter divider or set CounterDevider 1-4
RESULT without changes:
It does not count correctly when I set on type counterType as pulse debaunce for 100 ms
it count as it wants, usualy count each pulse or shows more of 10 20 50.
there was not send to consloe
The "CounterDevider1" was not set from console
After setting CounterDevider1 to 10 starts work.
What do you think about that suggestion:
// STB mode
//avoid DIV 0 on unitiialized
Settings.pulse_devider[i] = COUNTERDEVIDER;
if (Settings.pulse_devider[i] == 0 || Settings.pulse_devider[i] == 65535 ) {Settings.pulse_devider[i] = 1;}
// end
it seams to work when I sen in configure COUNTERDEVIDER to 10 (or set fromconsole - without any modyfication of code after setting CounterDevider1 to 10 ), every 10 pulse it gives 1.
Additionaly when on web there is some devider , I sugest add that information to WWW and to MQTT if you can.
And Counter result send every change as tele message or in some other possibility
tele/wemeos/SENSOR = {"Czas":"2017-12-04T21:17:24","Przelacznik1":"OFF","Licznik1":23,"Wej_analogowe0":3}
That is nice to have receive any pulse change to be just send to MQTT :-) the same for i.e. analog read status :-) by execute some command as:
21:24:50 CMD: Status 10
21:24:50 MQT: stat/wemeos/STATUS10 = {"StatusSNS":{"Czas":"2017-12-04T21:24:50","Przelacznik1":"OFF","Licznik1":31,"Wej_analogowe0":3}}
PS
I sent you e-mail with subject:
Tasmota roblad contact github
from sonoff-tasmota.
it should be
#define D_CMND_COUNTERDEVIDER "CounterDevider"
there is a command, not text to translate, it has CounterDevider1 or CounterDevider2 or CounterDevider3 or CounterDevider4 depends on max_counters
I suggested to change it - but I updated the response to #15
yep, there is a reason that command normally should stay in English. Changed back and will be updated with the next sync.
from sonoff-tasmota.
Hi,
Could you try to add other things, and I sent you a mail, could you answer ?
Thanks,
RL
from sonoff-tasmota.
I saw just one mail from you where you said: hello from monday. no requests
from sonoff-tasmota.
Hi,
I have not received , could yoy try again ?
from sonoff-tasmota.
Related Issues (20)
- SetOption80 1 HangUp the Device HOT 13
- Can´t connect to WIFI after upload your Firmware HOT 2
- SHUTTER50PERCENT not work HOT 7
- Erratic Behaviour when Slow Blinds - includes fix HOT 1
- Dim the lights in the switch? HOT 6
- Shutter dead time support HOT 11
- Vcc in state HOT 3
- Alexa Dimming doesnt work HOT 4
- PCF8574 on master HOT 2
- PCF8574: ports on at startup HOT 9
- MQTT Report during movement HOT 1
- DeepSleep consumption HOT 1
- MQT: TLS connection error: 0 HOT 4
- Calibration 2nd shutter HOT 1
- Shutter with LC-TECH X2 in mode 1 allows changing direction without power removal HOT 5
- MQT: TLS connection error: 0 HOT 1
- Mq sensor
- Sonoff touch TX T3 Us
- upgrading from Sonoff-Tasmota 6.5.0.11 stb-1.5 by Theo Arends HOT 7
- Shutter - inverse mode - slider not correct HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonoff-tasmota.