//************ ITEM ******************************* Number itm_park_car_present "Mom's Car Stall" Number itm_park_dist_mqtt "Car Distance [%.1f]" {mqtt="<[mymosquitto:4122:state:default]"} Switch itm_park_garage_btn "Garage Open/Close" Switch itm_park_door_mqtt_act "Garage Door Opener" {mqtt=">[mymosquitto:4132:command:ON:1],>[mymosquitto:4132:command:OFF:0]"} //************* SITEMAP **************************** Text label="Garage Genie" icon="firstfloor" { Frame label="Garage Genie Details" { Text item=itm_park_car_present Switch item=itm_park_garage_btn mappings=[OFF="DOOR"] } //end Parking Genie Details Frame label="Camera" { //note, the video url string may look like either of these Video url="http://192.168.1.71:88" encoding="mjpeg" //Video url="http://192.168.1.70/mjpg/video.mjpg?camera=1" encoding="mjpeg" }//end frame "Camera" }//end Garage Genie //************** RULE ********************************** rule "car presence" when Item itm_park_dist_mqtt received update then if (itm_park_dist_mqtt.state < 30) { sendCommand(itm_park_car_present, 1) } if (itm_park_dist_mqtt.state > 35) { sendCommand(itm_park_car_present, 0) } end rule "garage door closeopen" when Item itm_park_garage_btn received update then sendCommand(itm_park_door_mqtt_act, OFF) end