Item change trigger does not trigger rule

  • Platform information:
    • Hardware:Orangepi 3 LTS
    • OS: Armbian 5.15
    • InfluxDB
    • openHAB version: 3.4.4

I use the code developed by @masipila to control my heat pump to follow spot electricity price. I also use the script to update points in InfluxDV to control my dishwasher to start at night at the cheapest hour.

The logic goes as follows:
The script fetches the electricity spot price for tomorrow

  1. Prices for tomorrow are stored in InfluxDB hour by hour
  2. The code finds the cheapest consecutive 3 hours from the forecast
  3. These hours are marked in a separate InfluxDB registry as 1, the other hours are marked 0
  4. Every hour a script reads the current hour status, 1 or 0, from influxdb and updates a number item, dishwasherControl accordingly
  5. If the item status changes from 0 to 1 the dishwasher should start

This is the script that writes data to influxdb:

dh = require('test/date-helper.js');
wh = require('test/waterheater.js');
influx = require('test/influx.js');

start = dh.getMidnight('start');
stop = dh.getMidnight('stop');

// Determine cheap hours for dishwasher and washer and write control values to the database
hours = 2;
points = wh.determineHours(start, stop, hours);
influx.writePoints('dishwasher_control', points);

// Determine cheap hours for washer and write control values to the database
hours = 2;
points = wh.determineHours(start, stop, hours);
influx.writePoints('washer_control', points);

This script reads influxdb every hour and updates the dishwasherControl an washerControl items:

dh = require('sienitie18/date-helper.js');
influx = require('sienitie18/influx.js');
nyt = dh.getCurrentHour();

// update dishwasher control item
tiskikoneenOhjaus = influx.getCurrentControl('dishwasher_control',nyt);
console.log("Tiskikoneen ohjaus: " + tiskikoneenOhjaus);
items.getItem("dishwasherControl").postUpdate(tiskikoneenOhjaus);

// update washer control item
pesukoneenOhjaus = influx.getCurrentControl('washer_control',nyt);
console.log("Pesukoneen ohjaus: " + pesukoneenOhjaus);
items.getItem("washerControl").postUpdate(pesukoneenOhjaus);

I have a rule that is triggered when item dishwasherControl changes to 1:

configuration: {}
triggers:
  - id: "3"
    configuration:
      itemName: dishwasherControl
      state: "1"
    type: core.ItemStateChangeTrigger
conditions:
  - inputs: {}
    id: "6"
    configuration:
      itemName: Siemens_Astianpesukone_012020388740013427_Operation_State
      state: Run
      operator: "!="
    type: core.ItemStateCondition
actions:
  - inputs: {}
    id: "4"
    configuration:
      itemName: Siemens_Astianpesukone_012020388740013427_Virta
      command: ON
    type: core.ItemCommandAction
  - inputs: {}
    id: "2"
    configuration:
      itemName: Siemens_Astianpesukone_012020388740013427_Selected_Program
      command: Dishcare.Dishwasher.Program.Auto2
    type: core.ItemCommandAction
  - inputs: {}
    id: "5"
    configuration:
      itemName: Siemens_Astianpesukone_012020388740013427_Program_Actions
      command: start
    type: core.ItemCommandAction
  - inputs: {}
    id: "1"
    configuration:
      itemName: Siemens_Astianpesukone_012020388740013427_Program_Actions
      command: start
    type: core.ItemCommandAction

The problem
If I change the item dishwasherControl status manually by running the following single line script, the dishwasher starts

items.getItem("dishwasherControl").postUpdate("1");

However, if dishwasherControl is updated by the script above the script is not triggered. Analysis of dishwasherControl shows, that the item value has been updated at 4 AM last night:

Dishwasher did not start.

How come updating item dishwasherControl manually triggers the rule but automatic udates do not?

What’s your log saying?
Also there could be a difference between 1 and “1” in the state?

The log says the status has changed from 0 to 1.

The difference between 1 and “1” is unclear to me, I should probably test this.

Within programming “1” is a string with the character 1 and 1 a number. Not sure if that will matter for openhab

I think you have to use sendCommand instead of postUpdate. See Rules | openHAB

My manual script uses postUpdate and that works.

Can you share the logs here so that we can see the chain of events there?

Can you remove the condition for testing, to verify that is not preventing the rule to run?

What type of Item is dishwasherControl?

What’s the state of Siemens_Astianpesukone_012020388740013427_Operation_State?

Does this actually change the state? If the Item was already 1 there’d be no change and the rule won’t trigger.

When logs are requested, please post the actual logs, not just a description of them.

The sort of information we need is:

  • state of the Items before the update
  • events.log showing the Items changing states and receiving commands
  • openhab.log showing any logs created by the rule, particularly errors.

Depends on the Item type.

postUpdate should work here so long as the Item isn’t already 1.

Here is the log from last night:

023-06-22 02:00:00.081 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Getting the current value for nibe_control...
2023-06-22 02:00:00.121 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Getting the current value for washer_control...
2023-06-22 02:00:00.130 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Current nibe_control is 0
2023-06-22 02:00:00.134 [INFO ] [nhab.automation.script.ui.2f5869435c] - Heat pump compressor: No state change needed.
2023-06-22 02:00:00.173 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Current washer_control is 0
2023-06-22 02:00:00.174 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - Washer: No state change needed.
2023-06-22 02:00:00.601 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for dishwasher_control...
2023-06-22 02:00:00.634 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Getting the current value for spot_price...
2023-06-22 02:00:00.648 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current dishwasher_control is 0
2023-06-22 02:00:00.649 [INFO ] [nhab.automation.script.ui.722b404955] - Tiskikoneen ohjaus: 0
2023-06-22 02:00:00.654 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for washer_control...
2023-06-22 02:00:00.675 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Getting the current value for drier_control...
2023-06-22 02:00:00.704 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Current spot_price is 5.6184400000000005
2023-06-22 02:00:00.718 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current washer_control is 0
2023-06-22 02:00:00.719 [INFO ] [nhab.automation.script.ui.722b404955] - Pesukoneen ohjaus: 0
2023-06-22 02:00:00.758 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Current drier_control is 1
2023-06-22 02:00:00.763 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - Drier ON.
2023-06-22 03:00:00.075 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Getting the current value for nibe_control...
2023-06-22 03:00:00.121 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Current nibe_control is 0
2023-06-22 03:00:00.121 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Getting the current value for washer_control...
2023-06-22 03:00:00.125 [INFO ] [nhab.automation.script.ui.2f5869435c] - Heat pump compressor: No state change needed.
2023-06-22 03:00:00.164 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Current washer_control is 1
2023-06-22 03:00:00.601 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for dishwasher_control...
2023-06-22 03:00:00.633 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Getting the current value for spot_price...
2023-06-22 03:00:00.654 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current dishwasher_control is 1
2023-06-22 03:00:00.656 [INFO ] [nhab.automation.script.ui.722b404955] - Tiskikoneen ohjaus: 1
2023-06-22 03:00:00.658 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for washer_control...
2023-06-22 03:00:00.674 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Getting the current value for drier_control...
2023-06-22 03:00:00.703 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Current spot_price is 5.1398
2023-06-22 03:00:00.707 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current washer_control is 1
2023-06-22 03:00:00.709 [INFO ] [nhab.automation.script.ui.722b404955] - Pesukoneen ohjaus: 1
2023-06-22 03:00:00.752 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Current drier_control is 1
2023-06-22 03:00:00.754 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - Drier: No state change needed.
2023-06-22 03:00:00.763 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - Washer: Started.
2023-06-22 04:00:00.081 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Getting the current value for nibe_control...
2023-06-22 04:00:00.120 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Getting the current value for washer_control...
2023-06-22 04:00:00.133 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Current nibe_control is 0
2023-06-22 04:00:00.136 [INFO ] [nhab.automation.script.ui.2f5869435c] - Heat pump compressor: No state change needed.
2023-06-22 04:00:00.172 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Current washer_control is 1
2023-06-22 04:00:00.602 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for dishwasher_control...
2023-06-22 04:00:00.603 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - Washer: Started.
2023-06-22 04:00:00.633 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Getting the current value for spot_price...
2023-06-22 04:00:00.648 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current dishwasher_control is 1
2023-06-22 04:00:00.649 [INFO ] [nhab.automation.script.ui.722b404955] - Tiskikoneen ohjaus: 1
2023-06-22 04:00:00.652 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for washer_control...
2023-06-22 04:00:00.674 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Getting the current value for drier_control...
2023-06-22 04:00:00.751 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current washer_control is 1
2023-06-22 04:00:00.753 [INFO ] [nhab.automation.script.ui.722b404955] - Pesukoneen ohjaus: 1
2023-06-22 04:00:00.762 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Current spot_price is 5.09268
2023-06-22 04:00:00.836 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Current drier_control is 1
2023-06-22 04:00:00.838 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - Drier: No state change needed.
2023-06-22 05:00:00.076 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Getting the current value for nibe_control...
2023-06-22 05:00:00.122 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Getting the current value for washer_control...
2023-06-22 05:00:00.123 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Current nibe_control is 0
2023-06-22 05:00:00.167 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Current washer_control is 0
2023-06-22 05:00:00.168 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - Washer: No state change needed.
2023-06-22 05:00:00.600 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for dishwasher_control...
2023-06-22 05:00:00.634 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Getting the current value for spot_price...
2023-06-22 05:00:00.659 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current dishwasher_control is 0
2023-06-22 05:00:00.662 [INFO ] [nhab.automation.script.ui.722b404955] - Tiskikoneen ohjaus: 0
2023-06-22 05:00:00.664 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for washer_control...
2023-06-22 05:00:00.674 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Getting the current value for drier_control...
2023-06-22 05:00:00.702 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Current spot_price is 5.6234
2023-06-22 05:00:00.731 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Current drier_control is 1
2023-06-22 05:00:00.734 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - Drier: No state change needed.
2023-06-22 05:00:00.765 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current washer_control is 0
2023-06-22 05:00:00.767 [INFO ] [nhab.automation.script.ui.722b404955] - Pesukoneen ohjaus: 0
2023-06-22 06:00:00.080 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Getting the current value for nibe_control...
2023-06-22 06:00:00.120 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Getting the current value for washer_control...
2023-06-22 06:00:00.127 [INFO ] [nhab.automation.script.ui.2f5869435c] - influx.js: Current nibe_control is 0
2023-06-22 06:00:00.130 [INFO ] [nhab.automation.script.ui.2f5869435c] - Heat pump compressor: No state change needed.
2023-06-22 06:00:00.167 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - influx.js: Current washer_control is 0
2023-06-22 06:00:00.168 [INFO ] [nhab.automation.script.ui.3182dbd7b9] - Washer: No state change needed.
2023-06-22 06:00:00.601 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for dishwasher_control...
2023-06-22 06:00:00.634 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Getting the current value for spot_price...
2023-06-22 06:00:00.655 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current dishwasher_control is 0
2023-06-22 06:00:00.657 [INFO ] [nhab.automation.script.ui.722b404955] - Tiskikoneen ohjaus: 0
2023-06-22 06:00:00.660 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Getting the current value for washer_control...
2023-06-22 06:00:00.674 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Getting the current value for drier_control...
2023-06-22 06:00:00.684 [INFO ] [nhab.automation.script.ui.70e8e77f5c] - influx.js: Current spot_price is 6.18264
2023-06-22 06:00:00.712 [INFO ] [nhab.automation.script.ui.722b404955] - influx.js: Current washer_control is 0
2023-06-22 06:00:00.714 [INFO ] [nhab.automation.script.ui.722b404955] - Pesukoneen ohjaus: 0
2023-06-22 06:00:00.725 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - influx.js: Current drier_control is 0
2023-06-22 06:00:00.728 [INFO ] [nhab.automation.script.ui.b2e14a2c5f] - Drier OFF.

It is of the type Number.

When not running it is “inactive”. Did not check what it was at 4 in the morning, though.

I think it does so, at least judging from the logs.

The openhab.log is posted above, where the item states may be available.
Events log:

023-06-22 03:00:00.167 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' received command ON
2023-06-22 03:00:00.179 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' predicted to become ON
2023-06-22 03:00:00.188 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' changed from OFF to ON
2023-06-22 03:00:00.567 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' received command ON
2023-06-22 03:00:00.576 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' predicted to become OFF
2023-06-22 03:00:00.661 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dishwasherControl' changed from 0.0 to 1.0
2023-06-22 03:00:00.709 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sahkonHinta' changed from 5.6184400000000005 to 5.1398
2023-06-22 03:00:00.714 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'washerControl' changed from 0.0 to 1.0
2023-06-22 03:00:00.891 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' received command OFF
2023-06-22 03:00:00.899 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' predicted to become OFF
2023-06-22 03:00:00.903 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' changed from ON to OFF
2023-06-22 03:00:01.271 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' received command OFF
2023-06-22 03:00:01.273 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' predicted to become OFF
2023-06-22 03:00:04.988 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Takan_Zigbee_anturi_Takka' changed from 22.6 °C to 22.5 °C
2023-06-22 03:00:04.991 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 225 °C to 22.5 °C through Takan_Zigbee_anturi_Takka
2023-06-22 03:00:24.486 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MIinan_huoneen_Zigbee_sensori_Miinan_huoneen_lampotila' changed from 21.6 °C to 21.3 °C
2023-06-22 03:00:33.941 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Autotallin_Zigbeeanturi_Autotallin_Lampotilaanturi' changed from 21.4 °C to 21.3 °C
2023-06-22 03:04:00.001 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:rise#event triggered START
2023-06-22 03:10:04.901 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 225 °C to 22.5 °C through Takan_Zigbee_anturi_Takka
2023-06-22 03:10:09.696 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aulanZigbeeAnturi' changed from 21.8 °C to 21.6 °C
2023-06-22 03:10:14.881 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TerassinZigbeeLampoAnturi' changed from 14.4 °C to 14.1 °C
2023-06-22 03:17:00.001 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:daylight#event triggered START
2023-06-22 03:17:00.002 [INFO ] [openhab.event.ChannelTriggeredEvent ] - astro:sun:local:rise#event triggered END
2023-06-22 03:20:05.342 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 225 °C to 22.5 °C through Takan_Zigbee_anturi_Takka
2023-06-22 03:20:19.722 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aaroninHuoneenAnturi' changed from 23.7 °C to 23.6 °C
2023-06-22 03:20:19.725 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'aaroninMakuuhuone' changed from 23.7 °C to 23.6 °C through aaroninHuoneenAnturi
2023-06-22 03:20:39.623 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'radioHuoneenLampotilaMqtt' changed from 22.8 °C to 22.7 °C
2023-06-22 03:30:04.907 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Takan_Zigbee_anturi_Takka' changed from 22.5 °C to 22.3 °C
2023-06-22 03:30:04.911 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 223 °C to 22.3 °C through Takan_Zigbee_anturi_Takka
2023-06-22 03:30:23.836 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MIinan_huoneen_Zigbee_sensori_Miinan_huoneen_lampotila' changed from 21.3 °C to 21.1 °C
2023-06-22 03:30:33.943 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Autotallin_Zigbeeanturi_Autotallin_Lampotilaanturi' changed from 21.3 °C to 21.2 °C
2023-06-22 03:40:04.912 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 223 °C to 22.3 °C through Takan_Zigbee_anturi_Takka
2023-06-22 03:40:09.663 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aulanZigbeeAnturi' changed from 21.6 °C to 21.4 °C
2023-06-22 03:40:14.400 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TerassinZigbeeLampoAnturi' changed from 14.1 °C to 13.6 °C
2023-06-22 03:40:29.129 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ZigbeeSensori' changed from 24.6 °C to 24.5 °C
2023-06-22 03:50:04.927 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 223 °C to 22.3 °C through Takan_Zigbee_anturi_Takka
2023-06-22 03:50:19.736 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aaroninHuoneenAnturi' changed from 23.6 °C to 23.4 °C
2023-06-22 03:50:19.739 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'aaroninMakuuhuone' changed from 23.6 °C to 23.4 °C through aaroninHuoneenAnturi
2023-06-22 03:50:38.742 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'radioHuoneenLampotilaMqtt' changed from 22.7 °C to 22.6 °C
2023-06-22 04:00:00.175 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' received command ON
2023-06-22 04:00:00.187 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' predicted to become ON
2023-06-22 04:00:00.199 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' changed from OFF to ON
2023-06-22 04:00:00.425 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' received command ON
2023-06-22 04:00:00.436 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' predicted to become OFF
2023-06-22 04:00:00.774 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sahkonHinta' changed from 5.1398 to 5.09268
2023-06-22 04:00:00.882 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' received command OFF
2023-06-22 04:00:00.891 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' predicted to become OFF
2023-06-22 04:00:00.895 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Pesukoneen_virtakatkaisija_Pesukoneen_virtakytkin' changed from ON to OFF
2023-06-22 04:00:01.107 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' received command OFF
2023-06-22 04:00:01.119 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Pesukoneen_ohjelmanappi_pesukoneenOhjelmaNappi' predicted to become OFF
2023-06-22 04:00:05.527 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 222 °C to 22.2 °C through Takan_Zigbee_anturi_Takka
2023-06-22 04:00:05.528 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Takan_Zigbee_anturi_Takka' changed from 22.3 °C to 22.2 °C
2023-06-22 04:00:24.572 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MIinan_huoneen_Zigbee_sensori_Miinan_huoneen_lampotila' changed from 21.1 °C to 20.8 °C
2023-06-22 04:10:04.954 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 222 °C to 22.2 °C through Takan_Zigbee_anturi_Takka
2023-06-22 04:10:09.719 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aulanZigbeeAnturi' changed from 21.4 °C to 21.2 °C
2023-06-22 04:10:14.446 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TerassinZigbeeLampoAnturi' changed from 13.6 °C to 13.3 °C
2023-06-22 04:10:28.802 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ZigbeeSensori' changed from 24.5 °C to 24.4 °C
2023-06-22 04:18:53.379 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 0 W/m² to 20.708617506597598 W/m²
2023-06-22 04:20:04.936 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 222 °C to 22.2 °C through Takan_Zigbee_anturi_Takka
2023-06-22 04:20:19.271 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aaroninHuoneenAnturi' changed from 23.4 °C to 23.2 °C
2023-06-22 04:20:19.274 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'aaroninMakuuhuone' changed from 23.4 °C to 23.2 °C through aaroninHuoneenAnturi
2023-06-22 04:23:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 20.708617506597598 W/m² to 22.891902273835065 W/m²
2023-06-22 04:28:53.379 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 22.891902273835065 W/m² to 25.143183248021963 W/m²
2023-06-22 04:30:04.923 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Takan_Zigbee_anturi_Takka' changed from 22.2 °C to 22.1 °C
2023-06-22 04:30:04.927 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 221 °C to 22.1 °C through Takan_Zigbee_anturi_Takka
2023-06-22 04:30:24.438 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MIinan_huoneen_Zigbee_sensori_Miinan_huoneen_lampotila' changed from 20.8 °C to 20.6 °C
2023-06-22 04:30:34.030 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Autotallin_Zigbeeanturi_Autotallin_Lampotilaanturi' changed from 21.2 °C to 21.1 °C
2023-06-22 04:33:53.379 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 25.143183248021963 W/m² to 27.468845665925524 W/m²
2023-06-22 04:38:53.379 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 27.468845665925524 W/m² to 29.876697520343455 W/m²
2023-06-22 04:40:05.414 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 221 °C to 22.1 °C through Takan_Zigbee_anturi_Takka
2023-06-22 04:40:10.593 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aulanZigbeeAnturi' changed from 21.2 °C to 21 °C
2023-06-22 04:40:15.493 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TerassinZigbeeLampoAnturi' changed from 13.3 °C to 13.1 °C
2023-06-22 04:43:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 29.876697520343455 W/m² to 32.3757486446299 W/m²
2023-06-22 04:48:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 32.3757486446299 W/m² to 34.97602548834719 W/m²
2023-06-22 04:50:04.938 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 221 °C to 22.1 °C through Takan_Zigbee_anturi_Takka
2023-06-22 04:50:19.277 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aaroninHuoneenAnturi' changed from 23.2 °C to 23 °C
2023-06-22 04:50:19.281 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'aaroninMakuuhuone' changed from 23.2 °C to 23 °C through aaroninHuoneenAnturi
2023-06-22 04:50:38.793 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'radioHuoneenLampotilaMqtt' changed from 22.6 °C to 22.5 °C
2023-06-22 04:53:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 34.97602548834719 W/m² to 37.68817543342162 W/m²
2023-06-22 04:56:23.904 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Lampopumpun_ohjaus_Nibe1245_rele' changed from OFF to ON
2023-06-22 04:58:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 37.68817543342162 W/m² to 40.52316932740925 W/m²
2023-06-22 05:00:00.128 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Lampopumpun_ohjaus_Nibe1245_rele' received command OFF
2023-06-22 05:00:00.138 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Lampopumpun_ohjaus_Nibe1245_rele' predicted to become OFF
2023-06-22 05:00:00.147 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Lampopumpun_ohjaus_Nibe1245_rele' changed from ON to OFF
2023-06-22 05:00:00.666 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dishwasherControl' changed from 1.0 to 0.0
2023-06-22 05:00:00.708 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sahkonHinta' changed from 5.09268 to 5.6234
2023-06-22 05:00:00.771 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'washerControl' changed from 1.0 to 0.0
2023-06-22 05:00:04.942 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Takan_Zigbee_anturi_Takka' changed from 22.1 °C to 22 °C
2023-06-22 05:00:04.946 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 220 °C to 22 °C through Takan_Zigbee_anturi_Takka
2023-06-22 05:00:24.545 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MIinan_huoneen_Zigbee_sensori_Miinan_huoneen_lampotila' changed from 20.6 °C to 20.4 °C
2023-06-22 05:00:34.086 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Autotallin_Zigbeeanturi_Autotallin_Lampotilaanturi' changed from 21.1 °C to 21 °C
2023-06-22 05:00:59.001 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Nibe1245Sensor' changed from OFF to ON
2023-06-22 05:00:59.003 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Nibe1245StatusNumber' changed from 0 to 1
2023-06-22 05:03:53.380 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 40.52316932740925 W/m² to 43.49197788751984 W/m²
2023-06-22 05:08:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 43.49197788751984 W/m² to 46.605219945062146 W/m²
2023-06-22 05:10:04.909 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 220 °C to 22 °C through Takan_Zigbee_anturi_Takka
2023-06-22 05:10:09.684 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aulanZigbeeAnturi' changed from 21 °C to 20.9 °C
2023-06-22 05:10:29.133 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ZigbeeSensori' changed from 24.4 °C to 24.3 °C
2023-06-22 05:13:53.380 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 46.605219945062146 W/m² to 49.87301604140222 W/m²
2023-06-22 05:15:58.719 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Nibe1245Sensor' changed from ON to OFF
2023-06-22 05:15:58.720 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Nibe1245StatusNumber' changed from 1 to 0
2023-06-22 05:18:53.380 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 49.87301604140222 W/m² to 53.30463534705911 W/m²
2023-06-22 05:20:05.141 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 220 °C to 22 °C through Takan_Zigbee_anturi_Takka
2023-06-22 05:20:19.674 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aaroninHuoneenAnturi' changed from 23 °C to 22.9 °C
2023-06-22 05:20:19.677 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'aaroninMakuuhuone' changed from 23 °C to 22.9 °C through aaroninHuoneenAnturi
2023-06-22 05:20:38.639 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'radioHuoneenLampotilaMqtt' changed from 22.5 °C to 22.4 °C
2023-06-22 05:23:53.384 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 53.30463534705911 W/m² to 56.908436504803525 W/m²
2023-06-22 05:28:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 56.908436504803525 W/m² to 60.69175452200436 W/m²
2023-06-22 05:30:04.905 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Takan_Zigbee_anturi_Takka' changed from 22 °C to 21.9 °C
2023-06-22 05:30:04.910 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 219 °C to 21.9 °C through Takan_Zigbee_anturi_Takka
2023-06-22 05:33:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 60.69175452200436 W/m² to 64.66076591353674 W/m²
2023-06-22 05:38:53.378 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 64.66076591353674 W/m² to 68.8205083316983 W/m²
2023-06-22 05:40:04.886 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 219 °C to 21.9 °C through Takan_Zigbee_anturi_Takka
2023-06-22 05:40:14.367 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TerassinZigbeeLampoAnturi' changed from 13.1 °C to 13.4 °C
2023-06-22 05:43:53.379 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 68.8205083316983 W/m² to 73.17487795920579 W/m²
2023-06-22 05:48:53.378 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 73.17487795920579 W/m² to 77.72658225814456 W/m²
2023-06-22 05:50:04.914 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'Olohuone' changed from 219 °C to 21.9 °C through Takan_Zigbee_anturi_Takka
2023-06-22 05:50:19.629 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'aaroninHuoneenAnturi' changed from 22.9 °C to 22.7 °C
2023-06-22 05:50:19.632 [INFO ] [hab.event.GroupItemStateChangedEvent] - Item 'aaroninMakuuhuone' changed from 22.9 °C to 22.7 °C through aaroninHuoneenAnturi
2023-06-22 05:50:38.644 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'radioHuoneenLampotilaMqtt' changed from 22.4 °C to 22.3 °C
2023-06-22 05:53:53.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 77.72658225814456 W/m² to 82.47732612284155 W/m²
2023-06-22 05:58:53.379 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Aurinko_Sateily_yhteensa' changed from 82.47732612284155 W/m² to 87.42772186161257 W/m²

Will try next night.
@masipila is it possible to change the point data in influxdb, so that I can test this during daytime instead of once per night only?

For sure it is. I have a small script that I use every now and then for this kind of debugging purposes:

influx = require('change-this-to-be-correct-path/influx.js');

// change this to be the point you want
measurement = 'spot_price';

// Define one or more points to be written like this
points = [
    {
        "datetime": "2023-05-27T22:00:00Z",
        "value": -0.42408
    },
    {
        "datetime": "2023-05-27T23:00:00Z",
        "value": -0.44144
    }
];
influx.writePoints(measurement, points);

Note that the timestamps are on UTC. Finland is 3 hours ahead of UTC during daylight saving.

I propose to debug this as follows:

  1. Change the item state manually and observe that the dishwasher starts as expected
  • Copy the logs (events.log and openhab.log) here where you can see your manual item change and the piece of logs where the dishwasher starts.
  • For the sake of clarity, mention the timestamp when you manually updated the item state.
  1. Write a control point with value 1 with the script from my previous post to a full hour when you want to test this.
  • Copy the same logs and post them here
  • For the sake of clarity, mention the timestamp when you were expecting the dishwasher to start

I ran this one-liner at 22:44:

items.getItem("dishwasherControl").postUpdate("1");

The item changed accordingly:

Events.log:

2023-06-22 22:44:22.963 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dishwasherControl' changed from 0.0 to 1
2023-06-22 22:44:22.966 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Siemens_Astianpesukone_012020388740013427_Virta' received command ON
2023-06-22 22:44:22.978 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Siemens_Astianpesukone_012020388740013427_Selected_Program' received command Dishcare.Dishwasher.Program.Auto2
2023-06-22 22:44:22.986 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Siemens_Astianpesukone_012020388740013427_Program_Actions' received command start
2023-06-22 22:44:22.996 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Siemens_Astianpesukone_012020388740013427_Program_Actions' received command start
2023-06-22 22:44:22.998 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Siemens_Astianpesukone_012020388740013427_Virta' predicted to become ON
2023-06-22 22:44:23.005 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Siemens_Astianpesukone_012020388740013427_Selected_Program' predicted to become Dishcare.Dishwasher.Program.Auto2
2023-06-22 22:44:23.012 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Siemens_Astianpesukone_012020388740013427_Program_Actions' predicted to become start
2023-06-22 22:44:23.020 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Siemens_Astianpesukone_012020388740013427_Program_Actions' predicted to become start
2023-06-22 22:44:23.022 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Virta' changed from OFF to ON
2023-06-22 22:44:23.023 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Selected_Program' changed from UNDEF to Dishcare.Dishwasher.Program.Auto2
2023-06-22 22:44:23.023 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Program_Actions' changed from  to start
2023-06-22 22:44:27.644 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Selected_Program' changed from Dishcare.Dishwasher.Program.Auto2 to Dishcare.Dishwasher.Program.Eco50
2023-06-22 22:44:27.647 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Remaining_Program_Time' changed from UNDEF to 17700 s
2023-06-22 22:44:27.648 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Progress_State' changed from UNDEF to 0 %
2023-06-22 22:44:28.368 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Remaining_Program_Time' changed from 17700 s to UNDEF
2023-06-22 22:44:28.372 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Door_State' changed from CLOSED to OPEN
2023-06-22 22:44:28.433 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Operation_State' changed from Inactive to Ready
2023-06-22 22:44:28.435 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Progress_State' changed from 0 % to UNDEF
2023-06-22 22:44:29.427 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Selected_Program' changed from Dishcare.Dishwasher.Program.Eco50 to Dishcare.Dishwasher.Program.Auto2
2023-06-22 22:44:29.428 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Remaining_Program_Time' changed from UNDEF to 8400 s
2023-06-22 22:44:30.375 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Siemens_Astianpesukone_012020388740013427_Program_Actions' changed from start to 

Dishwasher is active and waiting for program start command.

Now looking at this it looks like the diswasher is still in some kind of power-up sequence when OpenHAB already gives program select and start commands. As there is no way to insert delays in rules without scripts, I will try a script with delays between the commands. Report will follow.

If you run it manually your item is changing from 0.0 to 1

If it’s automatically it’s changing from 0.0 to 1.0
That’s why it’s important to provide the exact log…

1 and 1.0 is technically different, therefore the rule is not running.
Adjust your rule to run at state 1.0 or better use a switch item with on/off state, if the number own will only change between 0 and 1

This “1” vs “1.0” seems to be the root cause to the problem. Changing the rule to run at state 1.0 indeed starts the dishwasher. However, I would rather use the ON and OFF states and a switch that would give direct control of the item. It works, but this leads to problems with the InfluxDB database type, as it is a float:

2023-06-23 11:36:55.282 [ERROR] [.client.write.events.WriteErrorEvent] - The error occurred during writing of data
com.influxdb.exceptions.UnprocessableEntityException: failure writing points to database: partial write: field type conflict: input field "value" on measurement "dishwasherControl" is type integer, already exists as type float dropped=1

Thank you all for helping with the debugging and leading me to the solution!
I will test the rule for a few days before marking this solved.

Edit: Last night the dishwasher started automatically when electricity price hit the lowest point. I will mark this solved. Thank you all for the help!