![]() |
Ideas for charger-state monitoring with dbus-scripts?
Ahoy,
As it's winter now, I have a NEXA radio-controlled wall socket to turn on the heater in my car remotely (manually or with a timer). Unfortunately, the glass facade of our office building appears to have some signal-blocking film in it and only on about 1 out of 5 tries I can get a signal out. As the socket is just a receiver, there was no way of telling whether the heater is turned on or not. For this, I put a phone charger inside the car and connected it to my spare N900. I set it to monitor charging state via dbus-scripts: Code:
/usr/local/share/dbus-scripts/on_AC.sh * * com.nokia.bme.signal charger_connected Code:
dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$NUMBER" uint32:0 If killall worked, I'd just have a script restarting dbus-scripts whenever a call comes in from my normal number... Also, do you have any ideas on how to monitor current charger-state? The only means of communication available is a phone call that is not answered, as it does not cost anything. Perhaps somehow monitoring if a call comes in from my own number, and then either rejecting it if charger is connected or forwarding it back to me if charger is not connected? EDIT: Was very nice for two winters, but then I thought I'd use the "car-phone" as a daily phone and it turned out it had suffered drastically, presumably from the daily temperature changes. GPS is inaccurate, tracks are just zigzag on straight roads, wifi reception has deteriorated as has cellular, it no longer tolerates any kind of overclocking, etc... So I can't really recommend this to anyone. |
Re: Ideas for charger-state monitoring with dbus-scripts?
1) After a certain amount of killall dbus-scripts invocations (or any other respawning init script) it simply stops respawning.
This is because it is desirable when say, Xorg crashes repeatedly and you want to get into a TTY. 2) IIRC phone calls also trigger dbus events. The entire phone system is dbus controllable in every way imaginable, so go wild. |
All times are GMT. The time now is 16:36. |
vBulletin® Version 3.8.8