Binding request: Philips air purifier

philips
airquality
purifier
Tags: #<Tag:0x00007f51e4cada18> #<Tag:0x00007f51e4cad7c0> #<Tag:0x00007f51e4cad2c0>

(Marco) #1

Is any of the openHAB developers interested in creating a binding for Philips air purifiers? I found a python script which communicates with those devices, but I guess a binding is much nicer than all sorts of exec things and items to control such a device. The python script can be found here. Anyone interested? :slight_smile:


(Vincent Regaud) #2

You could post an incentive on Bounty source


(Marco) #3

I could do that, but I won’t… thanks for the idea though


(Christoph Weitkamp) #4

Hi Marco,

Give it a try on your own: Developing a Binding for openHAB. It is not that hard. Have fun and do not hesitate to ask if you have any questions.


(Tom Natkanski) #5

It looks like someone (hats off!) has just now published a python script for the philips air purifiers.

I just tried it and voila, it works with my AC3256/60 air purifier from command line (running openhabian). Haven’t tried it yet, but I do not see why it wouldn’t work with the exec binding. Will have to give it a try. It can be a work-around until a dedicated binding is done.


(Marco) #6

Seems like that’s the same script that I was referring to in my first post… Hats off :wink:


(Tom Natkanski) #7

You are right. I confirm that I got it to work.
Here’s what I did. Note there are 2 dashes before pwr, om and so on.

  1. Installed the python program.
  2. Installed Exec binding.
  3. Set up channels in the binding
  4. Edited the conf files:
    Rules:

rule “Philips_AC3259 ON”
when
Time cron “0 0 22 * * ?”
then
ac3259_Args.sendCommand("–pwr 1")
exec_command_ac3259_run.sendCommand(ON)
Thread::sleep(1000)
ac3259_Args.sendCommand("–aqil 0")
exec_command_ac3259_run.sendCommand(ON)
Thread::sleep(1000)
ac3259_Args.sendCommand("–om 2")
exec_command_ac3259_run.sendCommand(ON)
Thread::sleep(1000)
ac3259_Args.sendCommand("–mode A")
exec_command_ac3259_run.sendCommand(ON)
sendMail("xxxxx@gmail.com", “Philips turned on”, “Philips turned on”)
sendNotification("xxxxx@gmail.com", “Philips turned on”)
end

rule “Philips_AC3259 OFF”
when
Time cron “0 0 7 * * ?”
then
ac3259_Args.sendCommand("–pwr 0")
exec_command_ac3259_run.sendCommand(ON)
sendMail("xxxxxxx@gmail.com", “Philips turned off”, “Philips turned off”)
sendNotification("xxxxxx@gmail.com", “Philips turned off”)
end

Items:

// Arguments to be placed for ‘%2$s’ in command line
String ac3259_Args {channel=“exec:command:ac3259:input”}
// Output of command line execution
String ac3259_out {channel=“exec:command:ac3259:output”}

Things:

Thing exec:command:ac3259 [command=“airctrl 192.168.7.123 %2$s”, interval=0, timeout=5, autorun=false]