{"action":"created","issue":{"url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2548","repository_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota","labels_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2548/labels{/name}","comments_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2548/comments","events_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2548/events","html_url":"https://github.com/arendst/Sonoff-Tasmota/issues/2548","id":317796066,"number":2548,"title":"Rule publish only after POWER1/2 state OFF","user":{"login":"mobiipl","id":29176654,"avatar_url":"https://avatars3.githubusercontent.com/u/29176654?v=4","gravatar_id":"","url":"https://api.github.com/users/mobiipl","html_url":"https://github.com/mobiipl","followers_url":"https://api.github.com/users/mobiipl/followers","following_url":"https://api.github.com/users/mobiipl/following{/other_user}","gists_url":"https://api.github.com/users/mobiipl/gists{/gist_id}","starred_url":"https://api.github.com/users/mobiipl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobiipl/subscriptions","organizations_url":"https://api.github.com/users/mobiipl/orgs","repos_url":"https://api.github.com/users/mobiipl/repos","events_url":"https://api.github.com/users/mobiipl/events{/privacy}","received_events_url":"https://api.github.com/users/mobiipl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-25T21:13:23Z","updated_at":"2018-04-26T08:07:14Z","closed_at":null,"author_association":"NONE","body":"Sonoff Dual R2 (tasmota 5.12.0l)\r\n\r\nI want to publish message every POWER (1 or 2) change from ON to OFF and opposite\r\nDevice publish message from rule only after POWER state going to OFF and send both messages (UP/STOP or DOWN/STOP) in this same time. When POWER state going to ON nothing heppen. Maybe I have mistake in rule or don't understanding scheme.\r\n\r\n**edit:**\r\n**when replace OFF with 0 and ON with 1 in rules, everything work perfect.**\r\n\r\nRule:\r\n`on POWER1#State=ON do publish stat/roleta/stan UP endon on POWER1#State=OFF do publish stat/roleta/stan STOP endon on POWER2#State=ON do publish stat/roleta/stan DOWN endon on POWER2#State=OFF do publish stat/roleta/stan STOP endon`\r\n\r\nConsole:\r\n22:05:41 MQT: stat/roleta/RESULT = {\"POWER1\":\"ON\"}\r\n22:05:41 MQT: stat/roleta/POWER1 = ON\r\n22:05:47 RUL: POWER1#STATE=ON performs \"publish stat/roleta/stan UP\"\r\n22:05:47 MQT: stat/roleta/stan = UP\r\n22:05:47 MQT: stat/roleta/RESULT = {\"Publish\":\"Done\"}\r\n22:05:47 RUL: POWER1#STATE=OFF performs \"publish stat/roleta/stan STOP\"\r\n22:05:47 MQT: stat/roleta/stan = STOP\r\n22:05:47 MQT: stat/roleta/RESULT = {\"Publish\":\"Done\"}\r\n22:05:47 MQT: stat/roleta/RESULT = {\"POWER1\":\"OFF\"}\r\n22:05:47 MQT: stat/roleta/POWER1 = OFF\r\n22:05:51 MQT: stat/roleta/RESULT = {\"POWER2\":\"ON\"}\r\n22:05:51 MQT: stat/roleta/POWER2 = ON\r\n22:05:56 RUL: POWER2#STATE=ON performs \"publish stat/roleta/stan DOWN\"\r\n22:05:56 MQT: stat/roleta/stan = DOWN\r\n22:05:56 MQT: stat/roleta/RESULT = {\"Publish\":\"Done\"}\r\n22:05:56 RUL: POWER2#STATE=OFF performs \"publish stat/roleta/stan STOP\"\r\n22:05:56 MQT: stat/roleta/stan = STOP\r\n22:05:56 MQT: stat/roleta/RESULT = {\"Publish\":\"Done\"}\r\n22:05:56 MQT: stat/roleta/RESULT = {\"POWER2\":\"OFF\"}\r\n22:05:56 MQT: stat/roleta/POWER2 = OFF\r\n\r\nLog OpenHAB:\r\n`2018-04-25 23:05:47.278 [vent.ItemStateChangedEvent] - Sypialnia_Roleta_Stan changed from STOP to UP\r\n2018-04-25 23:05:47.285 [vent.ItemStateChangedEvent] - Sypialnia_Roleta_Stan changed from UP to STOP\r\n2018-04-25 23:05:56.405 [vent.ItemStateChangedEvent] - Sypialnia_Roleta_Stan changed from STOP to DOWN\r\n2018-04-25 23:05:56.422 [vent.ItemStateChangedEvent] - Sypialnia_Roleta_Stan changed from DOWN to STOP`"},"comment":{"url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/comments/384551521","html_url":"https://github.com/arendst/Sonoff-Tasmota/issues/2548#issuecomment-384551521","issue_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2548","id":384551521,"user":{"login":"arendst","id":11044339,"avatar_url":"https://avatars3.githubusercontent.com/u/11044339?v=4","gravatar_id":"","url":"https://api.github.com/users/arendst","html_url":"https://github.com/arendst","followers_url":"https://api.github.com/users/arendst/followers","following_url":"https://api.github.com/users/arendst/following{/other_user}","gists_url":"https://api.github.com/users/arendst/gists{/gist_id}","starred_url":"https://api.github.com/users/arendst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arendst/subscriptions","organizations_url":"https://api.github.com/users/arendst/orgs","repos_url":"https://api.github.com/users/arendst/repos","events_url":"https://api.github.com/users/arendst/events{/privacy}","received_events_url":"https://api.github.com/users/arendst/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T08:07:14Z","updated_at":"2018-04-26T08:07:14Z","author_association":"OWNER","body":"You might want to try POWER1#State=1 instead of ON and POWER1#State=0 instead of OFF"}}
{"actor":{"display_login":"arendst"}}