{"id":12,"date":"2021-10-16T21:48:40","date_gmt":"2021-10-16T21:48:40","guid":{"rendered":"http:\/\/cln.io\/blog\/?p=12"},"modified":"2022-12-01T01:09:42","modified_gmt":"2022-11-30T23:09:42","slug":"ramping-up-an-air-purifier-when-3d-printing","status":"publish","type":"post","link":"https:\/\/cln.io\/blog\/ramping-up-an-air-purifier-when-3d-printing\/","title":{"rendered":"Ramping up an air purifier when 3D printing"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Setting a Philips air purifier AC3829 to turbo mode with home assistant when my 3D printer prints (a Prusa mini)<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/AC3829.jpg\" alt=\"\" class=\"wp-image-39\" width=\"-378\" height=\"-324\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/AC3829.jpg 840w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/AC3829-300x257.jpg 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/AC3829-768x658.jpg 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><figcaption class=\"wp-element-caption\"><gwmw style=\"display:none;\"><gwmw style=\"display:none;\"><\/gwmw><gwmw style=\"display:none;\"><gwmw style=\"display:none;\"><\/gwmw><\/gwmw><\/gwmw><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">My Prusa mini printer is sitting in my home office, so when it&#8217;s printing for a longer job I can close the door to the office and lessen the noise.<gwmw style=\"display:none;\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whilst discussions are going on online on &#8220;safe&#8221; 3D printing in the same room as you are sitting\/working in, I already have an air purifier in my room, so might as well hook it up to start cleaning the air a bit faster when I&#8217;m printing. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have an <meta charset=\"utf-8\">AC3829 air purifier in my office, it is controllable with 2 apps, <a href=\"https:\/\/air-matters.com\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">Air Matters<\/a> and <a href=\"https:\/\/www.elb.air.philips.com\/#\/cleanhome\" target=\"_blank\" rel=\"noreferrer noopener\">Clean Home+<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On this page<\/p>\n\n\n\n<nav aria-label=\"Table of Contents\" class=\"wp-block-table-of-contents\"><ol><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/cln.io\/blog\/ramping-up-an-air-purifier-when-3d-printing\/#home-assistant-requirements\">Home assistant requirements<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/cln.io\/blog\/ramping-up-an-air-purifier-when-3d-printing\/#network-requirements\">Network requirements<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/cln.io\/blog\/ramping-up-an-air-purifier-when-3d-printing\/#home-assistant-configurations\">Home Assistant configurations<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/cln.io\/blog\/ramping-up-an-air-purifier-when-3d-printing\/#creating-the-automation\">Creating the automation<\/a><\/li><\/ol><\/nav>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<h2 class=\"wp-block-heading\" id=\"home-assistant-requirements\">Home assistant requirements<\/h2>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Betaboon made a library to control these devices called <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/betaboon\/aioairctrl\" data-type=\"URL\" data-id=\"https:\/\/github.com\/betaboon\/aioairctrl\" target=\"_blank\">aioairctrl<\/a> and a forked home assitant component <a href=\"https:\/\/github.com\/betaboon\/philips-airpurifier-coap\" data-type=\"URL\" data-id=\"https:\/\/github.com\/betaboon\/philips-airpurifier-coap\">philips-airpurifier-coap<\/a> to use this component you will need to have <a rel=\"noreferrer noopener\" href=\"https:\/\/hacs.xyz\/\" data-type=\"URL\" data-id=\"https:\/\/hacs.xyz\/\" target=\"_blank\">HACS<\/a> installed on your homeassitant ( a community store )<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once HACS is up and running add the <a href=\"https:\/\/github.com\/betaboon\/philips-airpurifier-coap\" data-type=\"URL\" data-id=\"https:\/\/github.com\/betaboon\/philips-airpurifier-coap\">https:\/\/github.com\/betaboon\/philips-airpurifier-coap<\/a> to HACS and install it<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>UPDATE 09\/2022:<\/strong> <a href=\"https:\/\/www.home-assistant.io\/integrations\/prusalink\" target=\"_blank\" rel=\"noreferrer noopener\">it seems there is native support for the prusa now<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the Prusa Mini we will need another community component called <a href=\"https:\/\/github.com\/sq3tle\/prusa_mini_home_assistant\" target=\"_blank\" rel=\"noreferrer noopener\">Prusa Mini Integration for Home Assistant<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Give homeassistant a quick reboot and those components should be ready to go.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"network-requirements\">Network requirements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve also assigned reserved &#8220;fixed&#8221; IP&#8217;s on my DHCP server for the air purifier, and the prusa mini, so they stay on the same IP&#8217;s<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"home-assistant-configurations\">Home Assistant configurations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I configured the 2 devices as such:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NOTE: I only care for the Prusa status, I&#8217;ve disabled the other options to reduce disk r\/w due to logging<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">fan:\n  platform: philips_airpurifier_coap\n  host: 192.168.1.46\n  model: ac3829\n\nsensor:\n  - platform: prusa_connect\n    host: 192.168.1.52          # set printer ip\n    name: Prusa Mini         \n    scan_interval: 30         # set refresh interval (seconds)\n    monitored_conditions:\n    - status                # return printer state: printing, online, offline, cooling, heating\n  #  - temp_nozzle           # return nozzle temperature\n  #  - temp_bed              # return bed temperature\n  #  - material              # return current loaded material\n  #  - progress              # return printing progress 0-100\n  #  - time_est              # return estimated time to complete (minutes)\n  #  - project_name          # return printing job filename\n  #  - pos_z_mm              # return z height in mm (floating point)\n  #  - time_tts              # return time readable by google assistant<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Validate the config and restart homeassistant<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/air_purifier.png\" alt=\"\" class=\"wp-image-18\" width=\"379\" height=\"128\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/air_purifier.png 790w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/air_purifier-300x101.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/air_purifier-768x259.png 768w\" sizes=\"auto, (max-width: 379px) 100vw, 379px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/prusa_in_hass.png\" alt=\"\" class=\"wp-image-19\" width=\"377\" height=\"49\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/prusa_in_hass.png 748w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/prusa_in_hass-300x39.png 300w\" sizes=\"auto, (max-width: 377px) 100vw, 377px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-the-automation\">Creating the automation<gwmw style=\"display:none;\"><\/gwmw><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When the Prusa is heating up the status will be &#8220;cooling&#8221;, when it&#8217;s printing the status will be &#8220;printing&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When done with printing it will be &#8220;cooling&#8221; again until cooled off, I&#8217;ve also added a delay of 30 minutes, meaning after printing the air purifier still works for half an hour to get the room odour-free.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><gwmw style=\"display:none;\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"241\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/automations-1024x241.png\" alt=\"\" class=\"wp-image-20\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/automations-1024x241.png 1024w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/automations-300x71.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/automations-768x181.png 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/automations-1536x361.png 1536w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/automations-2048x482.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve attached the YAML for the 2 automation<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">- id: '1633969897389'\n  alias: Ramp up air purifier with printer printing\n  description: ''\n  trigger:\n  - platform: state\n    entity_id: sensor.prusa_mini_status\n    to: printing\n  - platform: state\n    entity_id: sensor.prusa_mini_status\n    to: cooling\n  condition: []\n  action:\n  - service: fan.set_preset_mode\n    target:\n      entity_id: fan.philips_airpurifier\n    data:\n      preset_mode: turbo\n  mode: single<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">- id: '1633970083682'\n  alias: Set air purifier to auto when printing is done\n  description: ''\n  trigger:\n  - platform: state\n    entity_id: sensor.prusa_mini_status\n    from: printing\n  condition: []\n  action:\n  - service: fan.set_preset_mode\n    target:\n      entity_id: fan.philips_airpurifier\n    data:\n      preset_mode: auto\n  - delay:\n      hours: 0\n      minutes: 30\n      seconds: 0\n      milliseconds: 0\n  mode: queued\n  max: 10<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For the first automation, we want to turn the purifier to turbo if our printer is cooling or printing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"492\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.58.44-1024x492.png\" alt=\"\" class=\"wp-image-22\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.58.44-1024x492.png 1024w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.58.44-300x144.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.58.44-768x369.png 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.58.44-1536x737.png 1536w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.58.44-2048x983.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"487\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.07-1024x487.png\" alt=\"\" class=\"wp-image-23\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.07-1024x487.png 1024w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.07-300x143.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.07-768x365.png 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.07-1536x730.png 1536w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.07-2048x974.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.19-1024x389.png\" alt=\"\" class=\"wp-image-24\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.19-1024x389.png 1024w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.19-300x114.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.19-768x292.png 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.19-1536x584.png 1536w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-21.59.19-2048x778.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The other automation is similar, with just an added delay of 30 minutes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"484\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.25-1024x484.png\" alt=\"\" class=\"wp-image-26\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.25-1024x484.png 1024w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.25-300x142.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.25-768x363.png 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.25-1536x726.png 1536w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.25-2048x968.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.48-1024x552.png\" alt=\"\" class=\"wp-image-27\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.48-1024x552.png 1024w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.48-300x162.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.48-768x414.png 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.48-1536x828.png 1536w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/Screenshot-2021-10-16-at-22.10.48-2048x1104.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Run both of the automation to verify if they work, (disable the 30m delay though, for the test)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enjoy!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"1024\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/nubelson-fernandes-TysY_BeKviQ-unsplash-819x1024.jpg\" alt=\"\" class=\"wp-image-1214\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/nubelson-fernandes-TysY_BeKviQ-unsplash-819x1024.jpg 819w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/nubelson-fernandes-TysY_BeKviQ-unsplash-240x300.jpg 240w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/nubelson-fernandes-TysY_BeKviQ-unsplash-768x960.jpg 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/nubelson-fernandes-TysY_BeKviQ-unsplash-1229x1536.jpg 1229w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/nubelson-fernandes-TysY_BeKviQ-unsplash-1638x2048.jpg 1638w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2021\/10\/nubelson-fernandes-TysY_BeKviQ-unsplash-scaled.jpg 2048w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><figcaption class=\"wp-element-caption\">Photo by <a href=\"https:\/\/unsplash.com\/@nublson?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Nubelson Fernandes<\/a> on <a href=\"https:\/\/unsplash.com\/s\/photos\/purifier?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a>   <\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Setting a Philips air purifier AC3829 to turbo mode with home assistant when my 3D printer prints (a Prusa mini) My Prusa mini printer is sitting in my home office, so when it&#8217;s printing for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":67,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,3,6,4],"tags":[7,13,8,9,12],"class_list":["post-12","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3dprinting","category-automation","category-health","category-homeassistant","tag-3dprinting","tag-airquality","tag-automation","tag-health","tag-homeassistant"],"_links":{"self":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":15,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":1215,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions\/1215"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/media\/67"}],"wp:attachment":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}