Closed gulli1986 closed 2 years ago
So when you send one config change, you get first Using saved prices
and then No price data
, is that correct?
If you upgraded recently, please try to delete the node and create it again, just to make sure there is nothing wrong in the nodes context. Alternatively delete all the context data and keep the node. You find the context data by selecting the node, then select Context Data
where you see the debug window, then click the refresh button for Node. You should see data for context
, lastPlan
, lastPriceData
, lastSource
and a coupe of dates. It is safe to delete everything.
See if this helps first. If not, copy config and paste it here. Also paste the message you use to change config.
Hello Otto @ottopaulsen. Thanks for the help. I tried both removing the node and deleting context data without any help. That is correct as you mention, I first get Using saved prices
then immediately No price data
.
This is the message I use to change the config:
{"payload":{"config":{"fromTime":"06:00:00","toTime":"18:00:00","hoursOn":1,"doNotSplit":false,"sendCurrentValueWhenRescheduling":true,"outputIfNoSchedule":false,"outputOutsidePeriod":false}},"data":{"entity_id":"input_button.update_smart_charging","old_state":{"entity_id":"input_button.update_smart_charging","state":"2022-06-13T06:51:56.288304+00:00","attributes":{"editable":true,"icon":"mdi:ev-station","friendly_name":"Update smart charging"},"last_changed":"2022-06-13T06:51:56.288688+00:00","last_updated":"2022-06-13T06:51:56.288688+00:00","context":{"id":"01G5DXAMZVFJMDYB6S4WSQ8DP0","parent_id":null,"user_id":"6923aa91f7ec459685e9800a5fb3c489"},"original_state":"2022-06-13T06:51:56.288304+00:00"},"new_state":{"entity_id":"input_button.update_smart_charging","state":"2022-06-13T06:54:39.687020+00:00","attributes":{"editable":true,"icon":"mdi:ev-station","friendly_name":"Update smart charging"},"last_changed":"2022-06-13T06:54:39.687180+00:00","last_updated":"2022-06-13T06:54:39.687180+00:00","context":{"id":"01G5DXFMJ5XK69G6GWZ9NB428R","parent_id":null,"user_id":"6923aa91f7ec459685e9800a5fb3c489"},"original_state":"2022-06-13T06:54:39.687020+00:00","timeSinceChangedMs":10}},"_msgid":"382112dd95b3939d"}
Here it is easier to read:
Basically I have two input datetime (start and end time for charging) and one input number (battery percentage remaining) that I put together in a payload to change the configuration dynamically and adjust the numbers of Hourson
The config message only needs to hold the information you want to change, so if you only want to set the number of hours, this message should be enough:
{
"payload": {
"config": {
"hoursOn": 1
}
}
}
However, I doubt that is the reason.
Can you look what is stored in the context for the node. Here is an example from me:
Verify that the lastPriceData is saved in file
and that the config is saved in default
.
Then send a config message, and check the context again. Does it still contain the same data?
I did some further testing as you mentioned. Sending only the necessary config did not help, however looking at the context data for the node as you proposed I found out it was empty which explains the No price data
.
As soon as I update the prices trough the Price Receiver
node, the context data fills in accordingly and the error disappears. My plan was to update the prices as soon as my charging cable was connected to the car. However it looks like it sometimes do not register the connection and hence the prices are not updated in the Lowest price
node.
As a workaround I now update the prices / schedule as soon as a new dynamic configuration is pushed to the node. It looks like it is working well.
Thanks for you time and the work you do Otto, much appreciated!
Hello,
I am currently using a dynamic configuration on the
lowest price
node to adjust the amount of hours ("hours on") based on the state of charge of my car. It has been working fine so long however I discovered today that I sometimes get an error message after inputing the dynamic configuration to the node;It seems like the
lowest price
node "forgets" the saved prices once the dynamic configuration is sent to the node. I just updated toPower Saver [v3.5.5]
, can this be related?It looks like the error is showing after some time, sometimes it works, sometimes it doesn't.