piBeacon: 3- presence monitoring download
Re: piBeacon: 3- presence monitoring download
posted v 7-42-64
fixed:
some minor things on the RPI, formatting in the plugin ...
some exception handling when IP number is new, have 2 IP numbers (Wifi AND Ethernet), network does not work on the RPI
added:
1. added device type Temp/humidity sensor SHT21
2. added device type "myprogram.py". this allows you in an easy way to setup your own sensor .
-- add an indigo device, type = pibeacon/myprogram
-- setup the proper parameters , e.g. use freeParameter textfield to send info to the program on the rpi
-- rename the file in ~/pibeacon "cp renameMeTo_myprogram.py myprogram.py"
-- edit the file and use the existing example or design your own. the system will call this program every ~ 90 secs (= updatefrequency of sensors) and deliver (a) the devId and the free parameter in a dict.
the design your reply and send it to the sys.output as shown in the example
-- then the states INPUT_1 .. _9 will be updated with the numbers / text you supply
3. added a timeout for ANY trigger after restart. the plugin will suppress any trigger coming from the plugin for ~ 2 minutes to make sure all RPi are up to date etc.
4. added for DAC output devices option to do single pulses, continuing pulses etc.
5. for DAC output devices added option to start output at a certain date/time in the menu or action.
Karl
fixed:
some minor things on the RPI, formatting in the plugin ...
some exception handling when IP number is new, have 2 IP numbers (Wifi AND Ethernet), network does not work on the RPI
added:
1. added device type Temp/humidity sensor SHT21
2. added device type "myprogram.py". this allows you in an easy way to setup your own sensor .
-- add an indigo device, type = pibeacon/myprogram
-- setup the proper parameters , e.g. use freeParameter textfield to send info to the program on the rpi
-- rename the file in ~/pibeacon "cp renameMeTo_myprogram.py myprogram.py"
-- edit the file and use the existing example or design your own. the system will call this program every ~ 90 secs (= updatefrequency of sensors) and deliver (a) the devId and the free parameter in a dict.
the design your reply and send it to the sys.output as shown in the example
-- then the states INPUT_1 .. _9 will be updated with the numbers / text you supply
3. added a timeout for ANY trigger after restart. the plugin will suppress any trigger coming from the plugin for ~ 2 minutes to make sure all RPi are up to date etc.
4. added for DAC output devices option to do single pulses, continuing pulses etc.
5. for DAC output devices added option to start output at a certain date/time in the menu or action.
Karl
Re: piBeacon: 3- presence monitoring download
posted new SSD with support for pi zero W
Re: piBeacon: 3- presence monitoring download
posted v 7-42-65
fixed:
- some smaller items, typos etc
- heavily tested replacing RPIs , and that seems to work automatically now: you can take an SSD from one RPI and put it into another RPI and it should switch automatically.
- the only thing that does not work: in the newer versions OS X does not allow "automatic" changes of the hosts file anymore (SIP enabled). YOU have to do "sudo nano hosts" and delete that line that describes the entry for the changed ip/mac number. The plugin is testing if "SIP" is enabled or disabled. If disabled it will do everything for you, if enabled it will write a warning that it can not modify the hosts file. It will print the sudo nano statement for you, you can copy and paste it and execute (need to replace YOURID with your id)
Not to be overly optimistic, but this is a release I am happy with.. have not found any more bugs.. (by stating this a new big one will appear !!)
Karl
SIP = System Integrity Protection
you can test with yourself
fixed:
- some smaller items, typos etc
- heavily tested replacing RPIs , and that seems to work automatically now: you can take an SSD from one RPI and put it into another RPI and it should switch automatically.
- the only thing that does not work: in the newer versions OS X does not allow "automatic" changes of the hosts file anymore (SIP enabled). YOU have to do "sudo nano hosts" and delete that line that describes the entry for the changed ip/mac number. The plugin is testing if "SIP" is enabled or disabled. If disabled it will do everything for you, if enabled it will write a warning that it can not modify the hosts file. It will print the sudo nano statement for you, you can copy and paste it and execute (need to replace YOURID with your id)
Not to be overly optimistic, but this is a release I am happy with.. have not found any more bugs.. (by stating this a new big one will appear !!)
Karl
SIP = System Integrity Protection
you can test with
Code: Select all
/usr/bin/csrutil statusRe: piBeacon: 3- presence monitoring download
posted new version 7-47-69
fixed:
some minor things
fixed logging on RPi if SSD ram disk is full
added:
- FM radio TEA5767 module ($1-$10) Supported are: setting of all internal parameters (mini/stereo, japan/rest, PLL settings, frequency, scanning. etc etc.) you can set the frequency, mon/stereo... in actions or in the menu. This device runs on 5V not 3.3, But you can connect the i2c connectors to the RPI w/o damage (at least it works for me)
- APDS9960 gesture detection module ($10-$15). Supported are: proximity (0-255), distance indicator: near/far; gestures: LEFT/RIGHT/UP/DOWN, RGB clear values of received light.
- i2cLM35A temp module
- i2cSHT21 temp module
-- added local action function to GPIO pins and gesture sensor. In device edit you can enter any unix command into the action text field. if the condition is met the unix commend is executed. This is done immediately w/o round trip to the indigo box.
possible actions: ls or a curl command or a GPIO command .. any think that works at the unix command prompt works.
Karl
fixed:
some minor things
fixed logging on RPi if SSD ram disk is full
added:
- FM radio TEA5767 module ($1-$10) Supported are: setting of all internal parameters (mini/stereo, japan/rest, PLL settings, frequency, scanning. etc etc.) you can set the frequency, mon/stereo... in actions or in the menu. This device runs on 5V not 3.3, But you can connect the i2c connectors to the RPI w/o damage (at least it works for me)
- APDS9960 gesture detection module ($10-$15). Supported are: proximity (0-255), distance indicator: near/far; gestures: LEFT/RIGHT/UP/DOWN, RGB clear values of received light.
- i2cLM35A temp module
- i2cSHT21 temp module
-- added local action function to GPIO pins and gesture sensor. In device edit you can enter any unix command into the action text field. if the condition is met the unix commend is executed. This is done immediately w/o round trip to the indigo box.
possible actions: ls or a curl command or a GPIO command .. any think that works at the unix command prompt works.
Karl
Re: piBeacon: 3- presence monitoring download
posted v 7-48-70
improved:
added functions to radio (TEA5767) and proximity / gesture sensor ADS9960
- restart radio
- motions: up/down/left/right/vertical/horizontal/Movement .. added the last 3 in case the decision is not clear -- this replaced the "UNKNOWN" state
added:
in addition to GPIO-1-dimmer there is now a relay output.
only difference is no dimming and the indigo UI just shows the on/off switch
in the actions/ menu there is still the "analogValue/ command. if you use that it will be converted to cmd= UP, so only the up/down/ pulse .. are valid commands
Karl
improved:
added functions to radio (TEA5767) and proximity / gesture sensor ADS9960
- restart radio
- motions: up/down/left/right/vertical/horizontal/Movement .. added the last 3 in case the decision is not clear -- this replaced the "UNKNOWN" state
added:
in addition to GPIO-1-dimmer there is now a relay output.
only difference is no dimming and the indigo UI just shows the on/off switch
in the actions/ menu there is still the "analogValue/ command. if you use that it will be converted to cmd= UP, so only the up/down/ pulse .. are valid commands
Karl
Re: piBeacon: 3- presence monitoring download
posted v 7-49-73
added:
- you now can select which icon to show in the status column for GPIO-input-1, CAR and ultrasound sensors
so instead of on/off you could show windowClosed /windowOpen, or power on/off, none/ error, fanOn/off,...
- added sensor i2cMLX90614. It is an infrared sensor that measures ambient temp and remote temperature from the amount of infrared light received. It is like the thing you hold infront of your head and measure your body temperature, but this one is not as accurate but goes from -70…380°C , so you could measure flames, oven temp ...
https://www.amazon.com/gp/product/B01DI ... UTF8&psc=1 ($13) works fine. There are some on the market that sound similar but they likely do not work ,.. tried for several days with some others . This one works with 5v and 3.3 v = you can connect the V+ to the 3.3V or the 5V RPI pin
Karl
list of icons:
for 0/down/off/away vs 1/UP/ON/home/close
added:
- you now can select which icon to show in the status column for GPIO-input-1, CAR and ultrasound sensors
so instead of on/off you could show windowClosed /windowOpen, or power on/off, none/ error, fanOn/off,...
- added sensor i2cMLX90614. It is an infrared sensor that measures ambient temp and remote temperature from the amount of infrared light received. It is like the thing you hold infront of your head and measure your body temperature, but this one is not as accurate but goes from -70…380°C , so you could measure flames, oven temp ...
https://www.amazon.com/gp/product/B01DI ... UTF8&psc=1 ($13) works fine. There are some on the market that sound similar but they likely do not work ,.. tried for several days with some others . This one works with 5v and 3.3 v = you can connect the V+ to the 3.3V or the 5V RPI pin
Karl
list of icons:
Code: Select all
ICONLIST = [ ["None","None"],
["None","Error"],
["PowerOff","PowerOn"],
["DimmerOff","DimmerOn"],
["FanOff","FanOn"],
["SprinklerOff","SprinklerOn"],
["SensorOff","SensorOn"],
["SensorOn","SensorTripped"],
["SensorOff","SensorTripped"],
["EnergyMeterOff","EnergyMeterOn"],
["LightSensor","LightSensorOn"],
["MotionSensor","MotionSensorTripped"],
["DoorSensorClosed","DoorSensorOpened"],
["WindowSensorClosed","WindowSensorOpened"],
["TemperatureSensor","TemperatureSensorOn"],
["HumiditySensor","HumiditySensorOn"],
["HumidifierOff","HumidifierOn"],
["DehumidifierOff","DehumidifierOn"],
["TimerOff","TimerOn"]]
Re: piBeacon: 3- presence monitoring download
posted V 7-50-74
added:
- TOF distance sensor VL53L0X
https://www.amazon.com/Industry-Park-VL ... ds=VL53L0X
this a laser sensor that measures distance through the time the light travels to and from the surface it is pointing to. As it is a laser the cone is very small = focussed.
The magic of this thing is that the time it takes for the light to travel 10 cm is 0.3 nano sec. The resolution is around 0.5 cm. The shortest distance is ~ 2 cm. and the furthest I have seen is ~ 2+ meters.
So the time resolution that this little sensor does is 0.015 nano sec . When I did my physics 30+ years ago our resolution was ~ 5 nano seconds and we measured things through adding coax cable to make 2 signals overlaying.
Anyway for ~ $15 in a 2mmx5mm box (*)this is magic.
- added local actions to ultrasound distance
These local actions are now available for GPIO input, and distance sensors. They are executed locally on the RPI, hence a VERY fast reaction time to UP/down, close, away, up/down left/right . events is < 0.1 seconds.
example of an action:. That will set GPIO pin 18 up and immediately down again. You would enter THAT text into the action input field in the device edit. Then if the event occurs (close, medium distance, left , up, down ..) that action would be executed locally on the RPI w/o travel to indigo and back to the RPI.
Karl
the plugin will install all the required libraries for you.
for the TOF sensor you only need to connect V+ 3.3V, ground and i2c SLA and SLC
the interrupt line is not used.
You can choose between accuracy and distance optimization settings for the sensor.
(*) the sensor is mounted on a much bigger board so that you can handle it.
added:
- TOF distance sensor VL53L0X
https://www.amazon.com/Industry-Park-VL ... ds=VL53L0X
this a laser sensor that measures distance through the time the light travels to and from the surface it is pointing to. As it is a laser the cone is very small = focussed.
The magic of this thing is that the time it takes for the light to travel 10 cm is 0.3 nano sec. The resolution is around 0.5 cm. The shortest distance is ~ 2 cm. and the furthest I have seen is ~ 2+ meters.
So the time resolution that this little sensor does is 0.015 nano sec . When I did my physics 30+ years ago our resolution was ~ 5 nano seconds and we measured things through adding coax cable to make 2 signals overlaying.
Anyway for ~ $15 in a 2mmx5mm box (*)this is magic.
- added local actions to ultrasound distance
These local actions are now available for GPIO input, and distance sensors. They are executed locally on the RPI, hence a VERY fast reaction time to UP/down, close, away, up/down left/right . events is < 0.1 seconds.
example of an action:
Code: Select all
gpio -g mode 18 out;gpio -g write 18 1;gpio -g write 18 0Karl
the plugin will install all the required libraries for you.
for the TOF sensor you only need to connect V+ 3.3V, ground and i2c SLA and SLC
the interrupt line is not used.
You can choose between accuracy and distance optimization settings for the sensor.
(*) the sensor is mounted on a much bigger board so that you can handle it.
Re: piBeacon: 3- presence monitoring download
posted V 7-51-74
fixed:
smaller issues
improved:
Added better support for infrared temp sensor and distance sensors.
IR temp sensor can send updates every second if the value changes > 0.3C. Can be set in sensor device edit (this does not tax the RPI
added:
Min signal value for iBeacons. AND added 2 min Signal options for beacon. That allows much faster reaction to beacon signals:
=== a) you can set min signal for each iBeacon. That is used in the plugin. If message from an RPI comes in and the RSSI (signal) value of the beacon message is < min it is ignored = like not send
=== b) for fastDown min signal. That is handled on the RPI directly: if the signal is less than xx (e.g. -85) the message from the iBeacon is ignored on the RPI and can lead to a faster fastDown - As each RPi does the same decision, only the strongest will send an UP signal to the plugin and all other will send a fastDOWN faster. If you keep min fast down signal at -999 it is ignored (actually no signal can be less than -100)
The min signal can be used to limit the detection of the PRI from the RPI, or recognizing the signals in the plugin. That will focus the messaging on the nearest RPI. So if you are in a room with your iBeacon likely only the local RPI will recognize you, and not the other RPI.
This might create some false negatives. e.g. if you carry your beacon in your back pocket and you face the RPI, the signal might not be strong enough to register.
Karl
next version will have support for the Pimoroni unicornHat with 8x8 NEO led . They are really bright.. you can light up a room with them and they have 8 bit RBG values.
fixed:
smaller issues
improved:
Added better support for infrared temp sensor and distance sensors.
IR temp sensor can send updates every second if the value changes > 0.3C. Can be set in sensor device edit (this does not tax the RPI
added:
Min signal value for iBeacons. AND added 2 min Signal options for beacon. That allows much faster reaction to beacon signals:
=== a) you can set min signal for each iBeacon. That is used in the plugin. If message from an RPI comes in and the RSSI (signal) value of the beacon message is < min it is ignored = like not send
=== b) for fastDown min signal. That is handled on the RPI directly: if the signal is less than xx (e.g. -85) the message from the iBeacon is ignored on the RPI and can lead to a faster fastDown - As each RPi does the same decision, only the strongest will send an UP signal to the plugin and all other will send a fastDOWN faster. If you keep min fast down signal at -999 it is ignored (actually no signal can be less than -100)
The min signal can be used to limit the detection of the PRI from the RPI, or recognizing the signals in the plugin. That will focus the messaging on the nearest RPI. So if you are in a room with your iBeacon likely only the local RPI will recognize you, and not the other RPI.
This might create some false negatives. e.g. if you carry your beacon in your back pocket and you face the RPI, the signal might not be strong enough to register.
Karl
next version will have support for the Pimoroni unicornHat with 8x8 NEO led . They are really bright.. you can light up a room with them and they have 8 bit RBG values.
Re: piBeacon: 3- presence monitoring download
posted V 7-52-78
added:
support for NEO-pixel LED. These are RGB (chains) LEDs you can drive through a single signal wire +ground and +5 V.
10x10 matrix go for ~ $20 from cheap sources. They can light up you room (for 200LED at x20mAmp each gives ~ 4Amps into the LED) That equivalent to >> 100watt incandescent light.
The plugin supports 1, 1x2..1x100 (long strips) or 2x2 .. 16x16 matrixes of LED.
1. setup a new device in pibeacon, model = NEO pixel and select the # of LEDs.
2. attach the NEO pixel to your RPi:
signal goes to GPIO#18
Ground -- ground
V+ -- V+5V
and for most you need a level shifter. Some (pimoroni https://www.adafruit.com/product/2288 deliver them with level shifter build in and their HAT 8x8 has pins 2, 12,9 (not GPIOs) active. All other grounds are not working !!
3. then create an action pibeacon/neopixel or in pibeacon / menu and there you can
- switch on /off (RGB 0...255) single led, lines, set of less or the full matrix.
- setup up to 10 items that ca be executed in sequence with delays etc
- you can rotate the less on the device (only makes sense on a NEO-ring , looks cool.
- and some more features.
==> you must enter the coordinates correctly in the parameter field. e.g. [0,5,100,0,0] switches LED y=0,x=5 red on at 100/255
there is only some error checking of the format .
you could put a strip behind your TV and make the background colorful ..
here some examples of the devices supported:
https://www.amazon.com/s/ref=a9_sc_1?rh ... 1491765752
anything that states WS2812B type should work
make sure your power supply can deliver the Amps.. you can get a chain with 240 LED all full on = ~ 5Amps!!
if you miss a form factor.. I can add this quickly
not working yet is rotation, restore after reboot.
Will try to add them as a RGB dimmer, but since they are so many LED and they all can be different, I don't know how to do that that as a single device. ==> question for Jay and Matt.
And I have not tested to use a signal pin != GPIO18. there is another option GPIO12 that SHOULD work too.
The load on the Rip is minimal for normal display, if you do fast rotation (e.g. step time 0.001 seconds the load for 8x8 device is ~ 10%)
The plugin will install all the libs need to run this..
Karl
you can find detailed install steps l from pomoroni @ https://learn.pimoroni.com/tutorial/uni ... nicorn-hat
also adafruit has some libs. but the all use the WS2812B driver. The plugin will install the wxxxx.so file of that driver (compiled python wrapper c file). All python code is in the file neopixel.py if you want to look at it
currently supported configs: [EDIT: added more models]
added:
support for NEO-pixel LED. These are RGB (chains) LEDs you can drive through a single signal wire +ground and +5 V.
10x10 matrix go for ~ $20 from cheap sources. They can light up you room (for 200LED at x20mAmp each gives ~ 4Amps into the LED) That equivalent to >> 100watt incandescent light.
The plugin supports 1, 1x2..1x100 (long strips) or 2x2 .. 16x16 matrixes of LED.
1. setup a new device in pibeacon, model = NEO pixel and select the # of LEDs.
2. attach the NEO pixel to your RPi:
signal goes to GPIO#18
Ground -- ground
V+ -- V+5V
and for most you need a level shifter. Some (pimoroni https://www.adafruit.com/product/2288 deliver them with level shifter build in and their HAT 8x8 has pins 2, 12,9 (not GPIOs) active. All other grounds are not working !!
3. then create an action pibeacon/neopixel or in pibeacon / menu and there you can
- switch on /off (RGB 0...255) single led, lines, set of less or the full matrix.
- setup up to 10 items that ca be executed in sequence with delays etc
- you can rotate the less on the device (only makes sense on a NEO-ring , looks cool.
- and some more features.
==> you must enter the coordinates correctly in the parameter field. e.g. [0,5,100,0,0] switches LED y=0,x=5 red on at 100/255
there is only some error checking of the format .
you could put a strip behind your TV and make the background colorful ..
here some examples of the devices supported:
https://www.amazon.com/s/ref=a9_sc_1?rh ... 1491765752
anything that states WS2812B type should work
make sure your power supply can deliver the Amps.. you can get a chain with 240 LED all full on = ~ 5Amps!!
if you miss a form factor.. I can add this quickly
not working yet is rotation, restore after reboot.
Will try to add them as a RGB dimmer, but since they are so many LED and they all can be different, I don't know how to do that that as a single device. ==> question for Jay and Matt.
And I have not tested to use a signal pin != GPIO18. there is another option GPIO12 that SHOULD work too.
The load on the Rip is minimal for normal display, if you do fast rotation (e.g. step time 0.001 seconds the load for 8x8 device is ~ 10%)
The plugin will install all the libs need to run this..
Karl
you can find detailed install steps l from pomoroni @ https://learn.pimoroni.com/tutorial/uni ... nicorn-hat
also adafruit has some libs. but the all use the WS2812B driver. The plugin will install the wxxxx.so file of that driver (compiled python wrapper c file). All python code is in the file neopixel.py if you want to look at it
currently supported configs: [EDIT: added more models]
16x16
14x14
12x12
10x10
8x8
8x4
4x8
4x4
2x2
1x1
1x2
1x4
1x6
1x8
1x10
1x12
1x16
1x18
1x20
1x24
1x30
1x40
1x48
1x50
1x60
1x64
1x70
1x80
1x90
1x100
1x120
1x140
1x144
1x160
1x180
1x200
Re: piBeacon: 3- presence monitoring download
posted V 7-52-82
added:
RGB dimmer for neo pixel devices.
the plugin/ RPI now supports indigo RGB dimmer devices with RGB and white levels that can be set in the indigo UI.
see details on how to use and configure in the net-pixel discussion thread
Karl
added:
RGB dimmer for neo pixel devices.
the plugin/ RPI now supports indigo RGB dimmer devices with RGB and white levels that can be set in the indigo UI.
see details on how to use and configure in the net-pixel discussion thread
Karl
Re: piBeacon: 3- presence monitoring download
posted V 7-52-83
added:
speed of change. . you can now change color / brightness over time e.g. going from 0-100% in 0....5 seconds. It works for the neo-pixel actions / menu and also for neo-pixel-dimmer. There you need to put it into the device edit.
Karl
added:
speed of change. . you can now change color / brightness over time e.g. going from 0-100% in 0....5 seconds. It works for the neo-pixel actions / menu and also for neo-pixel-dimmer. There you need to put it into the device edit.
Karl
Re: piBeacon: 3- presence monitoring download
posted V 7-52-84
improved:
- better error control if wrong data is entered.
- some more range checks - if x,y coordinates are > than actual number of LEDs
- added put more info into address and notes columns i.e. what config (e.g. size of be-pixel array ...)
Karl
improved:
- better error control if wrong data is entered.
- some more range checks - if x,y coordinates are > than actual number of LEDs
- added put more info into address and notes columns i.e. what config (e.g. size of be-pixel array ...)
Karl
- Attachments
-
- Screen Shot 2017-04-14 at 18.11.17.png (35.3 KiB) Viewed 5111 times
-
- Screen Shot 2017-04-14 at 22.38.28.png (33.26 KiB) Viewed 5111 times
Re: piBeacon: 3- presence monitoring download
posted V 7.52.86
added more NEO-pixel form factors .. now up to 300 NEO pixels
fixed:
did not support "change brightness to" command (supported only "set brightness to" and set RGB values ).
change .. is used by indigo on the iPhone when you change the light on a dimmer. Using the indigo MAC interface Indigo sends "set brightness level to "..
anyway, it works now on the iPhone AND the mac user interface
Karl
added more NEO-pixel form factors .. now up to 300 NEO pixels
fixed:
did not support "change brightness to" command (supported only "set brightness to" and set RGB values ).
change .. is used by indigo on the iPhone when you change the light on a dimmer. Using the indigo MAC interface Indigo sends "set brightness level to "..
anyway, it works now on the iPhone AND the mac user interface
Karl
Re: piBeacon: 3- presence monitoring download
posted V 7-52-87
added:
added an option : enable / disable the automatic addition of one wire temp sensor devices on an RPI. Before once you defined a single oneWire device, you could add many extra and the plugin would add them automatically with their internal ID (28-xxxx). As it happened, I had an RPi that went ballistic(*) and created an unstable oneWire environment and somehow added ~ 800 devices within an hour automatically. So with this option you need to enable the automatic addition of oneWire temp sensors . Once disabled it will ignore any additional (or RPI panic situations)
This will likely never ever happen again, but its good to that have that option anyway.
Karl
(*) symptoms:
i2cdetect -y 1
was very slow and did not finish
cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
constantly delivered changing available slaves ==> that triggered the creation of new devices ...
again very unlikely that you will ever have this ...
added:
added an option : enable / disable the automatic addition of one wire temp sensor devices on an RPI. Before once you defined a single oneWire device, you could add many extra and the plugin would add them automatically with their internal ID (28-xxxx). As it happened, I had an RPi that went ballistic(*) and created an unstable oneWire environment and somehow added ~ 800 devices within an hour automatically. So with this option you need to enable the automatic addition of oneWire temp sensors . Once disabled it will ignore any additional (or RPI panic situations)
This will likely never ever happen again, but its good to that have that option anyway.
Karl
(*) symptoms:
i2cdetect -y 1
was very slow and did not finish
cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
constantly delivered changing available slaves ==> that triggered the creation of new devices ...
again very unlikely that you will ever have this ...
Re: piBeacon: 3- presence monitoring download
posted V 7-60-100
fixed:
smaller expiation handling, some formatting
new
Added various type of sensors,[/b] see http://forums.indigodomo.com/viewtopic. ... 87&t=15563 for the complete list
- more light sensors(UV,UVA,UVB, infrared, RGB,..,
- gyroscopes, magnetometer 3... 9 degrees detectors : rotate x,y,z, lin acceleration in x,y,z, orientation to earth x,y,z, magnetic field x,y,z
- pulse sensors
- micro wave sensor <== really cool, ~ $11
- distance- gesture for distances 3 cm ... several meters using laser, infrared, ultrasound, or microwave.
- touch sensors with # of inputs: 1, 12, 16, 8+ "volume slider". This can be used as key entry, set volume, start stop things , shutdown RPI.
- 8 bit 4 channel ADC/ one channel DAC ($1)
The work went into setting them up in a way that takes (full) advantage of their specific properties. i.e. set refresh time. send updates if values have change by xx % ... to minimize indigo updates and maximize reaction to changes. in total > 60 different sensor / output types.
- Added more local actions ( actions that are executed directly on the RPI without going through indigo.
== double click/touch = 2 clicks in 3 seconds
== long click / touch =one click for > 3 seconds
you could set e.g. in a touch sensor device edit:
double click(touch) reboot RPI. then add a touch sensor ($1) and you have a reset or power down button.. double click / touch it and the Rip will shutdown/ reboot as show here Normally you do not have access to plugin properties (device states yes, properties no). Added a plugin call/ action that allows to get and set any property.. instead of e.g. going through device edit and set eg a property "intensity" to 100. Similar you can read any property,
Set any property of any pibeacon device in python scripts or indigo regular actions, this example script is triggered if any change to light sensor intensity and then checks
if the intensity property of the display device is ==100 , if not and the light value > 5000 and it is after 7 am in the morning set display intensity to 100 and sends an update to the device
Karl
fixed:
smaller expiation handling, some formatting
new
Added various type of sensors,[/b] see http://forums.indigodomo.com/viewtopic. ... 87&t=15563 for the complete list
- more light sensors(UV,UVA,UVB, infrared, RGB,..,
- gyroscopes, magnetometer 3... 9 degrees detectors : rotate x,y,z, lin acceleration in x,y,z, orientation to earth x,y,z, magnetic field x,y,z
- pulse sensors
- micro wave sensor <== really cool, ~ $11
- distance- gesture for distances 3 cm ... several meters using laser, infrared, ultrasound, or microwave.
- touch sensors with # of inputs: 1, 12, 16, 8+ "volume slider". This can be used as key entry, set volume, start stop things , shutdown RPI.
- 8 bit 4 channel ADC/ one channel DAC ($1)
The work went into setting them up in a way that takes (full) advantage of their specific properties. i.e. set refresh time. send updates if values have change by xx % ... to minimize indigo updates and maximize reaction to changes. in total > 60 different sensor / output types.
- Added more local actions ( actions that are executed directly on the RPI without going through indigo.
== double click/touch = 2 clicks in 3 seconds
== long click / touch =one click for > 3 seconds
you could set e.g. in a touch sensor device edit:
double click(touch) reboot RPI. then add a touch sensor ($1) and you have a reset or power down button.. double click / touch it and the Rip will shutdown/ reboot as show here Normally you do not have access to plugin properties (device states yes, properties no). Added a plugin call/ action that allows to get and set any property.. instead of e.g. going through device edit and set eg a property "intensity" to 100. Similar you can read any property,
Set any property of any pibeacon device in python scripts or indigo regular actions, this example script is triggered if any change to light sensor intensity and then checks
if the intensity property of the display device is ==100 , if not and the light value > 5000 and it is after 7 am in the morning set display intensity to 100 and sends an update to the device
Code: Select all
import datetime, time
plug = indigo.server.getPlugin("com.karlwachs.piBeacon")
# get new light value
lum = float(indigo.devices[864053974].states["ambient"])
# get currenbt intensity settings
props=indigo.devices[1514723531].pluginProps
currentInt = plug.executeAction("getAnyProperty",props ={ "deviceNameOrId" :"1514723531" ,"propertyName":"intensity"})
# or read output variable set by the plugin:
currentInt = float(indigo.variables["piBeacon-property"].value)
#set property "intensity" to new value (100) and send an up[date to the rpi server if conditions are right
dd = datetime.datetime.now()
indigo.server.log("lum "+str(lum)+" dd" + str(dd)+" "+ str(dd.hour)+" props ="+str(currentInt))
if lum > 1000 and dd.hour >= 7 and currentInt < 100:
indigo.server.log("updateing")
plug.executeAction("setAnyProperty",props ={ "deviceNameOrId" :"1514723531" ,"propertyName":"intensity", "propertyContents": "100"})
time.sleep(0.2)
plug.executeAction("sendConfigSocket",props ={ "configurePi" :"2" })
props=indigo.devices[1514723531].pluginProps
plug.executeAction("getAnyProperty",props ={ "deviceNameOrId" :"1514723531" ,"propertyName":"intensity"})
currentInt = float(indigo.variables["piBeacon-property"].value)
indigo.server.log("lum "+str(lum)+" dd" + str(dd)+" "+ str(dd.hour)+" props ="+str(currentInt))