[quote=“gregl, post:28, topic:178741”]OK …a little update.
I did dig around and think its partially working.
I updated the mysensors/sensor.h file:// Sensor variables that can be used in sketches
typedef enum {
V_TEMP,V_HUM, V_LIGHT, V_DIMMER, V_PRESSURE, V_FORECAST, V_RAIN,
V_RAINRATE, V_WIND, V_GUST, V_DIRECTION, V_UV, V_WEIGHT, V_DISTANCE,
V_IMPEDANCE, V_ARMED, V_TRIPPED, V_WATT, V_KWH, V_SCENE_ON, V_SCENE_OFF,
V_HEATER, V_HEATER_SW, V_LIGHT_LEVEL, V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5,
V_UP, V_DOWN, V_STOP, V_IR_SEND, V_IR_RECEIVE, V_FLOW, V_VOLUME[b], V_STATUS[/b]
} variableType;
just adding V_STATUS
Sketch then compiled…
Then in L_Arduino.lua i added
IR_RECEIVE = {33, "urn:upnp-org:serviceId:ArduinoIr1", "IrCode", ""},
FLOW = {34, "urn:micasaverde-com:serviceId:WaterMetering1", "Flow", "" },
VOLUME = {35, "urn:micasaverde-com:serviceId:WaterMetering1", "Volume", "0" },
[b] LOCK = {36, "urn:micasaverde-com:serviceId:DoorLock1", "Status", ""},[/b]
Now when the sensor state ( a button at this time ) changes the padlock icon and the UI buttons “Unlock” and “Lock” toggle accordingly! ;D
Next step…getting it to toggle the relay - will be borrowing your code here korttoma.[/quote]
Thanks, I must have missed the lock-status-variable…
I will add it right away. They will be named:
L_Arduino.lua: LOCK (like in your example)
Sensor.h: V_LOCK_STATUS (just STATUS was a bit too generic)