A bigtimer question

825 views
Skip to first unread message

Colin Law

unread,
Nov 28, 2016, 7:02:31 AM11/28/16
to node...@googlegroups.com
I am using node-red-contrib-bigtimer but have a minor problem with it. I am using it to control a temperature setpoint  which I want to be one value for a period then a different value for another period. I achieve this by wiring up two bigtimers in parallel with one set for each time period with the On Msg set to the value I want during that period and the Off msg set blank. The problem is that the first timer generates a blank (payload) message at the start of the off time, which conflicts with the new setpoint value being generated by the second timer at the start of its time.  I have got around this with a Switch node that ignores blank messages. Is that the best way? I could not see a way of telling the timer not to generate the blank messages.

Colin

hello world

unread,
Nov 28, 2016, 9:49:17 AM11/28/16
to Node-RED
Hey Colin,

I saw this the other day too.  This is what I experienced:

From Off for XXhrs XXmin --> ON Temp. override. = First output will send "On Msg"
After Timeout set in node: From ON Temp. override. --> OFF Temp. override. = First output sends nothing (probably should send "Off Msg")

I ended up using the second output and placing an RBE in front, but the delay to capture the change could be up to a minute.

I'm sure Pete will chime in here.

Peter Scargill

unread,
Nov 29, 2016, 8:03:27 AM11/29/16
to Node-RED
Ok, I'm not 100% following this - would you set up a flow that tests this - and send it to me - so I know exactly what is wrong - I'm sure I can fix it. I'm not following this "first output sends nothing" it should never send a blank output..

Colin Law

unread,
Nov 29, 2016, 11:08:33 AM11/29/16
to node...@googlegroups.com
Hi Peter

I don't know what 'hello world' is trying to say but I have something like the flow below where the debug node is actually a flow controlling a temperature that I want set to 15 or 20 in the time ranges specified in the timers. The problem is that at the end of the ON time the timers output a message with a blank payload which I have to filter out. For my application I would have preferred that if the ON or OFF message is blank that no message is sent.  My real application has more than two timers so I can't just use one timer.

Colin

[
    {
        "id": "cd2c5e56.322d48",
        "type": "bigtimer",
        "z": "fd0a1625.33a968",
        "outtopic": "some/topic",
        "outpayload1": "15",
        "outpayload2": "",
        "name": "Big Timer",
        "lat": "51.025",
        "lon": "-1.4",
        "start": "sunrise",
        "end": "sunset",
        "starttime": "975",
        "endtime": "990",
        "startoff": "0",
        "endoff": "0",
        "offs": "0",
        "outtext1": "",
        "outtext2": "",
        "timeout": "480",
        "sun": true,
        "mon": true,
        "tue": true,
        "wed": true,
        "thu": true,
        "fri": true,
        "sat": true,
        "jan": true,
        "feb": true,
        "mar": true,
        "apr": true,
        "may": true,
        "jun": true,
        "jul": true,
        "aug": true,
        "sep": true,
        "oct": true,
        "nov": true,
        "dec": true,
        "day1": "0",
        "month1": "0",
        "day2": "0",
        "month2": "0",
        "day3": "0",
        "month3": "0",
        "day4": "0",
        "month4": "0",
        "day5": "0",
        "month5": "0",
        "d1": "0",
        "w1": "0",
        "d2": "0",
        "w2": "0",
        "d3": "0",
        "w3": "0",
        "d4": "0",
        "w4": "0",
        "d5": "0",
        "w5": "0",
        "suspend": false,
        "random": false,
        "repeat": false,
        "atstart": true,
        "x": 229.5,
        "y": 961.5,
        "wires": [
            [
                "703b201f.acb728"
            ],
            [],
            []
        ]
    },
    {
        "id": "2dfa8342.81f554",
        "type": "bigtimer",
        "z": "fd0a1625.33a968",
        "outtopic": "some/topic",
        "outpayload1": "20",
        "outpayload2": "",
        "name": "Big Timer",
        "lat": "51.025",
        "lon": "-1.4",
        "start": "sunrise",
        "end": "sunset",
        "starttime": "990",
        "endtime": "975",
        "startoff": "0",
        "endoff": "0",
        "offs": "0",
        "outtext1": "",
        "outtext2": "",
        "timeout": "480",
        "sun": true,
        "mon": true,
        "tue": true,
        "wed": true,
        "thu": true,
        "fri": true,
        "sat": true,
        "jan": true,
        "feb": true,
        "mar": true,
        "apr": true,
        "may": true,
        "jun": true,
        "jul": true,
        "aug": true,
        "sep": true,
        "oct": true,
        "nov": true,
        "dec": true,
        "day1": "0",
        "month1": "0",
        "day2": "0",
        "month2": "0",
        "day3": "0",
        "month3": "0",
        "day4": "0",
        "month4": "0",
        "day5": "0",
        "month5": "0",
        "d1": "0",
        "w1": "0",
        "d2": "0",
        "w2": "0",
        "d3": "0",
        "w3": "0",
        "d4": "0",
        "w4": "0",
        "d5": "0",
        "w5": "0",
        "suspend": false,
        "random": false,
        "repeat": false,
        "atstart": true,
        "x": 227,
        "y": 1039,
        "wires": [
            [
                "703b201f.acb728"
            ],
            [],
            []
        ]
    },
    {
        "id": "703b201f.acb728",
        "type": "debug",
        "z": "fd0a1625.33a968",
        "name": "",
        "active": true,
        "console": "false",
        "complete": "false",
        "x": 534.5,
        "y": 1001,
        "wires": []
    }
]

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/fef632fb-78be-424c-abb7-a6c2e980192d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Peter Scargill

unread,
Nov 29, 2016, 2:33:34 PM11/29/16
to Node-RED
Give it a couple of hours until version 1.4.5 appears - and that's fixed that one!

Colin Law

unread,
Nov 29, 2016, 3:50:20 PM11/29/16
to node...@googlegroups.com
Fantastic, thanks.

I hope nobody is relying on blank messages, it doesn't sound very likely, and the change will allow timers to be stacked much more easily.

Cheers

Colin


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Peter Scargill

unread,
Nov 29, 2016, 6:52:58 PM11/29/16
to Node-RED
As you can imagine - I thought about that long and hard before making the change and I concur.. the benefit as you accurately describe, of being able to OR the units together outweighs any loss otherwise. I'll update the blog accordingly.

I think if is important to get the timer right - it may not be the most exciting node but it sure is essential!


On Tuesday, 29 November 2016 20:50:20 UTC, Colin Law wrote:
Fantastic, thanks.

I hope nobody is relying on blank messages, it doesn't sound very likely, and the change will allow timers to be stacked much more easily.

Cheers

Colin

On 29 November 2016 at 19:33, 'Peter Scargill' via Node-RED <node...@googlegroups.com> wrote:
Give it a couple of hours until version 1.4.5 appears - and that's fixed that one!


On Monday, 28 November 2016 12:02:31 UTC, Colin Law wrote:
I am using node-red-contrib-bigtimer but have a minor problem with it. I am using it to control a temperature setpoint  which I want to be one value for a period then a different value for another period. I achieve this by wiring up two bigtimers in parallel with one set for each time period with the On Msg set to the value I want during that period and the Off msg set blank. The problem is that the first timer generates a blank (payload) message at the start of the off time, which conflicts with the new setpoint value being generated by the second timer at the start of its time.  I have got around this with a Switch node that ignores blank messages. Is that the best way? I could not see a way of telling the timer not to generate the blank messages.

Colin

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

hello world

unread,
Nov 29, 2016, 7:31:52 PM11/29/16
to Node-RED
This node is certainly essential and thanks for it!

As a future enhancement, please consider adding field validation for the usual warning on deploy.  One can enter anything in each field; this node needs some polishing for sure.

...looking forward to the new blog.

Peter Scargill

unread,
Nov 29, 2016, 7:40:44 PM11/29/16
to Node-RED
Validation is something I'd do if I was doing this for a job - I'd rate that alongside CE certification. If anyone wants to add validation and do the check necessary to make sure that does not mess things up - by all means - create a branch and I'll look to merging it into the main code.

I'll concentrate on new features to make it even more essential.

Pete

hello world

unread,
Nov 29, 2016, 8:19:34 PM11/29/16
to Node-RED
I certainly wouldn't rate adding field validation along side of CE certs.  If the facility for the warnings weren't there, node-red wouldn't work as you would expect.  The current nodes in the default install are all extremely polished; node-red-contrib-bigtimer isn't. ...then don't promote it in its clunky state.

Julian Knight

unread,
Nov 30, 2016, 2:06:14 AM11/30/16
to Node-RED
A little harsh on someone doing this for fun!

You can always fork it, fix and do a pull request to help.
Message has been deleted

Peter Scargill

unread,
Nov 30, 2016, 3:58:53 AM11/30/16
to Node-RED


On Wednesday, 30 November 2016 08:57:32 UTC, Peter Scargill wrote:
Wow. Quite a lot of people do use it and write to say how happy they are with it. Simple answer is - don't use it - and that ends that conversation.


On Wednesday, 30 November 2016 01:19:34 UTC, hello world wrote:

Peter Scargill

unread,
Nov 30, 2016, 5:54:35 AM11/30/16
to Node-RED
And for others... there's a new update to the timer - for Colin. No value in the payload means no message. Good idea as it means you can OR several together if you want.

Peter Scargill

unread,
Nov 30, 2016, 6:54:22 AM11/30/16
to Node-RED
After all that, it turns out I started error checking on the node-red-contrib-bigtimer inputs some time ago and never completed it (including one mistake stopping the END time from defaulting and another on the default timeout - now set back to 24 hours).  All fixed. By mid-afternoon it should be safe to grab version 1.4.6 from http://flows.nodered.org/
Reply all
Reply to author
Forward
0 new messages