|Version Control: Link|
|Submitted: Feb 25 2013|
Updated: Dec 11 2013
Plasma Widget to control a USB X10 CM19A controller, used for home automation.run sudo dpkg-reconfigure x10-widget and follow the questions to configure the components
The widget can also connect to another host controlling the CM19a (like a pi raspberry). This is achieved through a dedicated DBus instance.
Initially panel is empty, add nodes with their corresponding address.
Rules can be added to automatically control dimming or extinguishing lights at night.
The service will also receive incoming events from X10 sensors and radio remote controls.
svn co http://cyberdine.ca/svn/x10-widget x10-widget
x10 : (cmd line) send commands through consolex10-widget : Plasma widget to add to a KDE sessionDataEngine : Plasma Engine, loaded whenever a widget is added, to dispatch notifications and relay commands to/from widgets (transparent to user)
x10_service : the daemon which directly controls the CM19A usb device.x10_dbus_daemon : DBUS daemon launched on controller host to communicate between x10_service and its clients
Points of interest:
C++ KDE Plasma QT cmake linuxKDevelop4 projectDBus daemon / remote DBUS IPCPlasma DataEngine / ServiceX10 Controller / libusb accessCentral QueueManager for widgets commandsproduce debian package (cpack)
when using cmd line remotely, make sure you use -X when you ssh to the box to use the x10 cmd line, dbus needs X11...
0.6.4improved debian packaging (don't replace config files)
Fix rules could stop after first exec.Fix occasional plasma crash when updating rules in widgetDBus improvements (reconnection & error handling)improved service (reload, check connectivity & daemon improvements)improved x10 cmd (reload, quit)improved debian packaging & scripts (data files not overwritten in upgrade)
configuration is now handled by debconf (Controller/Remote, IP, [Port])To reconfigure: 'sudo dpkg-reconfigure x10-widget'kill command for daemon and improved script
Automatic DBus re-connection when lostVarious tuneups (config / dbus handling)
0.6.0 - DBUS REMOTE
This is achieved through a custom dbus-daemon (/etc/dbus-1/x10_dbus_daemon.conf) listening on port 14500.Whenever a client sends a request on that dbus interface, system will launch associated x10_service, which controls the CM19A interface.
The dbus-daemon is started automatically when dbus is started (or through the init script /etc/init.d/x10-daemon start. that init script doesn't need to be loaded on boot unless your system doesn't support upstart job (like pi raspberry). launch that script on init 5 lvl
Fix debian packaging... missing config filesFix dbus remote being rejected when using remote (apparmor used since dbus 1.6.12)
adapt config ui size, fix a few ui glitches in rules config
0.5.0 - RULES
New config panel for preconfigured events/actions (like turn off all units in channel E (E*) or set to a specific value... at a given time, on certain days, with possible repetition...Fix auto-off timer being cancelled when lighting on and dimming to given valueFix cmake not finding proper system_bus_services_dir in 64bits...Fix DEB packaging -> upgradeable, added postinst and prerm scriptsRemove timeout increase with Ctrl/Shift click.x10_service demonized (-d) and location changed from /usr/bin to /usr/lib/kde4/libexec/add ati_remote to blacklist.confalways send command off even if already offallow use of "on|off" in cmd linevarious improvements
changing adress in config updates value from x10_service (GetValue prop)x10 e2 -> get current valuefile logging capability for x10_service (-l | --log filename)/etc/x10.conf (max_errors, auto-reload driver) -> unused yetx10 cmd line improvementsfix: "x10 restart" & quitting last widget made x10_service process exitmove dbus from session to system
0.4.0 - DBUS Service architecture
new daemon: x10_service:holding X10 Queue Manager & controlling the CM19A device.
loaded on demand, used by x10 cmd line & data_engine (plasma widgets)
new cmd line utility (x10) :x10 e2 + : e2 on (- | + | s | b)
x10 e2 5 : dim to 5 (-1 to 7)
x10 all on | off
x10 status | start | stop | quit
0.3.0 Tuned up QueueManager and reading incoming events from device
0.2.0 using Plasma DataEngine, Service & job architecture to share data among widgets
0.1.0 Initial version. static QueueManager
For full history, check http://cyberdine.ca/svn/x10-widget/debian/changelog