{"action":"created","issue":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/565","labels_url":"https://api.github.com/repos/foosel/OctoPrint/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/foosel/OctoPrint/issues/565/comments","events_url":"https://api.github.com/repos/foosel/OctoPrint/issues/565/events","html_url":"https://github.com/foosel/OctoPrint/issues/565","id":41427309,"number":565,"title":"[Request] Additional Events for when Hotend/Bed reaches desired temp.","user":{"login":"ymilord","id":2381115,"avatar_url":"https://avatars.githubusercontent.com/u/2381115?v=3","gravatar_id":"","url":"https://api.github.com/users/ymilord","html_url":"https://github.com/ymilord","followers_url":"https://api.github.com/users/ymilord/followers","following_url":"https://api.github.com/users/ymilord/following{/other_user}","gists_url":"https://api.github.com/users/ymilord/gists{/gist_id}","starred_url":"https://api.github.com/users/ymilord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ymilord/subscriptions","organizations_url":"https://api.github.com/users/ymilord/orgs","repos_url":"https://api.github.com/users/ymilord/repos","events_url":"https://api.github.com/users/ymilord/events{/privacy}","received_events_url":"https://api.github.com/users/ymilord/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/foosel/OctoPrint/labels/type:request","name":"type:request","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-08-28T18:43:56Z","updated_at":"2015-07-28T12:36:17Z","closed_at":null,"body":"Similar to how the Pause, Error events currently functions. But have a configurable tolerance.\r\ni.e. if the desired temp is 212C. Trigger the event if it arrives to 212C for more then 3~5 sec and stays between 210C~217C. (Or something like that.)\r\n\r\nThanks and Keep up to great work!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/comments/125584897","html_url":"https://github.com/foosel/OctoPrint/issues/565#issuecomment-125584897","issue_url":"https://api.github.com/repos/foosel/OctoPrint/issues/565","id":125584897,"user":{"login":"spapadim","id":4348443,"avatar_url":"https://avatars.githubusercontent.com/u/4348443?v=3","gravatar_id":"","url":"https://api.github.com/users/spapadim","html_url":"https://github.com/spapadim","followers_url":"https://api.github.com/users/spapadim/followers","following_url":"https://api.github.com/users/spapadim/following{/other_user}","gists_url":"https://api.github.com/users/spapadim/gists{/gist_id}","starred_url":"https://api.github.com/users/spapadim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spapadim/subscriptions","organizations_url":"https://api.github.com/users/spapadim/orgs","repos_url":"https://api.github.com/users/spapadim/repos","events_url":"https://api.github.com/users/spapadim/events{/privacy}","received_events_url":"https://api.github.com/users/spapadim/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T12:36:17Z","updated_at":"2015-07-28T12:36:17Z","body":"Whoops, yes, I filed duplicate (didn't think of searching for \"temp\" instead of \"temperature\", doh!).\r\n\r\nSo I take it this is a needed or at least acceptable addition to octoprint core?  Does adding it to _processTemperatures() in octorpint.util.comm seem right?\r\n\r\nQuick sketch, add to _processTempeatures():\r\n```\r\nif not self.isPrinting() \r\n  for tool in parsedTemps:\r\n    toolNum, actual, target = parsedTemps[tool]\r\n    if abs(actual - target) < 5 and not self._tempteratureEventFired[tool]:\r\n      eventManager().fire('TemperatureReached', tool)\r\n      self._temperatureEventFired[tool] = true\r\n```\r\nplus reset _temperatureEventFired to false in _gcode_{M104,M140}_sent() and in startPrint().\r\n\r\nIf this seems reasonable, I can give it a go and eventually submit a pull request (against master ok?)."}}