Notices


Reply
Thread Tools
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#941
@slarti: Very interesting use case here
I don't know the ZWAVE controller - as a premise - but:

Is there any way for the ZWAVE to report an unsolicited status of all/some sensors, like for example if you have a temperature sensor attached to it, is it possible to be notified by ZWAVE about a change in the temperature or you have to periodically issue a polling wget?

Apart from wget command, is there any other way to change the status of devices (ex. some impulse on the device itself, switch, potentiometer...)?

Issue here, for representing devices status, is to be as much real-time as possible, thus triggering a beecon status update every time it is necessary (and avoid timered polling on all devices to know their status - what timer period? how much battery will this consume?)

How can the ZW initiate a communication with the N900, if possible?

The DIM part is not as much difficult as it seems on first sight.
In QBW you can sense the tap/click position on a widget and return a different exit status value which will be converted into an image; precision and tolerance is indeed up to you ... you want to manage 30 different intermediate levels you just create 30 different images and alter some divider in the script
Originally Posted by Example from QBW Greedy Desktop Switcher View Post
command for retrieving the horizontal position where a horizontal bar widget is clicked:
PHP Code:
dsk=1;
if [ 
"_$QBW_EXEC_REASON== "_QBW_CLICK" ]; then
   gconftool
--/apps/osso/hildon-desktop/views/current -t int `expr $QBW_CLICK_X / 89 + 1`;
fi;
exit `
expr $dsk + 2
I'll follow up on this as soon as I receive some of your feedback on the matter

Bye.
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 5,795 | Thanked: 3,151 times | Joined on Feb 2007 @ Agoura Hills Calif
#942
Originally Posted by Vintrc View Post
Hi,
anyone knows about some command for hide and show all desktop?
I mean one button will be everytime on desktop and when i press it, each icons, widget etc. hide and next show back.. because if i have some nice wallpaper, it would be fine
Yes! I proposed this a long time ago in Brainstorm, with little response.
__________________
All I want is 40 acres, a mule, and Xterm.
 
matristain's Avatar
Posts: 40 | Thanked: 14 times | Joined on Sep 2009 @ Monterrey Mexico
#943
Hi , Just starting with QBW I`ll appreciate some help.

I have this code on a call.sh i create a desktop icon to run it.
It does its work but i am looking for a better way to do this:

Call XXXXXXXXXX number , if call is till a active after 275 seconds Hang Up the call and call XXXXXXXXXX again.


PHP Code:
#!/bin/sh

dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"XXXXXXXXXX" uint32:0

sleep 275

output
=`dbus-send --system --dest=com.nokia.csd.Call --print-reply=literal /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.GetStatus`
if [ 
"$output== "   uint32 8" ]; then
    dbus
-send --system --dest=com.nokia.csd.Call --print-reply /com/nokia/csd/call com.nokia.csd.Call.Release
    sleep 4
    sh 
/home/user/.call/call.sh
    
exit
    
else
    exit
fi 
What i want is to stop the loop at any time becouse when I hang up manualy the call this scripts continue running and It will hung up any other call i make withing the 275 seconds.

NOTE: this is for a toll free number for less than 5 minuts call, and its very useful using Hands Free car kit.

Sorry for my english, still trying to improve it.
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#944
Originally Posted by No!No!No!Yes! View Post
@slarti: Very interesting use case here
I don't know the ZWAVE controller - as a premise - but:

Is there any way for the ZWAVE to report an unsolicited status of all/some sensors, like for example if you have a temperature sensor attached to it, is it possible to be notified by ZWAVE about a change in the temperature or you have to periodically issue a polling wget?

Apart from wget command, is there any other way to change the status of devices (ex. some impulse on the device itself, switch, potentiometer...)?

Issue here, for representing devices status, is to be as much real-time as possible, thus triggering a beecon status update every time it is necessary (and avoid timered polling on all devices to know their status - what timer period? how much battery will this consume?)

How can the ZW initiate a communication with the N900, if possible?
Thanks for the quick reply

The controller software is ZwaveCommander by Melloware. It uses a ThinkStick USB zwave-controller to get the status of all nodes in the zwave-network and give commands to nodes. It isn't possible to get status updates from ZwaveCommmander without asking for it with an http-request. The upside is that it always responds with all current statuses. I also have a node that physically does nothing when a command is sent to it. That could be used for a poll.

Every node has a switch and I have other means of controlling the lights as well, so real-time updating is out of the question because the beecons should indeed poll the server periodically. This isn't that much of a problem because the intended use is mostly remote use (for example to see if I left any lights on with a quick glance of the beecons). The beecon states could be updated only when zwave.txt gets rewritten, which would be every time a wget is sent.

Originally Posted by No!No!No!Yes! View Post
The DIM part is not as much difficult as it seems on first sight.
In QBW you can sense the tap/click position on a widget and return a different exit status value which will be converted into an image; precision and tolerance is indeed up to you ... you want to manage 30 different intermediate levels you just create 30 different images and alter some divider in the script


I'll follow up on this as soon as I receive some of your feedback on the matter

Bye.
I didn't realise this. This makes QBW even more interesting.

Thanks,

Slarti
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#945
Originally Posted by matristain View Post
Hi , Just starting with QBW I`ll appreciate some help.

I have this code on a call.sh i create a desktop icon to run it.
It does its work but i am looking for a better way to do this:

Call XXXXXXXXXX number , if call is till a active after 275 seconds Hang Up the call and call XXXXXXXXXX again.


PHP Code:
#!/bin/sh

dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"XXXXXXXXXX" uint32:0

sleep 275

output
=`dbus-send --system --dest=com.nokia.csd.Call --print-reply=literal /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.GetStatus`
if [ 
"$output== "   uint32 8" ]; then
    dbus
-send --system --dest=com.nokia.csd.Call --print-reply /com/nokia/csd/call com.nokia.csd.Call.Release
    sleep 4
    sh 
/home/user/.call/call.sh
    
exit
    
else
    exit
fi 
What i want is to stop the loop at any time becouse when I hang up manualy the call this scripts continue running and It will hung up any other call i make withing the 275 seconds.

NOTE: this is for a toll free number for less than 5 minuts call, and its very useful using Hands Free car kit.

Sorry for my english, still trying to improve it.
As quick suggestions ...
Avoid sleep 275
And in very-very-very-very metacode:
On widget startup (phone on ecc) $QBW_EXEC_REASON=="QBW_STARTUP_UPDATE", explicitly reset beecon timer parameters (delayIndex = 0 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after resetting both parms, issue a reset_rearm_timer method to the widget

On widget click $QBW_EXEC_REASON=="QBW_CLICK" , check if your very specific call active via usual dbus enquiries
If your specific call is not active (didn't dig how to check this) initiate call and explicitly set beecon timer parameters (delayIndex = 9 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after setting both parms, issue a reset_rearm_timer method to the widget
If your specific call is active (didn't dig how to check this) terminate call and reset widget timer as per QBW_STARTUP_UPDATE step

If execution of script is due to $QBW_EXEC_REASON=="QBW_TIMER_UPDATE" , check if specific call active via usual dbus enquiries
If your very specific call is active, drop call, and reinitiate call (275secs timer will still be in place)
If your very specific call is not active, reset timer as per previous steps

Issue specific exit status at the end of every condition if you want to draw different icons according to call status statuses

Hope this helps
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 59 | Thanked: 16 times | Joined on May 2010
#946
hello guys, please some one help me to make a queen beecon widget to restart device on pressing it. i have tryied different commands but no success. its a very simple thing in x terminal but i am not able to set a command in queen beecon.
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#947
Ok, this is driving me nuts. I finally understood how to write a simple script (never done one before) to check a value in a text file and wget my server rewriting that file. This works in terminal, but for some reason, not in QBW. The wget is never sent.

PHP Code:
#!/bin/sh

state=$(awk '{ FS = "~" } ; /Ruokapöytä/{print $4}' zwave.txt)
if [ 
"$state== "0" ]; then 
wget 
-Ozwave.txt 'http://ipaddress:port/ZwaveCommand?command=device&id=22&level=99'
exit 0
else
wget -Ozwave.txt 'http://ipaddress:port/ZwaveCommand?command=device&id=22&level=0'
exit 1
fi

What am I doing wrong?

Any help would be appreciated.

P.S. Is there some way to enable/disable a set alarm in a script?

Last edited by slarti; 2010-11-22 at 12:39.
 
matristain's Avatar
Posts: 40 | Thanked: 14 times | Joined on Sep 2009 @ Monterrey Mexico
#948
Can QBW handle the "Long press" to avoid axidental execution?
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#949
Originally Posted by matristain View Post
Can QBW handle the "Long press" to avoid axidental execution?
no longpress
yes multiclick

enable multi click support in update policies in qbw settings and test relevant $QBW_... variable for expected number of clicks. see parameter substitution in wiki for exact name and specs
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 
matristain's Avatar
Posts: 40 | Thanked: 14 times | Joined on Sep 2009 @ Monterrey Mexico
#950
Originally Posted by No!No!No!Yes! View Post
As quick suggestions ...
Avoid sleep 275
And in very-very-very-very metacode:
On widget startup (phone on ecc) $QBW_EXEC_REASON=="QBW_STARTUP_UPDATE", explicitly reset beecon timer parameters (delayIndex = 0 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after resetting both parms, issue a reset_rearm_timer method to the widget

On widget click $QBW_EXEC_REASON=="QBW_CLICK" , check if your very specific call active via usual dbus enquiries
If your specific call is not active (didn't dig how to check this) initiate call and explicitly set beecon timer parameters (delayIndex = 9 customIntervalSecs = 275) via DBUS method call set_param_uint32 see syntax in the wiki; after setting both parms, issue a reset_rearm_timer method to the widget
If your specific call is active (didn't dig how to check this) terminate call and reset widget timer as per QBW_STARTUP_UPDATE step

If execution of script is due to $QBW_EXEC_REASON=="QBW_TIMER_UPDATE" , check if specific call active via usual dbus enquiries
If your very specific call is active, drop call, and reinitiate call (275secs timer will still be in place)
If your very specific call is not active, reset timer as per previous steps

Issue specific exit status at the end of every condition if you want to draw different icons according to call status statuses

Hope this helps
How can i change the (delayIndex = 9 customIntervalSecs = 275) at runtime?

This is what I have (just first part)
PHP Code:
if [ "$QBW_EXEC_REASON== "QBW_CLICK" ]; then
    
if [ "$QBW_CURRENT_RESULTS_TEXT== "ON" ]; then
        
echo "OFF";
        exit 
0;
    else
        
#MAKE CALL
        #delayIndex = 9 customIntervalSecs = 275
        
echo "ON";
        exit 
1;
    
fi;  
fi
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:51.