[UPDATE] node-red-contrib-ui-time-scheduler

Just updated the timer.
It worked like a charm.

Thanks for the excellent node! :beers: :100:

1 Like

I am showing the scheduler UI on an iPad and the text and icon seemed small. I tried to add custom styling using template node but it seemed that some of the styling are hard-encoded in the HTML element.

Here's the screenshot of the UI and the css styling that I used.

<style>
body.nr-dashboard-theme {
    font-size: 25px !important;
}
md-list-item.md-2-line .md-list-item-text{
    height:50px;
}
</style>

Is there a way to scale the whole UI such as the rows, text and icon bigger or hide a certain button?

Hi @holykaw,

I just answered your question in the GitHub issue that you created.

Thanks @fellinga!

I ended up with your suggestion on overriding the classes as well as hard-coding them in the module javascript file. As my use case is a slightly different due to the embedded browser rendering engine that made the text and UI far too small compared to the standard mobile browser.

Granted, I understood the hard-coding might be overwritten should there be future update to the module.

One more question — for the the payload input, currently the node accepts msg.enableDevice and msg.disableDevice. Will there be a way to change the timing as well, not now maybe in future, say something like msg.starttime = 08.00AM or other time format?

Hello,
@fellinga
Thank you for your nice scheduler
i have two questions.

  1. Is it possible to combine in the same dashboard scheduler menu, default mode and event mode ?
    For example i need to add a schedule ON at a specific time and OFF at a specific time, but i also need to add just an event at a specific time. I can add both only if i add a new scheduler in flow (one with event and one with default mode)

  2. Is it possible to add a device for scheduling directly into the dashboard menu ? (is it possible only to edit in dash after you create the device into scheduler node )

@holykaw sorry for the delay. msg.starttime would be confusing since the scheduler can have more than one timer and also more than one device it would therefore not know what timer to address. Could you describe the use case? Maybe there is an alternative solution.

Hi @meccip,

thanks for the feedback.

I used to combine them in very early versions of the scheduler but quickly figured out that the whole concept of having them combined does not work well. I then had to separate them into two different modes (default & event mode).

I don't think there is a way to directly modify the nodes outputs directly from the dashboard, but even if it was, the new device output would not be connected to anything. I don't think a new output that is not connected to anything would help, right?

First, thanks fellinga for such an amazing node.

I think @meccip might be referring to the feature of adding a device from the input to the ui-time-scheduler node, for example, adjust devices via msg.add_device, msg.remove_deivce to the node. By doing this, we can achieve a truly dynamic dashboard.

Right now, users can adjust the timers easily. But they do not have the option of adding or removing a device. After adding a device, users can adjust the timers for the device themselves.

As a side note, it might be a good idea to store the device names in context, instead of the main flows.json?

Adding a device dynamically, whether it was triggered by the front-end or via an incoming message, as you said, would still add an additional output to the node that is definitely not connected to anything else as long as nobody connects it manually... so that is really not useful. Or are you guys referring to something else?

Also, adding the devices to context alone does not solve the problem, since the number of outputs needs to be adjusted as well. The only solution I think would be to additionally change the outputs statically to 2 so that every single device uses the second output. This would break backwards compatibility and takes some of the nodes simplicity since one would have to parse the output by topic... but it would also enable some flexibility. Thoughts?

Yes you are right that the outputs need to the changed too. We may have to use "msg.device" to tell which device is sending out message.

One way to keep the node backward compatible is to add one extra output to the current node that contains the output device information, such as "msg.device". Leave the rest un-touched.
This way, existing users can still use the node if they don't care about the dynamic device feature. For advanced users, they can connect to the added "dynamic" output for dynamic operations.

any help please?:slight_smile:

Hi, I'm struggling to work out how to use the getStatus input. I want to get the top output to output the current set of timer schedules so that I can convert the start and end times into a different format to make an API call. If I just send a msg.payload = "getStatus" I get an error. I've tried various other combinations for topics and JSON strings, but nothing seems to work....help!

Hi @ShEV ,

This should help: How to use getStatus? · Issue #38 · fellinga/node-red-contrib-ui-time-scheduler · GitHub

Hi @fellinga

That's great thanks. One other question though.... Is it possible to determine which timer corresponds to which item in the timer array? I notice that adding a new timer shifts the array number of existing timers up one. Is there a way to read the the topic set in the node and identify which output that goes to for example?

Thanks...

Well the items in the timers array are the timers... so... I am not quite sure what you are asking. New timers are just being pushed into the array so there is currently no ID or anything (I am thinking about adding one though). Could you try to explain it again?

Here's what I'm trying to do.....

I have a timer I use to control my electric car charger. It has two 'Devices', one which sets the off-peak hours and one which can be used to set a scheduled charge time (which might be the same as the off-peak hours, but might not be). For the off-peak hours I have a function that reads the UK grid carbon intensity and decides whether to charge the car and to what % battery level. The carbon intensity is read using an API and I want to read the average intensity over the off-peak hours, so I need to extract whatever the off peak start and end times are for the device with the topic name 'Off Peak' to call the API. I appreciate there is a problem here in that you can define more than one schedule with the same device name, so I suppose it might not be possible, but perhaps your ID idea might overcome that?
Thanks...

Hej Fellinga,

first of all congratulations on that nice node and thanks a lot for creating it!

I have a question. Is there any possibility to implement the option to schedule events in the scale of seconds? Or would it be possible to implement it in following updates?

Best regards,

Johannes

HI,
is it possible to use this as "one time manual scheduler"? I need to manually plan something 1 day in advance, but after OFF state, I need to delete the record, not to be planned for next week.
Thanks for help
Miki

1 Like

Is there a way to have some input variables (integer, float) which can be send to flow once the schedule is on?

Did you manage to get anywhere with this?