Class: Artoo::Drivers::Pebble
- Inherits:
-
Driver
- Object
- Driver
- Artoo::Drivers::Pebble
- Defined in:
- lib/artoo/drivers/pebble.rb
Overview
The pebble driver behaviors
Constant Summary collapse
- COMMANDS =
[:ping, :notification_sms, :notification_email, :set_nowplaying_metadata, :get_versions, :get_installed_apps, :remove_app, :get_time, :set_time, :system_message, :reset]
Instance Method Summary collapse
- #handle_message_events ⇒ Object
-
#start_driver ⇒ Object
Start driver and any required connections.
Instance Method Details
#handle_message_events ⇒ Object
29 30 31 32 33 34 |
# File 'lib/artoo/drivers/pebble.rb', line 29 def while not connection.protocol..empty? do e = connection.protocol..pop publish(event_topic_name(e[0].to_s), e[1]) end end |
#start_driver ⇒ Object
Start driver and any required connections
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/artoo/drivers/pebble.rb', line 13 def start_driver begin every(interval) do end connection.listen_for_events(false) super rescue Exception => e Logger.error "Error starting Pebble driver!" Logger.error e. Logger.error e.backtrace.inspect end end |