{"action":"closed","issue":{"url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2620","repository_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota","labels_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2620/labels{/name}","comments_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2620/comments","events_url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/issues/2620/events","html_url":"https://github.com/arendst/Sonoff-Tasmota/issues/2620","id":320101519,"node_id":"MDU6SXNzdWUzMjAxMDE1MTk=","number":2620,"title":"Error in timer when set using mosquitto_pub","user":{"login":"biotecov","id":38963699,"node_id":"MDQ6VXNlcjM4OTYzNjk5","avatar_url":"https://avatars1.githubusercontent.com/u/38963699?v=4","gravatar_id":"","url":"https://api.github.com/users/biotecov","html_url":"https://github.com/biotecov","followers_url":"https://api.github.com/users/biotecov/followers","following_url":"https://api.github.com/users/biotecov/following{/other_user}","gists_url":"https://api.github.com/users/biotecov/gists{/gist_id}","starred_url":"https://api.github.com/users/biotecov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biotecov/subscriptions","organizations_url":"https://api.github.com/users/biotecov/orgs","repos_url":"https://api.github.com/users/biotecov/repos","events_url":"https://api.github.com/users/biotecov/events{/privacy}","received_events_url":"https://api.github.com/users/biotecov/received_events","type":"User","site_admin":false},"labels":[{"id":527619882,"node_id":"MDU6TGFiZWw1Mjc2MTk4ODI=","url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/labels/bug","name":"bug","color":"ee0701","default":true},{"id":743300628,"node_id":"MDU6TGFiZWw3NDMzMDA2Mjg=","url":"https://api.github.com/repos/arendst/Sonoff-Tasmota/labels/fixed","name":"fixed","color":"76f7f7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-03T22:28:02Z","updated_at":"2018-06-02T02:03:17Z","closed_at":"2018-06-02T02:03:17Z","author_association":"NONE","body":"Hello, I am Ricardo from Spain, new to Tasmota, and already in love with it. \r\n\r\nI flashed a Sonoff S20 with Tasmota 5.13.1 and installed mosquitto 1.4.15 on a local linux machine. Wonderfull! However, I found what seems to be a bug while trying to set timers using mosquitto_pub.\r\n\r\nThe following:\r\nmosquitto_pub -h localhost -t cmnd/mytopic/timer1 -t '{\"Arm\":1,\"Mode\":2,\"Time\":\"-00:20\",\"Window\":10,\"Days\":\"DLMXJVS\",\"Repeat\":1,\"Output\":1,\"Action\":1}'\r\nshould set power to be turned on every day 20 minutes BEFORE sunset (plus/minus 10 random mins)-\r\n\r\nThat gives a wrong result in two components as you can see either using mosquitto_sub or checking the timer on the web interface.\r\n\r\nUsing mosquitto_sub, you actually obtai:\r\n\r\n{\"Timer1\":{\"Arm\":1,\"Mode\":2,\"Time\":\"00:20\",\"Window\":10,\"Days\":\"1111111\",\"Repeat\":1,\"Output\":1,\"Action\":0}}\r\n \r\nThat is, Time and Action return wrong values:\r\n\r\nAction is actually set to 0 (off), instead of 1 (on). In fact, if you publish \"Action\":2, you actually obtain \"Action\":1, and son on (weird, one unit less!).\r\n\r\nAnd the \"Time\" parameter cannot accept negative values. But if I publish a value greater than 11, then I actually set a negative time.\r\n\r\nFor example, \"Time\":\"13:20\" gives \"Time\":\"-01:20\", and the minus sign is also visible on the web interface. However, if I publish \"Time\":\"12:20\", mosquitto_sub shows \"Time\":\"00:20\" (without the expected minus sign). The web interface shows that you had actually obtained -00:20 in this case.\r\n\r\nIn short, if seems that the JSON string is either missinterpreted or missrepresented on the timer command.\r\n\r\nBest regards, and congrats for such a nice software.\r\n\r\nRicardo."}}
{"actor":{"display_login":"ascillato"}}