fellinga / node-red-contrib-ui-time-scheduler

Easily power on/off any kind of device based on a schedule that you can easily create at the node-red-dashboard frontend.
MIT License
37 stars 15 forks source link

Dashboard crashes #59

Closed postolis closed 2 years ago

postolis commented 2 years ago

Hey, im trying to create a iot garden controller and found your node. The first time i installed it worked like a charm but then i stopped the node-red server and the ui crashed.If i uninstall nodejs and node-red and install them again it fixes the problem until i stop the server again.Im using the latest versions of node-red nodejs and ui time scheduler, im also running the server locally on windows 10 Screenshot_2 Screenshot_1

.

fellinga commented 2 years ago

hi @postolis,

the UI can't work without the server. If you want to have access to the UI and all the UI nodes you have to have the server running.

Why do you want to stop the server?

postolis commented 2 years ago

hello @fellinga sorry i meant i restarted the server.I added two screenshots one before restarting when everything worked fine and a second screenshot how the ui became after restarting.

fellinga commented 2 years ago

Oh I see. Hm.. on the first sight it does not seem to be a problem with the node, it also doesn't seem as if the UI crashes, I think your system just does not save any changes and when you reboot everything goes back to default settings (since even the dark theme switched back to default light theme).

Are you running node-red in a container and if you do, did you add a persistent volume to the container? If its a regular installation, then there is probably something wrong with the .node-red folder or its permissions. Once node-red keeps its settings (theme etc.) after a restart then the ui-scheduler node should work fine too.

postolis commented 2 years ago

Its a regular installation.This happens only when the ui-scheduler is present.Restarting the flow's isnt helping, i also tried running the server from macos same thing happend. I will try running the server from vm or docker in case something changes.

If i delete the ui-scheduler from the flow im getting this. Only restarting the server fixes the ui. Screenshot_3

fellinga commented 2 years ago

If i delete the ui-scheduler from the flow im getting this

If you did not install any other nodes then this screen is normal.

Can you confirm that if you add other nodes (some switch nodes for example) and also change the theme to dark, then restart the server, everything stays the same after a reboot?

postolis commented 2 years ago

Added another switch node but the ui didnt came back , when i restarted without the ui scheduler enabled everything came back back plus the new switch i added.Here is a screenshot with the flow and theme settings. Screenshot_4 Screenshot_5

Screenshot_6

fellinga commented 2 years ago

Please post the output of the node-red-log from the last restart with the UI scheduler enabled here.

Edit: And if you don't mind please also export your flow and post it here as well.

postolis commented 2 years ago

The first screenshot is with the scheduler disabled (ui working normally) second screenshot is with the scheduler enabled (only scheduler is visible and theme changed to default)+ third screenshot is enabling scheduler when ui worked normally(ui page didnt refreshed it self when deployed and showed everything exept the scheduler.When i refreshed the page only the scheduler was visible)

Screenshot_7

Screenshot_8

Screenshot_9

The flow :

flows.txt

fellinga commented 2 years ago

I tried your flow on different systems - ubuntu local install (nodejs 14) as well locally on Windows 10 with Nodejs 16.13 and node-red 2.1.3 and rebooting works just fine. Did you try to run it in Docker yet?

postolis commented 2 years ago

Hey, no it didnt work in Docker but a week ago i upgraded my windows to 11 also upgraded node-dashboard and the ui-scheduler and since then everything runs smoothly.Been testing with restoring the schedules, stopping the server then starting it again not a single problem! v1.16.2 resolved the problem.