roadsnail / Pi-ve

Raspberry Pi Zero W Controls Hive SLR/SLT using Zigbee and Wifi networks- A Standalone Heating/Hot water Control solution without the British Gas Cloud
GNU General Public License v3.0
33 stars 1 forks source link

Setpoint for time slots #1

Closed mjf2708 closed 3 years ago

mjf2708 commented 3 years ago

Hi @roadsnail,

This looks very comprehensive and powerful, and I'm thinking of implementing it on a spare SLT2 / SLR2 setup, before putting it into 'production'. I've downloaded the flow in order to take a look at the dashboard, but when creating / editing time slots I can't see how to define the setpoint for each slot, or for the gaps between the time slots - am I missing something?

MikeF

roadsnail commented 3 years ago

Hi Mike, if you're referring to the initial creation of the 8 pre-defined 'on' time slots per day. Double Click on the 'C' button (adjacent to the day buttons) for HW. This should initialise 8 'on' slots per day for Sun to Sat. Do the same for central heating.

A single click on the HW 'C' should cause a popup (top right) saying:-

'INITIALISE HOT WATER TIME SLOTS' 'Press Button twice within 2 seconds to initialise default Hot Water time slots'

Thus as it suggests... A quickish double click should create a popup saying:- 'INITIALISE HOT WATER TIME SLOTS' 'Resetting ...'

If this action succeeds, one file per CH/HW is created in the user pi home directory (assuming you've installed everything with user pi) named Pive-CH and Pive-HW. (See below for contents of a newly initialised file should you wish to check).

pi@pive:~ $ cat Pive-CH [["Sun",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Mon",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Tue",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Wed",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Thu",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Fri",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Sat",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]]]

Hope I've understood the question.

Chris

ps Your dashboard may be missing some Node-RED spacers. This is because for some reason an export of the flow does not export any spacers. Thus these need to be added manually in order to divide up the functionality on the dashboard page if you catch my meaning.

EDIT: I've just checked the Node-RED flow on my Pi-ve, and noticed that the initial lack of Pive-HW/Pive-CH on a new installation should be picked up by two catch nodes (named No-CH! and No-HW!) that detect the missing files, then triggers the creation of both files automagically. Therefore I may have misunderstood your question... However, as stated above, the 'C' buttons should allow re-initialising the two files while playing around.

mjf2708 commented 3 years ago

Hi Chris,

Yes, I’ve got that. What I’m not seeing (or don’t know where it’s held) is the associated setpoint temperature for each slot (for CH).

So, for example, if I want a CH time slot from 07:00 to 08:30 with a setpoint of 21.0C, and then the setpoint to go down to 15.0C until another CH time slot from 17:00 to 23:00 with a setpoint of 22.0C, how do I achieve this?

Mike

On 15 May 2021, at 5:34 pm, Chris @. @.>> wrote:

Hi Mike, if you're referring to the initial creation of the 8 pre-defined 'on' time slots per day. Double Click on the 'C' button (adjacent to the day buttons) for HW. This should initialise 8 'on' slots per day for Sun to Sat. Do the same for central heating.

A single click on the HW 'C' should cause a popup (top right) saying:-

'INITIALISE HOT WATER TIME SLOTS' 'Press Button twice within 2 seconds to initialise default Hot Water time slots'

Thus as it suggests... A quickish double click should create a popup saying:- 'INITIALISE HOT WATER TIME SLOTS' 'Resetting ...'

If this action succeeds, one file per CH/HW is created in the user pi home directory (assuming you've installed everything with user pi) named Pive-CH and Pive-HW. (See below for contents of a newly initialised file should you wish to check).

@.***:~ $ cat Pive-CH [["Sun",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Mon",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Tue",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Wed",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Thu",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Fri",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Sat",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]]]

Hope I've understood the question.

Chris

ps Your dashboard may be missing some Node-RED spacers. This is because for some reason an export of the flow does not export any spacers. Thus these need to be added manually in order to divide up the functionality on the dashboard page if you catch my meaning.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/roadsnail/Pi-ve/issues/1#issuecomment-841689154, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKS4AQ3OTAT2L5TMXIQBYLTN2PADANCNFSM4454WJLA.

roadsnail commented 3 years ago

Ah okay. There isn't an associated setpoint for each time slot (at the moment) as the mark 1 just allows editing of time periods.

Your requirement was possibly going into the mark 2 code. It shouldn't be a big task, just an additional parameter (the SP) to save in the aforementioned files with new flow nodes to allow editing that setpoint in the same manner as the start/stop times.

I'll take a look, time allowing.

Meanwhile, let me know if you spot bugs/omissions etc as this is a work in progress.

Chris

mjf2708 commented 3 years ago

Hi Chris,Yes, I’ve got that. What I’m not seeing (or don’t know where it’s held) is the associated setpoint temperature for each slot (for CH).So, for example, if I want a CH time slot from 07:00 to 08:30 with a setpoint of 21.0C, and then the setpoint to go down to 15.0C until another CH time slot from 17:00 to 23:00 with a setpoint of 22.0C, how do I achieve this?MikeOn 15 May 2021, at 5:34 pm, Chris @.> wrote:Hi Mike, if you're referring to the initial creation of the 8 pre-defined 'on' time slots per day. Double Click on the 'C' button (adjacent to the day buttons) for HW. This should initialise 8 'on' slots per day for Sun to Sat. Do the same for central heating.A single click on the HW 'C' should cause a popup (top right) saying:-'INITIALISE HOT WATER TIME SLOTS' 'Press Button twice within 2 seconds to initialise default Hot Water time slots'Thus as it suggests... A quickish double click should create a popup saying:- 'INITIALISE HOT WATER TIME SLOTS' 'Resetting ...'If this action succeeds, one file per CH/HW is created in the user pi home directory (assuming you've installed everything with user pi) named Pive-CH and Pive-HW. (See below for contents of a newly initialised file should you wish to @.:~ $ cat Pive-CH [["Sun",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Mon",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Tue",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Wed",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Thu",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Fri",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]],["Sat",[{"startTime":480,"endTime":540},{"startTime":600,"endTime":660},{"startTime":720,"endTime":780},{"startTime":840,"endTime":900},{"startTime":960,"endTime":1020},{"startTime":1080,"endTime":1140},{"startTime":1200,"endTime":1260},{"startTime":1320,"endTime":1380}]]]Hope I've understood the question.Chrisps Your dashboard may be missing some Node-RED spacers. This is because for some reason an export of the flow does not export any spacers. Thus these need to be added manually in order to divide up the functionality on the dashboard page if you catch my meaning.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

roadsnail commented 3 years ago

Hi Mike,

I've made some quick mods to the flow to accommodate thermostat SP for CH 'on' time slots. I have not it tested extensively and I'm not totally happy with the layout and look of the dashboard as it currently stands. So this is for quick testing only if you get time to take a look at it.

I've created a preview v2.00beta at https://github.com/roadsnail/Pi-ve/blob/main/Preview%20Release/Pi-ve%20flow%20v2-00beta%20(preview)

The changes are pretty obvious: ie. selecting a timeslot will now show not only time slot start/stop time, but also a slider for changing the saved setpoint. 'Save', 'Add' buttons should save a modified time slot. 'Add' should create new time slots with an added SP value defaulting to 20 deg C for want of a better default value. Note that double-clicking the 'C' button should re-initialise the file containing the saved settings.

I probably will not be able to do much more for a few days due to other commitments, but may keep an eye on this thread. Cheers, Chris

mjf2708 commented 3 years ago

Hi Chris,

I’ve had a very quick look at this - like you, I’m not going to have much time over the next few days.

It looks good: you can now set the setpoint for each time slot.

A couple of suggestions: when editing a time slot, it would be useful to prepopulate the start and end times when editing a slot, particularly if you just want to change the setpoint - to avoid re-entering them. Also, re layout: you could space down the HW controls, to line up with the CH ones.

In my scenario I gave earlier, where I want a setpoint of 15C between 08:30 and 17:00, I can create contiguous time slots.

Well done on all this hard work!

Mike

On 16 May 2021, at 12:16 pm, Chris @.***> wrote:

Hi Mike,

I've made some quick mods to the flow to accommodate thermostat SP for CH 'on' time slots. I have not it tested extensively and I'm not totally happy with the layout and look of the dashboard as it currently stands. So this is for quick testing only if you get time to take a look at it.

I've created a preview v2.00beta at https://github.com/roadsnail/Pi-ve/blob/main/Preview%20Release/Pi-ve%20flow%20v2-00beta%20(preview) https://github.com/roadsnail/Pi-ve/blob/main/Preview%20Release/Pi-ve%20flow%20v2-00beta%20(preview) I probably will not be able to do much more for a few days due to other commitments.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/roadsnail/Pi-ve/issues/1#issuecomment-841803043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKS4AXBKZNVBTQR4QZNUATTN6SR3ANCNFSM4454WJLA.

roadsnail commented 3 years ago

Thanks for taking a quick look...

With regard to pre-populating the start/stop times, it should already do that.

ie. click on the time slot you wish to change listed under the 'CH Daily Time Slots' column: the start/stop times and SP should be added under the 'CH Edit Time Slot' column allowing changes to be made then validated and saved with the 'SAVE' button.

Maybe if you are not seeing the values pre-populated, this may be down to your browser type/version? I mostly use Chrome on W10. I'll try some other browsers when time permits.

Also with regard to layout, the HW controls can be spaced by adding Node-RED spacers in the dashboard edit screen. I have these, but they are not exported when I create a flow export before I publish the flow to Github. I see from Node-RED forums, other users have experienced the same issue.

Anyhow, enjoy - I must get on with other stuff today, else I'll be in the doghouse!

roadsnail commented 3 years ago

Created newer preview version (2.01) - fixed minor bug - changed dashboard layout and wording https://github.com/roadsnail/Pi-ve/blob/main/Preview%20Release/Pi-ve%20flow%20v2-01beta

mjf2708 commented 3 years ago

I’m using macOS Safari (14.0.2).

Mike

On 16 May 2021, at 1:03 pm, Chris @.***> wrote:

Maybe if you are not seeing the values pre-populated, this may be down to your browser type/version? I mostly use Chrome on W10. I'll try some other browsers when time permits.

roadsnail commented 3 years ago

Hi Mike, the latest Safari version not available for W10, so unable to test here.

Latest Edge on W10 - pre-populates 'Edit' field fine - Same behaviour as latest Chrome on W10 Latest Brave on W10 - Same behaviour as Chrome - Expected, as Brave is built on Chromium Latest Firefox on W10 - pre-populates 'Edit' field with hh:mm:ss.mmm - So different behaviour to Chrome as secs/millisecs included, but pre-populates regardless.

This: https://discourse.nodered.org/t/time-picker-pre-fill/33080 looks kind of interesting. The OP also had a time-picker issue but reading through the thread I see no mention of his/her browser type.

Also with regard to your browser version (14.0.2), maybe this is relevant with regard to browser date/time support? https://webkit.org/blog/11648/new-webkit-features-in-safari-14-1/

It may be worth upgrading to 14.1? I am unable to test it here :(

Please give it a try if you get time. (There is a newer Node-RED flow available) Thanks, Mike,

Chris

roadsnail commented 3 years ago

Hi Mike, any update on the time slot time fields automatically populating in Safari?

Chris

roadsnail commented 3 years ago

Guess not... I'll close this

mjf2708 commented 3 years ago

Hi Chris,

Sorry - I’ve not done anything recently with Hive under Zigbee.

In fact, I’ve abandoned Zigbee altogether - I was fed up with devices disappearing, poor battery life, and seemingly arbitrary intervals between readings with temperature sensors. It seemed to me that manufacturers were more concerned with how small they could make devices and run off a CR2030, than to produce anything robust.

I have reverted to my previous RFXcom devices, where switches work reliably, and temperature sensors send readings every minute or so, with AA batteries that last more than 1 year, and with better range.

As they say, YMMV!

I certainly wasn’t prepared to rely on Zigbee for a mission-critical system such as my central hearing! I am continuing to use my Drayton Wiser system under Domoticz, without needing any external cloud-based server.

I hope you have continuing reliable performance with PiHive. Good luck!

Mike

On 3 Aug 2021, at 9:44 pm, Chris @.***> wrote:

Closed #1 https://github.com/roadsnail/Pi-ve/issues/1.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/roadsnail/Pi-ve/issues/1#event-5107070117, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKS4ATBDSMSVM6AHBRWFFDT3BIKPANCNFSM4454WJLA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

roadsnail commented 3 years ago

Hi Mike,

No problem.

Sorry to hear you have had no success with Zigbee. My experience has been the opposite since ditching the underpowered CC2531. Instead of re-starting my Zigbee network every few days or maybe after a week or so if I was lucky. I now leave it running and it only gets a restart when my RPi gets re-booted.

In fact, I am currently moving away from ZWave TRV's to Zigbee devices as I got fed up with ZWave issues. As you say, CH/HW is mission-critical, so it's best to find what works and stick with it!

I know your Drayton Wiser works well for you, so I hope it continues to stay that way.

Anyhow, thanks for the update :)

Chris