Weekly programming

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.
bigpea
Posts: 121
Joined: Thursday 11 August 2016 12:30
Target OS: Raspberry Pi
Domoticz version:
Location: IT
Contact:

Re: Weekly programming

Post by bigpea » Wednesday 20 December 2017 16:44

I love you! :mrgreen:
Thanks Thanks Thanks!
Unfortunatelly I updated to the last version of Domoticz Beta and the timers doesn't work! But you work is fantastic!
thanks.png
thanks.png (49.68 KiB) Viewed 2400 times

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Wednesday 20 December 2017 16:51

Good! Happy to know it's working.
Just one point, on css part, I created only 4 colors. In your case, edit the style.css file, at the end there are classes .m0 .m1.. so add a .m4 and may be a .m5 class with the required color.

bigpea
Posts: 121
Joined: Thursday 11 August 2016 12:30
Target OS: Raspberry Pi
Domoticz version:
Location: IT
Contact:

Re: Weekly programming

Post by bigpea » Wednesday 20 December 2017 17:32

oh ok perfect ;) thanks

Eoreh
Posts: 70
Joined: Tuesday 13 October 2015 13:50
Target OS: Raspberry Pi
Domoticz version: beta
Location: Poland
Contact:

Re: Weekly programming

Post by Eoreh » Sunday 14 January 2018 19:19

This can be a very interesting solution for me in conjunction with the dzVents script. for heating control.
https://www.domoticz.com/forum/viewtopi ... 59&t=21422

renerene
Posts: 137
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Weekly programming

Post by renerene » Friday 19 January 2018 0:08

Just found this page after looking for a time table option to use with my new Smart Virtual Thermostat
viewtopic.php?f=34&t=19418

Can you please explain how to install? I have copied / replaced all the files in the ZIP file, but now what? Where is html5 file? Do I need to manually add a switch in Domoticz?

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Friday 19 January 2018 8:33

Hi @renerene

I've updated files and manual on following link:
https://gist.github.com/syrhus/8fbb01fb ... be210993c8

Actually, it's working for Setpoints and swtiches planning.
heating.PNG
heating.PNG (327.59 KiB) Viewed 2134 times
Feel free to contact me if you still have some issues
Regards
Last edited by syrhus on Friday 19 January 2018 15:27, edited 1 time in total.

pjsgsy
Posts: 10
Joined: Thursday 28 December 2017 21:51
Target OS: Windows
Domoticz version: 3.8153
Contact:

Re: Weekly programming

Post by pjsgsy » Friday 19 January 2018 10:35

Fantastic work! Yet to get it setup, but just what I was looking for and adds considerable value to Domoticz. Thank you for sharing with the community.

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Friday 19 January 2018 15:16

I forgot to specify it is working with ON/OFF switch and switch selector levels for instance with "electric heating":
Levels_cmp.jpeg
Levels_cmp.jpeg (108.99 KiB) Viewed 2136 times
programme_switch.PNG
programme_switch.PNG (64.96 KiB) Viewed 2136 times

renerene
Posts: 137
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Weekly programming

Post by renerene » Saturday 20 January 2018 0:59

syrhus wrote:
Friday 19 January 2018 8:33
I've updated files and manual on following link:
https://gist.github.com/syrhus/8fbb01fb ... be210993c8
Sorry, still no clue. Done the adjustement within the files. Now what? Back to domoticz and 'add hardware' or 'manually add device' in switches? What to select from the pull-down list?

I have manually added a dummy test switch, type selector. I does not look like the screenshots above, just the nomal domoticz fields.

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Saturday 20 January 2018 10:10

@renerene once you have your swith device or SetPoint device, did you click on planning button to access to the planning window?
thermostat_elec.PNG
thermostat_elec.PNG (29.35 KiB) Viewed 2100 times
Else, think to clear the application cache of your browser to force the domoticz application to reload files or change the html.appcache value

renerene
Posts: 137
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Weekly programming

Post by renerene » Saturday 20 January 2018 17:26

syrhus wrote:
Saturday 20 January 2018 10:10
@renerene once you have your swith device or SetPoint device, did you click on planning button to access to the planning window?
Thank you. It works!

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Saturday 20 January 2018 18:10

Good news ;)
Play with it and if you have some troubles or suggestions, feel free to send its to me :)

Patricen
Posts: 20
Joined: Tuesday 06 February 2018 19:48
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Weekly programming

Post by Patricen » Tuesday 06 February 2018 19:52

That's definitely great!

Is it planned to be pulled in the next beta versions?

giribaldo
Posts: 1
Joined: Sunday 11 February 2018 22:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Weekly programming

Post by giribaldo » Sunday 11 February 2018 22:53

Hi, i'm new to forum and to domoticz, first i must say thanks to syrhus for this program that i think is very very useful!!
i installed just yesterday domoticz on windows and today on linux (mint) just for evaluating and testing purpose...
and i feel so stupid becaus i tried all today to make work this program in domoticz but without success... :(
whatever i do, it dos not come out the planning button or menu, just the usual timer of domoticz...
this on windows and also on linux.
the domoticz version is Domoticz version: 3.8153

i will still try to make it work because at first look i like domoticz, just i would like a program like this to simplify the scheduling of my heating sistem that is drived by a PLC and i would like to control it in Modbus RTU and domoticz (on raspberry).

if someone as some advice to make it work thanks a lot!!

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Monday 12 February 2018 18:17

giribaldo wrote:
Sunday 11 February 2018 22:53
Hi, i'm new to forum and to domoticz, first i must say thanks to syrhus for this program that i think is very very useful!!
i installed just yesterday domoticz on windows and today on linux (mint) just for evaluating and testing purpose...
and i feel so stupid becaus i tried all today to make work this program in domoticz but without success... :(
whatever i do, it dos not come out the planning button or menu, just the usual timer of domoticz...
this on windows and also on linux.
the domoticz version is Domoticz version: 3.8153

i will still try to make it work because at first look i like domoticz, just i would like a program like this to simplify the scheduling of my heating sistem that is drived by a PLC and i would like to control it in Modbus RTU and domoticz (on raspberry).

if someone as some advice to make it work thanks a lot!!
Hi @giribaldo

Just to be sure, on your device, do you see the planning button? Are you able to create a planning on your device?
As I exposed, it works on Measures device and Switches device.

Else, try to force to refresh the application cache of your web browser. You can either upgrade the number in the html.appcache version or delete the application cache of your browser.

Regards

bigpea
Posts: 121
Joined: Thursday 11 August 2016 12:30
Target OS: Raspberry Pi
Domoticz version:
Location: IT
Contact:

Re: Weekly programming

Post by bigpea » Tuesday 13 February 2018 16:30

Hi Syrhus,
I'm creating a tablet dashboard for domoticz and I would like to insert your scheduler in this dashboard.
I'm not very practical in javascript, so I kindly ask you: you started from an example (you can give me the link) or you created it completely from zero (I'm dead :D )?

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Tuesday 13 February 2018 17:07

Hi @bigpea

First, I searched some widget or jquery plugin but no one was like I wanted. So I made it from scratch.
If you need more help to adjust or improve my "plugin" feel free to contact me, it would be a pleasure to help.

bigpea
Posts: 121
Joined: Thursday 11 August 2016 12:30
Target OS: Raspberry Pi
Domoticz version:
Location: IT
Contact:

Re: Weekly programming

Post by bigpea » Tuesday 13 February 2018 21:56

Yes, I also searched but I did not find anything that could be right.
I try to ask you some help.. thanks.

As told, I'm creating a new dashbord, I'm almost at the end:
screen.jpg
screen.jpg (80.75 KiB) Viewed 1790 times
I want to integrate your timer because I think that is a great idea!
But.. I copied your file in my project:
- planning.js
- style.css
and i inserted in my page the code for the table:

Code: Select all

<div id="timesheetcontainer" style="display:none">
        <div class="modes">
        </div>
        <table id="timesheet" >
            <thead></thead>
            <tbody></tbody>
        </table>
		<div class="actions">
			<div class="btnstyle3" id="clearTimeSheet" data-i18n="Clear">Clear</div>
			<div class="btnstyle3" id="updateSetPoints" data-i18n="Update">Update</div>
		</div>
 </div>		
At this point I have to retrieve all scheduled timers for all device (doesn't exist a filter for idx) with a request at domoticz (https://www.domoticz.com/wiki/Domoticz_ ... or_Devices) and i receive a json like this:

Code: Select all

{
         "Active" : "true",
         "Date" : "",
         "Days" : 128,
         "DevName" : "Set Point Camera",
         "DeviceRowID" : 154,
         "Hue" : 0,
         "IsThermostat" : "false",
         "Level" : 20,
         "MDay" : 0,
         "Month" : 0,
         "Occurence" : 0,
         "Randomness" : "false",
         "ScheduleDate" : "2018-02-14 00:00:00",
         "Time" : "00:00",
         "TimerCmd" : 0,
         "TimerID" : 101,
         "TimerType" : 2,
         "TimerTypeStr" : "On Time",
         "Type" : "Device"
      }
At this point I have to filter the timers received for my device (by name, no idx returned) in order to have all timers for only my device interested.
Up to here, I can do it without any problem (ajax call and javascript filter).

But, how I can call your javascript in order to create your timer table?
Which information and in which format I have to pass it?

I hope that I was clear.. :)

syrhus
Posts: 35
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Weekly programming

Post by syrhus » Tuesday 13 February 2018 23:52

I will try to reply tomorrow evening but first point, on github, I changed the code. No more html code required; the entire table is created from javascript file (planning.js)

Look at my github manual, you "just have" to call the initialisation of the timer somewhere in your code to create the html table after a container id and another call to "fill" the table with the timers ajax response.

Send me your javascript file for your dashboard if you want to explain where to put the javascript calls.

About your dashboard, it look like very nice!! Nice job!

bigpea
Posts: 121
Joined: Thursday 11 August 2016 12:30
Target OS: Raspberry Pi
Domoticz version:
Location: IT
Contact:

Re: Weekly programming

Post by bigpea » Wednesday 14 February 2018 10:28

ok, perfect. as soon as possible I will implement the new code, I will let you know, thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests