What is connected to the input (and how)? And what do you actually do with the output?
Regards
Phil K
Sent from Mail for Windows 10
Very simple test.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/14e458a4-9bc0-4cb3-95ad-210c3432a54d%40googlegroups.com.
The ‘rest’ state for an input should be Vcc and only go low with an input (unless an inverted input) . What happens if you tie to Vcc?
Regards
Phil K
Sent from Mail for Windows 10
From: John Magill
Sent: 10 April 2020 17:48
To: TasmotaUsers
Subject: Re: power pulse timer
Input for the purposes of the test is connected to ground.
The mqtt message which should show the interval between pulses goes to Node Red and subsequently via web to my phone. (using Node Red dashboard)
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/f3da6d9d-9490-4944-8479-9b0962717840%40googlegroups.com.
The problem is that the counter isn’t resetting after the message so it’s repeatedly sending the same value.
on counter#c1>0 do backlog publish leccy %value%; counter1 0 endon
seems to work
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/4be3919d-ed0f-43b0-99c6-a3d5d2ca8570%40googlegroups.com.
The problem is that the counter isn’t resetting after the message so it’s repeatedly sending the same value.
on counter#c1>0 do backlog publish leccy %value%; counter1 0 endon
seems to work
Regards
Phil K
Sent from Mail for Windows 10
From: John Magill
Sent: 10 April 2020 18:56
To: TasmotaUsers
Subject: Re: Re: power pulse timer
Ok with input tied to vcc I still get a publish at approx 1 second intervals
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.
I’ve come up with a workround
on counter#c1!=%var1% do var1 %value% endon
09:36:53 RUL: COUNTER#C1!=%VAR1% performs "var1 0.336815"
09:36:53 MQT: stat/tasmota_electricity/RESULT = {"Var1":"0.336815"}
09:37:04 RUL: COUNTER#C1!=%VAR1% performs "var1 0.396861"
09:37:04 MQT: stat/tasmota_electricity /RESULT = {"Var1":"0.396861"}
09:37:08 RUL: COUNTER#C1!=%VAR1% performs "var1 0.430813"
09:37:08 MQT: stat/tasmota_electricity /RESULT = {"Var1":"0.430813"}
You get one MQTT message per operation of the input (from the var1 update). I’m not sure what would happen if you had a constant load – would the times be EXACTLY the same?
Yes it is a JSON so can be extracted. stat is changeable as Prefix2 so you can get rid of that part. The topic too can be anything you like (like leccy). The message isn't being published so difficult to make other changes.
However, it is better to leave the prefix unchanged. At some future point you may want to handle all status, commands or Tele messages and the prefix is used for that.
Sent from Outlook Mobile
From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of John Magill <mugg...@gmail.com>
Sent: Saturday, April 11, 2020 10:25:17 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Re: Re: Re: power pulse timer
--Thank you so much for your time..Yes this does reduce the throughput to once per pulse. I assume that response is in json format which I can parse in Node Red.Does it have to publish as stat/xxxx/RESULT and not just as a simple "leccy"?
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.
Tasmota is case ‘blind’ so Var1 and var1 are the same.
This will give
19:58:27 MQT: Leccy/RESULT = {"Var1":"115.719515"}
From: John Magill
Sent: 11 April 2020 18:56
To: TasmotaUsers
Subject: Re: Re: Re: Re: power pulse timer
Now I'm confused as to where the variable Var1 (capital first letter) comes from as the rule does not contain it. Just trying to change the publish topic to something more friendly.
thanks
From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of John Magill <mugg...@gmail.com>
Sent: Saturday, April 11, 2020 10:25:17 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Re: Re: Re: power pulse timer
Thank you so much for your time..
Yes this does reduce the throughput to once per pulse. I assume that response is in json format which I can parse in Node Red.
Does it have to publish as stat/xxxx/RESULT and not just as a simple "leccy"?
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/d9147f65-1358-4471-bfa6-78d58b0514ef%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/16106da9-1d36-4be2-a3e6-6138c51c237e%40googlegroups.com.