SergiuToporjinschi / node-red-contrib-heater-controller

Heater controller for node-red dashboard
GNU General Public License v3.0
18 stars 17 forks source link

Changeable Calendar by message #16

Closed WoMec closed 5 years ago

WoMec commented 5 years ago

Hi, I'm trying to setup home thermostat, but no luck so far. When I deploy your node, setup dashboard group and deploy flow, I can't see ui in dashbard, I get error to debug tab

27. 1. 2019 16:57:14  node: heater
msg : error
"TypeError: Cannot read property 'push' of undefined"

and syslog says

Jan 27 16:57:09 emonpi Node-RED[32323]: { Error: Cannot find module 'node-red-dashboard'
Jan 27 16:57:09 emonpi Node-RED[32323]:     at Object.requireModule [as require] (/usr/lib/node_modules/node-red/red/runtime/nodes/registry/loader.js:71:19)
Jan 27 16:57:09 emonpi Node-RED[32323]:     at new getNode (/home/pi/.node-red/node_modules/node-red-contrib-heater-controller/heater-controller.js:8:26)
Jan 27 16:57:09 emonpi Node-RED[32323]:     at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:305:18)
Jan 27 16:57:09 emonpi Node-RED[32323]:     at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:89:35)
Jan 27 16:57:09 emonpi Node-RED[32323]:     at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:328:29)
Jan 27 16:57:09 emonpi Node-RED[32323]:     at /usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:164:25
Jan 27 16:57:09 emonpi Node-RED[32323]:     at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
Jan 27 16:57:09 emonpi Node-RED[32323]: 27 Jan 16:57:09 - [error] [ui_heater_controller:b78f2f56.b8b6f] TypeError: Cannot read property 'push' of undefined

node red version: v0.19.5 dashboard version: 2.13.0 thermostat verstion: 1.2.0

I also tried to add some dummy buttons and other stuff to dashboard and those are displayed correctly

SergiuToporjinschi commented 5 years ago

Hmmm that's trange, at that line is getting a reference to dashboard. It's like not having node-red-dashboard module installed; I have 2.12.1, probably it has some major change in 13. I will update and do the change tonight.

SergiuToporjinschi commented 5 years ago

Hi, I looked on this but unfortunately I could not reproduce it; Now I'm using node-red-dashboard: 2.13.1 -> unfortunately I cannot put 2.13.0 node red version: 0.19.5

Can you please update dashboard to 2.13.1 ? maybe they had an issue at 2.13.0. And let me know if it's working

WoMec commented 5 years ago

I found probable problem. I found, that months ago I installed dashboard via cli so I was unable to update dashboard module via palette manager. So I uninstalled dashboard from cli, reinstall it from palette manager and heater control works perfectly now.

Maybe I have one more question. is it somehow possible to edit calendar from UI? Via some other input? Or do you planning to add calendar editor to the UI?

SergiuToporjinschi commented 5 years ago

Good to hear that is working. No I did not planned this, but it seems a good idea. The problem is that I don't know when I will be able to do that. Currently I'm working on other project

vdoucet commented 5 years ago

I thought of using google calendar as an input to userTargetValue but I'm not ready yet to test that. That way you can update your calendar from anywhere ... not sure yet how to run it though !

SergiuToporjinschi commented 5 years ago

I've marked this as enhancement. I will do the changes for that.

WoMec commented 5 years ago

Changeable Calendar by message or UI in widget :)

ulfh2018 commented 5 years ago

Would love to have that functionality. Just what I need for my project! Good luck - this node looks greate!

daimoniac commented 5 years ago

I think that pushing in the calendar by msg or variable would be a great addition. At the moment, you cannot really use this widget in a subflow because of that restriction.

ulfh2018 commented 5 years ago

Yes, but I hope that the calendar will be accessible from the desktop, and not via Google Calendar, since there are a lot of people that doe's not us it. I think it would be enough to have access to a general week that is not associated with any particular week in the year. I have started making an application to control heating at my son's apartment. The electricity in Norway is very expencive for the time beeing, though compared to many other places in the world it's relative cheap.

WoMec commented 5 years ago

It would be nice to have something like this (Wolf Smartset app)

image

SergiuToporjinschi commented 5 years ago

@WoMec looks nice, but is not sow easy to do.. let's not forget that there are a lot of restriction, basically I have done a plugin to an app ... probably there will be a lot of restrictions. And in your picture I cannot see how the intervals can be added and set the temperature for each interval. some sliders are already in angular material https://material.angularjs.org/latest/demo/slider but those does not permit multiple intervals currently I'm stacked in an firmware update for my IOT devices...

ulfh2018 commented 5 years ago

Would it be possible to add an input parameter that could change the calendar json? Then I can do the rest myself

SergiuToporjinschi commented 5 years ago

@ulfh2018 if you implement it, and create a pull request, I would review it and merge it

ulfh2018 commented 5 years ago

Sergiu – I'm sorry but I'm not a programmer, so I was thinking about trying to use standard Nod-Red plugins to get information I can format to a jason string, but then I need an input parameter to your node that will be able to change the values in the json string you are using. Don't even know if this is possible to implement.

Best regards

Ulf

Fra: Sergiu Toporjinschi [mailto:notifications@github.com] Sendt: 3. mars 2019 21:23 Til: SergiuToporjinschi/node-red-contrib-heater-controller Kopi: ulfh2018; Mention Emne: Re: [SergiuToporjinschi/node-red-contrib-heater-controller] Changeable Calendar by message (#16)

@ulfh2018 https://github.com/ulfh2018 if you implement it, and create a pull request, I would review it and merge it

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SergiuToporjinschi/node-red-contrib-heater-controller/issues/16#issuecomment-469060252 , or mute the thread https://github.com/notifications/unsubscribe-auth/Ai9skMkpWSc416H1d79ECqKywAN2KXWgks5vTC8agaJpZM4aUy7k .Bilde er fjernet av sender.

SergiuToporjinschi commented 5 years ago

@ulfh2018 I understand, I will do the change, is possible, but you have to wait. Thank you for understanding!

SergiuToporjinschi commented 5 years ago

Check latest version and let me know how is working

ulfh2018 commented 5 years ago

Hi. Downloaded latest version, which looks nice. I have downloaded the test flow, and there might be things I don't understand, but when I try to change the calendar values (for example Monday 00:00 which have a value of 99, I cannot see that anything changes.

Best regards Ulf

ulfh2018 commented 5 years ago

I have just upgraded to 1.0.2

Sendt fra min iPhone

  1. mar. 2019 kl. 22:32 skrev Sergiu Toporjinschi notifications@github.com:

Check latest version and let me know how is working

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

SergiuToporjinschi commented 5 years ago

@ulfh2018 the latest version is 1.2.1 you need to send a message with topic setCalendar and needs to be JSON type not String representing a json image

ulfh2018 commented 5 years ago

Does this mean that your example does not work? I copied the code, then I sent Current temp, which worked, so I sent setCalendar, and that did not change anything in the calendar. Monday was still set up with 99 degrees at 00:00. I used your sample code, not anything I had written myself

Fra: Sergiu Toporjinschi [mailto:notifications@github.com] Sendt: 14. mars 2019 17:56 Til: SergiuToporjinschi/node-red-contrib-heater-controller Kopi: ulfh2018; Mention Emne: Re: [SergiuToporjinschi/node-red-contrib-heater-controller] Changeable Calendar by message (#16)

@ulfh2018 https://github.com/ulfh2018 the latest version is 1.2.1 you need to send a message with topic setCalendar and needs to be JSON type not String representing a json https://user-images.githubusercontent.com/9376439/54375978-ba81a300-468a-11e9-89f8-445d149e424c.png image

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SergiuToporjinschi/node-red-contrib-heater-controller/issues/16#issuecomment-472961660 , or mute the thread https://github.com/notifications/unsubscribe-auth/Ai9skNMLYqgtLtGlPNuxj8VluPx7uybnks5vWn8FgaJpZM4aUy7k . https://github.com/notifications/beacon/Ai9skHEyI1t5zrQALcHLrIk0AGGCvtqVks5vWn8FgaJpZM4aUy7k.gif

SergiuToporjinschi commented 5 years ago

@ulfh2018 Are you using 1.2.1 version?

ulfh2018 commented 5 years ago

Yes, I am

Fra: Sergiu Toporjinschi [mailto:notifications@github.com] Sendt: 14. mars 2019 19:42 Til: SergiuToporjinschi/node-red-contrib-heater-controller Kopi: ulfh2018; Mention Emne: Re: [SergiuToporjinschi/node-red-contrib-heater-controller] Changeable Calendar by message (#16)

@ulfh2018 https://github.com/ulfh2018 Are you using 1.2.1 version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SergiuToporjinschi/node-red-contrib-heater-controller/issues/16#issuecomment-473007212 , or mute the thread https://github.com/notifications/unsubscribe-auth/Ai9skKhxxnmy4qZscNkZbjaQBOAc5ucOks5vWpfqgaJpZM4aUy7k . https://github.com/notifications/beacon/Ai9skH4wQVO1uEtwTkyr9LlgDqXpz2dMks5vWpfqgaJpZM4aUy7k.gif

benbamm commented 3 years ago

Is there any news on this? I have also been trying to change the calendar through injecting JSON but I also can not get it to work...

andreapx commented 1 year ago

@SergiuToporjinschi maybe you could use the output of the node node-red-contrib-ui-time-scheduler to feed the data into your node