You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

example4.py 826B

  1. from pms_api import SixfabPMS, Definition, Event
  2. import time
  3. pms = SixfabPMS()
  4. epoch = time.time()
  5. # Remove all evnts
  6. print("Result removing all Scheduled Event: " + str(pms.removeAllScheduledEvents(200)))
  7. event = Event()
  8. event.id = 1
  9. event.schedule_type = Definition.EVENT_INTERVAL
  10. event.repeat = Definition.EVENT_ONE_SHOT
  11. event.time_interval = 20
  12. event.interval_type = Definition.INTERVAL_TYPE_SEC
  13. event.action = Definition.SOFT_POWER_OFF
  14. #result = pms.createScheduledEventWithEvent(event, 500)
  15. #print("Create S. Event Result: " + str(result))
  16. #print("IDs of Scheduled Events: " + str(pms.getScheduledEventIds()))
  17. #print("Remove SE by id result: " + str(pms.removeScheduledEvent(1)))
  18. #print("IDs of Scheduled Events: " + str(pms.getScheduledEventIds()))
  19. print("RPi Core Temp: " + str(pms.getSystemTempRaspberry()))