posted V 7-60-100
fixed:smaller expiation handling, some formatting
newAdded various type of sensors,[/b] see
http://forums.indigodomo.com/viewtopic.php?f=187&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
- Screen Shot 2017-06-02 at 18.14.45.png (54.42 KiB) Viewed 4279 times
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))
Karl