<Field id="showDebugInfo" type="checkbox">
<Label>Enable debugging:</Label>
<Description>(recommended to turn off after specific debug)</Description>
</Field>
self.debug = pluginPrefs.get("showDebugInfo", False)
self.logger.debug("Starting device: " + device.name)
My People Debug ...
ryanbuckner wrote:I would like an option to set the error log debug reporting level. On/Off will suffice.
Apr 24, 2022 at 1:15:28 PM
Trigger Sync BMW People with Connected
My People Debug The Device -Ryan's BMW:userLatitude- value set to: -XXX- From Source: -Ryan's BMW 540ix:gps_lat-
My People Debug metadata added to Ryan's BMW. key= meta_userLatitude with value: %%d:575567701:gps_lat%%
My People Debug The Device -Ryan's BMW:userLongitude- value set to: --YYY- From Source: -Ryan's BMW 540ix:gps_long-
My People Debug metadata added to Ryan's BMW. key= meta_userLongitude with value: %%d:575567701:gps_long%%
import logging
myPeopleId = "com.whmoorejr.my-people"
myPeoplePlugin = indigo.server.getPlugin(myPeopleId)
if myPeoplePlugin.isEnabled():
theRecord = "1"
myPeoplePlugin.executeAction("nowShowingSpecific", deviceId= 1883703450, props={'nowShowingSpecificField':theRecord})
else:
indigo.server.log("Didn't Work" , level=logging.WARNING) # log a failure message
import logging
login_name = "PIN fail" # if you change this, don't forget to update the if login_name == "PIN fail" below
password = indigo.variables[777599449].value # "PWInput"
theMessage = "Unsuccessful PIN Entry Attempt with PIN: " + password
for dev in indigo.devices.iter(filter="com.whmoorejr.my-people"):
MyPin = dev.states["userPinNumber"]
if MyPin == password:
login_name = dev.states["friendlyName"]
theMessage = "PIN Code Accepted, " + login_name + " is here."
# indigo.server.log(login_name + " can have soup!") # log a success PIN message
# indigo.actionGroup.execute(12345678) # run a success PIN action
if login_name == "PIN fail":
indigo.server.log("No Soup For You!", level=logging.WARNING) # log a failure message
# indigo.actionGroup.execute(87654321) # run a failure PIN action
indigo.variable.updateValue(748482965, value=login_name) # update variable with name of user with matching pin or "PIN Fail"
indigo.server.log(theMessage) # log the result of the script
import logging
myPeopleId = "com.whmoorejr.my-people"
myPeoplePlugin = indigo.server.getPlugin(myPeopleId)
if myPeoplePlugin.isEnabled():
newPinNumber = "5678"
myPeoplePlugin.executeAction("setUserPinNumber", deviceId=946349721, props={'userPinNumberField':newPinNumber})
else:
indigo.server.log("Didn't Work" , level=logging.WARNING) # log a failure message