SergiuToporjinschi / node-red-contrib-heater-controller

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

I get "TypeError: Cannot read property 'push' of undefined" on deploy #36

Closed bgewehr closed 4 years ago

bgewehr commented 4 years ago

Need help to get started.

node-red 0.20.5 on docker Debian GNU/Linux 10.

Blank heating node added. Configured correctly as far as I can see. Hit deploy. Get error like above from catch node.

Just for checking here my calendar:

{
    "Monday": {
        "00:00": 17,
        "06:00": 22,
        "08:00": 17,
        "16:00": 22,
        "22:30": 17
    },
    "Tuesday": {
        "00:00": 17,
        "06:00": 22,
        "08:00": 17,
        "16:00": 22,
        "22:30": 17
    },
    "Wednesday": {
        "00:00": 17,
        "06:00": 22,
        "08:00": 17,
        "16:00": 22,
        "22:30": 17
    },
    "Thursday": {
        "00:00": 17,
        "06:00": 22,
        "08:00": 17,
        "16:00": 22,
        "22:30": 17
    },
    "Friday": {
        "00:00": 17,
        "06:00": 22,
        "08:00": 17,
        "16:00": 22,
        "22:30": 17
    },
    "Saturday": {
        "00:00": 17,
        "08:00": 20,
        "18:00": 22,
        "23:00": 17
    },
    "Sunday": {
        "00:00": 17,
        "08:00": 20,
        "18:00": 22,
        "23:00": 17
    }
}
SergiuToporjinschi commented 4 years ago

Hi @bgewehr can you give me more details about the exception that you received ? like the stack ? the file and and the line number? and you know 0.20 is quite old version... I've tested on 1.0.3. And you say that is happening when you are deploying the schema?? are you sure that the error is generated by this node? a copy paste of the error stack would help.

bgewehr commented 4 years ago

I will try a node red update tomorrow.

The error did not come from the catch node, it comes from the widget node itself:

Image

bgewehr commented 4 years ago

More details after the update

SergiuToporjinschi commented 4 years ago

ohhh so you do not have access to console? and set node-red debug log level. and make sure you send the current temp before use it. I wrote that in info section, is not usable until is not receiving the first temp

bgewehr commented 4 years ago

Now on nr 1.0.3 - exactly the same behaviour. Then - after next restart:

image

Cool!

How to set the status manually?

bgewehr commented 4 years ago

It would be interesting to have the choice whether the widget sends a single message like this

{"currentTemp":22.3,"targetValue":21.5,"isUserCustom":true,"currentSchedule":{"temp":22,"day":"Wednesday","time":"16:00"},"nextSchedule":{"temp":17,"day":"Wednesday","time":"22:30"},"userTargetValue":21.5,"currentHeaterStatus":"off","time":"1/29/2020, 7:54:09 PM"}

or a series of messages like

/basetopic/currentTemp 22.3
/basetopic/targetValue 21.5
/basetopic/isUserCustom true
/basetopic/currentSchedule {"temp":22,"day":"Wednesday","time":"16:00"}
/basetopic/nextSchedule {"temp":17,"day":"Wednesday","time":"22:30"}
/basetopic/userTargetValue 21.5
/basetopic/currentHeaterStatus off
/basetopic/time 1/29/2020, 7:54:09 PM

that would make it easier to react appropriately in different systems. Will try to do this by using a split node...

SergiuToporjinschi commented 4 years ago

Now on nr 1.0.3 - exactly the same behaviour. Then - after next restart:

image

Cool!

How to set the status manually?

yes you should swipe the slider .....