
X10 Controller Plasma Widget
Source (link to git-repo or to original if based on someone elses unmodified work):
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 (latest)
svn co http://cyberdine.ca/svn/x10-widget x10-widget
Config:
run sudo dpkg-reconfigure x10-widget and follow the questions to configure the components
Components:
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)
Notes:
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.4
improved debian packaging (don't replace config files)
0.6.3
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)
0.6.2
configuration is now handled by debconf (Controller/Remote, IP, [Port])To reconfigure: 'sudo dpkg-reconfigure x10-widget'kill command for daemon and improved script
0.6.1
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
0.5.2
Fix debian packaging... missing config filesFix dbus remote being rejected when using remote (apparmor used since dbus 1.6.12)
0.5.1
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
0.4.5
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) 10 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
Ratings & Comments
3 Comments
Hi, I'm very interrested in your plasmoid but dunno how to install it on my box (kubuntu 13.04). Tried to install it from the plasmoid intaller bar, no way. Installed the deb and now the plasmoid appears in the plasmoid installer bar, but when i want to install it: impossible to find the x10 component... Thx for your help.
Hi there, By installing, I assume you meant by doing "make install" After installing a widget through source code the first time, you have to run the command kbuildsycoca4, which will register the [new] plugins in /usr/lib/kde4/ at this point x10 is recognizable as service. try plasmoidviewer x10. If not, restart the plasma (it won't kill your applications) by doing: kquitapp plasma-desktop; sleep 1; plasma-desktop when adding the x10 widget, please add it first to the desktop, then drag it to a panel if you want there. Reason is that widget is empty and you will need to right click to add nodes... On a panel, it is resized to minimum making it harder to find the initial widget If you want to play with the code, use the link makeln.sh in the x10 directory after a make install... This will link libraries in /usr/lib/kde4/ to latest development in build/ This way launching "plasmoidviewer x10" though cmd or Kdevelop will always use latest Else KDE load latest in /usr/lib/kde4/ and the only way to reload new version is by restarting plasma-desktop Make sure you have the CM19A in a usb slot, and enjoy Feel free to request any help or new features regards
Also make sure you do use /usr for install prefix. cmake -DCMAKE_INSTALL_PREFIX=/usr .. if you use /usr/local (which may be the default), KDE will never see the plugin /usr/lib/kde4/plasma_applet_x10.so /usr/lib/kde4/plasma_engine_x10.so then run kbuildsycoca4