Control the IPX800 and some of its extensions.
Project description
pypx800 - Python GCE IPX800
Control the IPX800, X-PWM, X-THL, X-8R, X-8D, X-24D and X-Dimmer trough:
- relay
- virtual output
- virtual input
- digital input
- analog input
- xdimmer output
- xpwm channel
- xthl
Parameters
- host: ip or hostname
- port
- api key
- user: name of user or admin (for X-PWM control only)
- password: password of user or admin (for X-PWM control only)
Example
from pypx800 import IPX800 as pypx800
ipx = pypx800('192.168.1.240','80','apikey','user', 'password')
values = ipx.global_get()
print (values)
# Relay
r14 = ipx.relays[14]
r14.on()
print (r14.status)
r14.off()
# X-Dimmer
g1 = ipx.xdimmers[3]
g1.on()
g1.set_level(80)
print (g1.level)
print (g1.status)
# X-PWM
pwm1 = ipx.xpwm[5]
pwm1.on()
pwm1.set_level(50)
print (pwm1.status)
pwm1.off()
# Analog Input
print (ipx.analogin[1].value)
# Digital Input
d1 = ipx.digitalin[1]
print (d1.value)
# Virtual Input
vi = ipx.virtualinput[4]
vi.on()
print (vi.status)
# Virtual Output
vo = ipx.virtualoutput[4]
vo.on()
print (vo.status)
# X-THL
sensor = ipx.xthl[1]
print (sensor.temp)
print (sensor.hum)
print (sensor.lum)
Credits
Thank to d3mi1 and marcaurele for inspiration :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypx800-0.7.tar.gz
(3.8 kB
view hashes)
Built Distribution
pypx800-0.7-py3-none-any.whl
(4.5 kB
view hashes)