Documentation ¶
Index ¶
- Constants
- Variables
- func FromUnixMicro(µs int64) time.Time
- func FromUnixMilli(ms int64) time.Time
- type Account
- type AppStore
- type Arlo
- func (a *Arlo) BatchDeleteRecordings(l *Library) error
- func (a *Arlo) CheckSession() (session *Session, err error)
- func (a *Arlo) DeleteRecording(r *Recording) error
- func (a *Arlo) DownloadFile(url string, w io.Writer) error
- func (a *Arlo) GetActiveAutomationDefinitions() error
- func (a *Arlo) GetDevices() (devices *Devices, err error)
- func (a *Arlo) GetLibrary(fromDate, toDate time.Time) (library *Library, err error)
- func (a *Arlo) GetLibraryMetaData(fromDate, toDate time.Time) (libraryMetaData *LibraryMetaData, err error)
- func (a *Arlo) GetProfile() (profile *UserProfile, err error)
- func (a *Arlo) Logout() error
- func (a *Arlo) SendAnalyticFeedback(r *Recording) error
- func (a *Arlo) UpdateDisplayOrder(d DeviceOrder) error
- func (a *Arlo) UpdateFriends(f Friend) error
- func (a *Arlo) UpdatePassword(pass string) error
- func (a *Arlo) UpdateProfile(firstName, lastName string) error
- type AudioDetectionProperties
- type BaseDetectionProperties
- type BaseEventActionProperties
- type BaseLoopbackModeProperties
- type BaseNightLightProperties
- type BaseShuffleProperties
- type BaseSleepTimerProperties
- type BaseStationMetadata
- type Basestation
- func (b *Basestation) Arm() (response *EventStreamResponse, err error)
- func (b *Basestation) DeleteMode(mode string) (response *EventStreamResponse, err error)
- func (b *Basestation) Disarm() (response *EventStreamResponse, err error)
- func (b *Basestation) Disconnect() error
- func (b *Basestation) GetAssociatedCamerasState() (response *EventStreamResponse, err error)
- func (b *Basestation) GetCalendarMode() (response *EventStreamResponse, err error)
- func (b *Basestation) GetModes() (response *EventStreamResponse, err error)
- func (b *Basestation) GetRules() (response *EventStreamResponse, err error)
- func (b *Basestation) GetState() (response *EventStreamResponse, err error)
- func (b *Basestation) IsConnected() error
- func (b *Basestation) NotifyEventStream(payload EventStreamPayload, msg string) error
- func (b *Basestation) Ping() error
- func (b *Basestation) SetCalendarMode(active bool) (response *EventStreamResponse, err error)
- func (b *Basestation) SetCustomMode(mode string) (response *EventStreamResponse, err error)
- func (b *Basestation) SirenOff() (response *EventStreamResponse, err error)
- func (b *Basestation) SirenOn() (response *EventStreamResponse, err error)
- func (b *Basestation) Subscribe() error
- func (b *Basestation) Unsubscribe() error
- type BasestationModeProperties
- type BasestationScheduleProperties
- type Basestations
- type Camera
- func (c *Camera) Continuous() (response *EventStreamResponse, err error)
- func (c *Camera) DisableAudioAlerts(sensitivity int) (response *EventStreamResponse, err error)
- func (c *Camera) DisableMotionAlerts(sensitivity int, zones []string) (response *EventStreamResponse, err error)
- func (c *Camera) DisableNightLightTimer(sleepTimeRel int) (response *EventStreamResponse, err error)
- func (c *Camera) DisableSleepTimer(sleepTimeRel int) (response *EventStreamResponse, err error)
- func (c *Camera) EnableAudioAlerts(sensitivity int) (response *EventStreamResponse, err error)
- func (c *Camera) EnableMotionAlerts(sensitivity int, zones []string) (response *EventStreamResponse, err error)
- func (c *Camera) EnableNightLightTimer(sleepTime int64, sleepTimeRel int) (response *EventStreamResponse, err error)
- func (c *Camera) EnableSleepTimer(sleepTime int64, sleepTimeRel int) (response *EventStreamResponse, err error)
- func (c *Camera) GetAudioPlayback() (response *EventStreamResponse, err error)
- func (c *Camera) GetCvrPlaylist(fromDate, toDate time.Time) (playlist *CvrPlaylist, err error)
- func (c *Camera) Mute() (response *EventStreamResponse, err error)
- func (c *Camera) Next() error
- func (c *Camera) NightLight(on bool) (response *EventStreamResponse, err error)
- func (c *Camera) Off() (response *EventStreamResponse, err error)
- func (c *Camera) On() (response *EventStreamResponse, err error)
- func (c *Camera) Pause() error
- func (c *Camera) Play(trackId string, position int) error
- func (c *Camera) PushToTalk() error
- func (c *Camera) SetAlertNotificationMethods(action string, email, push bool) (response *EventStreamResponse, err error)
- func (c *Camera) SetBrightness(brightness int) (response *EventStreamResponse, err error)
- func (c *Camera) SetLoopBackMode(loopbackMode string) (response *EventStreamResponse, err error)
- func (c *Camera) SetNightLightBrightness(level int) (response *EventStreamResponse, err error)
- func (c *Camera) SetNightLightColor(red, blue, green int) (response *EventStreamResponse, err error)
- func (c *Camera) SetNightLightMode(mode string) (response *EventStreamResponse, err error)
- func (c *Camera) SetVolume(volume int) (response *EventStreamResponse, err error)
- func (c *Camera) Shuffle(on bool) (response *EventStreamResponse, err error)
- func (c *Camera) SingleTrack() (response *EventStreamResponse, err error)
- func (c *Camera) StartRecording() (url string, err error)
- func (c *Camera) StartStream() (url string, err error)
- func (c *Camera) StopRecording() error
- func (c *Camera) TakeSnapshot() (response *EventStreamResponse, err error)
- func (c *Camera) TriggerFullFrameSnapshot() (response *EventStreamResponse, err error)
- func (c *Camera) UnMute() (response *EventStreamResponse, err error)
- type CameraProperties
- type Cameras
- type Connectivity
- type CvrPlaylist
- type CvrPlaylistResponse
- type Data
- type Device
- type DeviceOrder
- type DeviceResponse
- type Devices
- type EmailNotification
- type EventActionProperties
- type EventStreamPayload
- type EventStreamResponse
- type Favorite
- type Friend
- type Library
- type LibraryMetaData
- type LibraryMetaDataResponse
- type LibraryResponse
- type LoginResponse
- type LoopbackModeProperties
- type MotionDetectionProperties
- type NightLightProperties
- type NightLightRGBProperties
- type Owner
- type PlayTrackProperties
- type PlaylistItem
- type Properties
- type Recording
- type RecordingResponse
- type Session
- type SessionResponse
- type ShuffleProperties
- type SirenProperties
- type SleepTimerProperties
- type SpeakerProperties
- type Status
- type Stream
- type StreamResponse
- type UserProfile
- type UserProfileResponse
- type VolumeProperties
Constants ¶
const ( DeviceTypeArloQ = "arloq" DeviceTypeArloBridge = "arlobridge" DeviceTypeBasestation = "basestation" DeviceTypeCamera = "camera" DeviceTypeLights = "lights" DeviceTypeSiren = "siren" TransIdPrefix = "web" BaseUrl = "https://my.arlo.com/hmsweb" // TODO: Implement all of the following urls. There are many here I don't have devices for. :/ ActiveAutomationUri = "/users/devices/automation/active" AllMediaUri = "/users/music/all" AnalyticFeedbackUri = "/users/library/%s/feedback" AssignBetaPlanUri = "/users/assign/smartfeatures" AssignDeviceToServicePlanUri = "/users/devices/provision" AutomationDefinitionsUri = "/users/automation/definitions?uniqueIds=all" AutomationModeUri = "/users/locations/%uniqueId/modes" AutomationScheduleUri = "/users/locations/%uniqueId/schedules" BuyUri = "http:/www.arlo.com/en-us/products/default.aspx?utm_source=app_desktop&p=all&cid=app" CameraOrderUri = "/users/devices/v2/displayOrder" CancelPlanUri = "/users/payment/plans/%paymentId/cancel" CancelQuotationUri = "/users/payment/quotations/%paymentId/cancel/v1" CapabilitiesUri = "/resources/capabilities/en/en_%t|i1000.json?t=%s" ChangeMobileOffersUri = "/users/payment/offers/dataplans/change/v5" ChangePlanUri = "/users/%paymentId/changeplan" CheckAccountUri = "/checkAccountUsage" CheckEmailUri = "/checkEmailUsage" ClaimDeviceUri = "/users/devices/claimDevice" CommunityUri = "http:/www.arlo.com/community?utm_source=app_desktop&locale=en" ConfirmUserIdUri = "/users/resend/confirm/email" CountryCodesUri = "/static/countrycodes" CreatePaymentAccountUri = "/users/payment/accounts" CreatePlanUri = "/users/payment/plans/%paymentId" DeleteAccountUri = "/users/closeAccount" DeviceFeaturesUri = "/users/devices/updateFeatures/feature/%uniqueId" DeviceProvisioningUri = "/users/devices/states" DeviceStatisticsUri = "/users/devices/%uniqueId/data/statistics?t=%s" DeviceSupportUri = "/devicesupport" DeviceSupportV2Uri = "/devicesupport/v2" DeviceUri = "/users/devices/%deviceId" DeviceZoneUri = "/users/devices/%uniqueId/activityzones/%zoneId" DeviceZonesUri = "/users/devices/%uniqueId/activityzones" DevicesUpdateFeaturesUri = "/users/devices/updateFeatures/feature" DevicesUri = "/users/devices/?t=%s" DonateRecordUri = "/users/library/%uniqueId/donate" EditAutomationModeUri = "/users/locations/%uniqueId/modes/%mode/devices/%i" EditUri = "/users/media" EmergencyCallDetailsUri = "/users/emergency/%emergencyId/call" EmergencyLocationSaveUri = "/users/emergency/locations/%emergencyId" EmergencyLocationsUri = "/users/emergency/locations" EventsUri = "/users/devices/%uniqueId/events?fromDate=%s&toDate=%s" FavoriteUri = "/users/library/favorite" FieldLengthsUri = "/static/fieldLengths" FriendsDeleteUri = "/users/friends/remove" FriendsUri = "/users/friends" FullFrameSnapshotUri = "/users/devices/fullFrameSnapshot" GPLUri = "https:/vzs3-prod-common.s3.amazonaws.com/license/GPLv1.html" HtmlChangeOffersUri = "/users/payment/offers/html/v5/change" HtmlOffersUri = "/users/payment/offers/html/v5" HtmlPrelimQuotationUri = "/users/payment/offers/quotation/html/v5" HtmlQuotationUri = "/users/payment/confirmation/%paymentId" LibFeedbackUri = "/library/feedback" LibraryStateUri = "/users/library/state/v1" LocateDevicesUri = "/locateDevice?discoveryToken=%s" LocationByZipUri = "/users/payment/postalcodelookup" LocationUri = "/users/locations" LoginUri = "/login" LoginV2Uri = "/login/v2" LogoutUri = "/logout" MetadataUri = "/users/library/metadata/v2" MigrateZonesUri = "/users/devices/%uniqueId/activityzones/migrate" MobileOffersUri = "/users/payment/offers/dataplans/v5" ModifyBillingUri = "/users/payment/billing/%paymentId" NotifyResponsesPushServiceUri = "/client/subscribe?token=%s" NotifyUri = "/users/devices/notify/%s" OffersDetailsUri = "/users/payment/offersdetail" OffersDvrChangeUri = "/users/payment/offers/arloq/html/v5/change" OffersDvrUri = "/users/payment/offers/arloq/html/v5" OffersUri = "/users/payment/offers/v3" PaymentBillingUri = "/users/payment/billing/%paymentId" PaymentRenewUri = "/users/payment/autoRenew/%paymentId" PaymentTermsLinkUri = "/paymentTermsAndConditions?t=%s" PlacemeterUri = "" PlaylistMetaUri = "/users/devices/%uniqueId/playlist/metadata" PlaylistUri = "/users/devices/%s/playlist?fromDate=%s&toDate=%s" PolicyUri = "/policy/v1/?t=%s" PreferencesUri = "/users/preferences" ProfileUri = "/users/profile" PttNotifyUri = "/users/devices/notify/%parentId" PttUri = "/users/devices/%s/pushtotalk" RMAValidationUri = "/users/devices/%restrictedDevice/apvalidation" RecordingsUri = "/users/library" RecycleUri = "/users/library/recycle" RegisterUserUri = "/register" RemoveDeviceUri = "/users/devices/v2/removeDevice" RenameDeviceUri = "/users/devices/v2/renameDevice" RenewPlanUri = "/users/payment/plans/%paymentId/renew" RenewQuotationUri = "/users/payment/quotations/%?/renew" RequestPasswordResetUri = "/requestPasswordReset" ResetCountUri = "/users/library/reset?uniqueId=%s" ResetPasswordUri = "/resetPassword" RestartDeviceUri = "/users/devices/restart" SSORegisterUri = "/ssoregister" SecretQuestionsUri = "/static/secretquestions" ServicePlanUri = "/users/serviceLevel/v3" SessionUri = "/users/session" SetAutomationModeUri = "/users/locations/%uniqueId/modes/%mode" SmartAlertsUri = "/users/devices/%uniqueId/smartalerts" SmartConfigUri = "/user/smarthome/config" StartRecordUri = "/users/devices/startRecord" StartStreamUri = "/users/devices/startStream" StatesCodesUri = "/static/usstatescodes" StopRecordUri = "/users/devices/stopRecord" StopStreamUri = "/users/devices/stopStream" StorageQuotaUri = "/users/quota" SupportUri = "http:/www.arlo.com/support?utm_source=app_desktop&cc=en" TakeSnapshotUri = "/users/devices/takeSnapshot" TempUnitUri = "/users/devices/%uniqueId/tempUnit" TermsLinkUri = "/termsAndConditionsLink?t=%s" TermsUri = "/termsAndConditions/?t=%s" TimeZonesUri = "/static/timezones" UnsubscribeUri = "/client/unsubscribe" UpdateNameUri = "/user" UpdatePasswordUri = "/users/changePassword" UpdateUserIdUri = "/users/changeEmail" UserFrameSnapshotUri = "/users/devices/userSnapshot" UsersEmailsUri = "/users/emails" ValidateCouponUri = "/users/payment/coupondetails" ValidateResetUri = "/validatePasswordReset/%?" WakeupUri = "/users/devices/wakeup/%deviceId?t=%s" )
Variables ¶
Functions ¶
func FromUnixMicro ¶
func FromUnixMilli ¶
Types ¶
type Account ¶
type Account struct { UserId string `json:"userId"` Email string `json:"email"` Token string `json:"token"` PaymentId string `json:"paymentId"` Authenticated uint32 `json:"authenticated"` AccountStatus string `json:"accountStatus"` SerialNumber string `json:"serialNumber"` CountryCode string `json:"countryCode"` TocUpdate bool `json:"tocUpdate"` PolicyUpdate bool `json:"policyUpdate"` ValidEmail bool `json:"validEmail"` Arlo bool `json:"arlo"` DateCreated int64 `json:"dateCreated"` }
Account is the account data.
type Arlo ¶
type Arlo struct { Account Account Basestations Basestations Cameras Cameras // contains filtered or unexported fields }
func (*Arlo) BatchDeleteRecordings ¶
Delete a batch of video recordings from arlo.
The GetLibrary() call response json can be passed directly to this method if you'd like to delete the same list of videos you queried for.
NOTE: {"data": [{"createdDate": r.CreatedDate, "utcCreatedDate": r.UtcCreatedDate, "deviceId": r.DeviceId}]} is all that's really required.
func (*Arlo) CheckSession ¶
func (*Arlo) DeleteRecording ¶
Delete a single video recording from arlo.
All of the date info and device id you need to pass into this method are given in the results of the GetLibrary() call.
NOTE: {"data": [{"createdDate": r.CreatedDate, "utcCreatedDate": r.UtcCreatedDate, "deviceId": r.DeviceId}]} is all that's really required.
func (*Arlo) GetActiveAutomationDefinitions ¶
GetActiveAutomationDefinitions gets the mode metadata (this API replaces the older GetModes(), which still works).
func (*Arlo) GetDevices ¶
GetDevices returns an array of all devices. When you call Login, this method is called and all devices are cached in the arlo object.
func (*Arlo) GetLibrary ¶
func (*Arlo) GetLibraryMetaData ¶
func (a *Arlo) GetLibraryMetaData(fromDate, toDate time.Time) (libraryMetaData *LibraryMetaData, err error)
func (*Arlo) GetProfile ¶
func (a *Arlo) GetProfile() (profile *UserProfile, err error)
GetProfile returns the user profile for the currently logged in user.
func (*Arlo) SendAnalyticFeedback ¶
SendAnalyticFeedback is only really used by the GUI. It is a response to a prompt asking you whether an object which was tagged by it's AI in your recording was tagged correctly.
func (*Arlo) UpdateDisplayOrder ¶
func (a *Arlo) UpdateDisplayOrder(d DeviceOrder) error
UpdateDisplayOrder sets the display order according to the order defined in the DeviceOrder given.
func (*Arlo) UpdateFriends ¶
func (*Arlo) UpdatePassword ¶
func (*Arlo) UpdateProfile ¶
UpdateProfile takes a first and last name, and updates the user profile with that information.
type AudioDetectionProperties ¶
type AudioDetectionProperties struct {
BaseDetectionProperties `json:"audioDetection"`
}
AudioDetectionProperties is the Properties struct for the EventStreamPayload type.
type BaseDetectionProperties ¶
type BaseEventActionProperties ¶
type BaseEventActionProperties struct { ActionType string `json:"actionType"` StopType string `json:"stopType"` Timeout int `json:"timeout"` EmailNotification `json:"emailNotification"` }
type BaseLoopbackModeProperties ¶
type BaseLoopbackModeProperties struct {
LoopbackMode string `json:"loopbackMode"`
}
type BaseShuffleProperties ¶
type BaseShuffleProperties struct {
ShuffleActive bool `json:"shuffleActive"`
}
type BaseStationMetadata ¶
type BaseStationMetadata struct { InterfaceVersion int `json:"interfaceVersion"` ApiVersion int `json:"apiVersion"` State string `json:"state"` SwVersion string `json:"swVersion"` HwVersion string `json:"hwVersion"` ModelId string `json:"modelId"` Capabilities []string `json:"capabilities"` McsEnabled bool `json:"mcsEnabled"` AutoUpdateEnabled bool `json:"autoUpdateEnabled"` TimeZone string `json:"timeZone"` OlsonTimeZone string `json:"olsonTimeZone"` UploadBandwidthSaturated bool `json:"uploadBandwidthSaturated"` AntiFlicker map[string]int `json:"antiFlicker"` LowBatteryAlert map[string]bool `json:"lowBatteryAlert"` LowSignalAlert map[string]bool `json:"lowSignalAlert"` Claimed bool `json:"claimed"` TimeSyncState string `json:"timeSyncState"` Connectivity Connectivity `json:"connectivity"` }
type Basestation ¶
type Basestation struct { Device // contains filtered or unexported fields }
A Basestation is a Device that's not type "camera" (basestation, arloq, arloqs, etc.). This type is here just for semantics. Some methods explicitly require a device of a certain type.
func (*Basestation) Arm ¶
func (b *Basestation) Arm() (response *EventStreamResponse, err error)
func (*Basestation) DeleteMode ¶
func (b *Basestation) DeleteMode(mode string) (response *EventStreamResponse, err error)
func (*Basestation) Disarm ¶
func (b *Basestation) Disarm() (response *EventStreamResponse, err error)
func (*Basestation) Disconnect ¶
func (b *Basestation) Disconnect() error
func (*Basestation) GetAssociatedCamerasState ¶
func (b *Basestation) GetAssociatedCamerasState() (response *EventStreamResponse, err error)
func (*Basestation) GetCalendarMode ¶
func (b *Basestation) GetCalendarMode() (response *EventStreamResponse, err error)
func (*Basestation) GetModes ¶
func (b *Basestation) GetModes() (response *EventStreamResponse, err error)
func (*Basestation) GetRules ¶
func (b *Basestation) GetRules() (response *EventStreamResponse, err error)
func (*Basestation) GetState ¶
func (b *Basestation) GetState() (response *EventStreamResponse, err error)
func (*Basestation) IsConnected ¶
func (b *Basestation) IsConnected() error
func (*Basestation) NotifyEventStream ¶
func (b *Basestation) NotifyEventStream(payload EventStreamPayload, msg string) error
func (*Basestation) Ping ¶
func (b *Basestation) Ping() error
Ping makes a call to the subscriptions endpoint. The Arlo event stream requires this message to be sent every 30s.
func (*Basestation) SetCalendarMode ¶
func (b *Basestation) SetCalendarMode(active bool) (response *EventStreamResponse, err error)
SetCalendarMode toggles calendar mode. NOTE: The Arlo API seems to disable calendar mode when switching to other modes, if it's enabled. You should probably do the same, although, the UI reflects the switch from calendar mode to say armed mode without explicitly setting calendar mode to inactive.
func (*Basestation) SetCustomMode ¶
func (b *Basestation) SetCustomMode(mode string) (response *EventStreamResponse, err error)
func (*Basestation) SirenOff ¶
func (b *Basestation) SirenOff() (response *EventStreamResponse, err error)
func (*Basestation) SirenOn ¶
func (b *Basestation) SirenOn() (response *EventStreamResponse, err error)
func (*Basestation) Subscribe ¶
func (b *Basestation) Subscribe() error
func (*Basestation) Unsubscribe ¶
func (b *Basestation) Unsubscribe() error
type BasestationModeProperties ¶
type BasestationModeProperties struct {
Active string `json:"active"`
}
type BasestationScheduleProperties ¶
type BasestationScheduleProperties struct {
Active bool `json:"active"`
}
type Basestations ¶
type Basestations []Basestation
Basestations is a slice of Basestation objects.
func (*Basestations) Find ¶
func (bs *Basestations) Find(deviceId string) *Basestation
Find returns a basestation with the device id passed in.
type Camera ¶
type Camera Device
A Camera is a Device of type "camera". This type is here just for semantics. Some methods explicitly require a device of a certain type.
func (*Camera) Continuous ¶
func (c *Camera) Continuous() (response *EventStreamResponse, err error)
func (*Camera) DisableAudioAlerts ¶
func (c *Camera) DisableAudioAlerts(sensitivity int) (response *EventStreamResponse, err error)
func (*Camera) DisableMotionAlerts ¶
func (c *Camera) DisableMotionAlerts(sensitivity int, zones []string) (response *EventStreamResponse, err error)
func (*Camera) DisableNightLightTimer ¶
func (c *Camera) DisableNightLightTimer(sleepTimeRel int) (response *EventStreamResponse, err error)
func (*Camera) DisableSleepTimer ¶
func (c *Camera) DisableSleepTimer(sleepTimeRel int) (response *EventStreamResponse, err error)
func (*Camera) EnableAudioAlerts ¶
func (c *Camera) EnableAudioAlerts(sensitivity int) (response *EventStreamResponse, err error)
func (*Camera) EnableMotionAlerts ¶
func (c *Camera) EnableMotionAlerts(sensitivity int, zones []string) (response *EventStreamResponse, err error)
func (*Camera) EnableNightLightTimer ¶
func (c *Camera) EnableNightLightTimer(sleepTime int64, sleepTimeRel int) (response *EventStreamResponse, err error)
func (*Camera) EnableSleepTimer ¶
func (c *Camera) EnableSleepTimer(sleepTime int64, sleepTimeRel int) (response *EventStreamResponse, err error)
func (*Camera) GetAudioPlayback ¶
func (c *Camera) GetAudioPlayback() (response *EventStreamResponse, err error)
func (*Camera) GetCvrPlaylist ¶
func (c *Camera) GetCvrPlaylist(fromDate, toDate time.Time) (playlist *CvrPlaylist, err error)
This function downloads a Cvr Playlist file for the period fromDate to toDate.
func (*Camera) Mute ¶
func (c *Camera) Mute() (response *EventStreamResponse, err error)
Mute mutes the audio playback.
func (*Camera) NightLight ¶
func (c *Camera) NightLight(on bool) (response *EventStreamResponse, err error)
The follow methods are all related to the nightlight features of Arlo Baby.
NOTE: The current state is in: cameras[0]["properties"][0]["nightLight"] returned from the basestation.GetAssociatedCamerasState() method.
func (*Camera) Off ¶
func (c *Camera) Off() (response *EventStreamResponse, err error)
On turns a camera off; meaning it won't detect and record events.
func (*Camera) On ¶
func (c *Camera) On() (response *EventStreamResponse, err error)
On turns a camera on; meaning it will detect and record events.
func (*Camera) Play ¶
Play plays an audio track, specified by the track ID, from a given position starting from 0 seconds.
func (*Camera) PushToTalk ¶
PushToTalk starts a push-to-talk session. FIXME: This feature requires more API calls to make it actually work, and I haven't figure out how to fully implement it. It appears that the audio stream is Real-Time Transport Protocol (RTP), which requires a player (ffmpeg?) to consume the stream.
func (*Camera) SetAlertNotificationMethods ¶
func (c *Camera) SetAlertNotificationMethods(action string, email, push bool) (response *EventStreamResponse, err error)
action: disabled OR recordSnapshot OR recordVideo
func (*Camera) SetBrightness ¶
func (c *Camera) SetBrightness(brightness int) (response *EventStreamResponse, err error)
SetBrightness sets the camera brightness. NOTE: Brightness is between -2 and 2 in increments of 1 (-2, -1, 0, 1, 2). Setting it to an invalid value has no effect.
func (*Camera) SetLoopBackMode ¶
func (c *Camera) SetLoopBackMode(loopbackMode string) (response *EventStreamResponse, err error)
func (*Camera) SetNightLightBrightness ¶
func (c *Camera) SetNightLightBrightness(level int) (response *EventStreamResponse, err error)
func (*Camera) SetNightLightColor ¶
func (c *Camera) SetNightLightColor(red, blue, green int) (response *EventStreamResponse, err error)
SetNightLightColor sets the night light color to the RGB value specified by the three parameters, which have valid values from 0-255.
func (*Camera) SetNightLightMode ¶
func (c *Camera) SetNightLightMode(mode string) (response *EventStreamResponse, err error)
SetNightLightMode set the night light mode. Valid values are: "rainbow" or "rgb".
func (*Camera) SetVolume ¶
func (c *Camera) SetVolume(volume int) (response *EventStreamResponse, err error)
SetVolume sets the volume of the audio playback to a level from 0-100.
func (*Camera) Shuffle ¶
func (c *Camera) Shuffle(on bool) (response *EventStreamResponse, err error)
Shuffle toggles the audio play back mode to shuffle or not.
func (*Camera) SingleTrack ¶
func (c *Camera) SingleTrack() (response *EventStreamResponse, err error)
func (*Camera) StartRecording ¶
StartRecording causes the camera to start recording and returns a url that you must start reading from using ffmpeg or something similar.
func (*Camera) StartStream ¶
If you call StartStream(), you have to start reading data from the stream, or streaming will be cancelled and taking a snapshot may fail (since it requires the stream to be active).
func (*Camera) StopRecording ¶
StopRecording causes the camera to stop recording.
func (*Camera) TakeSnapshot ¶
func (c *Camera) TakeSnapshot() (response *EventStreamResponse, err error)
NOTE: You should not use this function is you just want a snapshot and aren't intending to stream. Use TriggerFullFrameSnapshot() instead.
NOTE: Use DownloadSnapshot() to download the actual image file. TODO: Need to refactor the even stream code to allow handling of events whose transIds don't correlate. :/
func (*Camera) TriggerFullFrameSnapshot ¶
func (c *Camera) TriggerFullFrameSnapshot() (response *EventStreamResponse, err error)
TriggerFullFrameSnapshot causes the camera to record a full-frame snapshot. The presignedFullFrameSnapshotUrl url is returned. Use DownloadSnapshot() to download the actual image file. TODO: Need to refactor the even stream code to allow handling of events whose transIds don't correlate. :/
func (*Camera) UnMute ¶
func (c *Camera) UnMute() (response *EventStreamResponse, err error)
UnMute un-mutes the audio playback.
type CameraProperties ¶
type Connectivity ¶
type Connectivity struct { ActiveNetwork string `json:"activeNetwork,omitempty"` APN string `json:"apn,omitempty"` CarrierFw string `json:"carrierFw,omitempty"` Connected bool `json:"connected,omitempty"` FWVersion string `json:"fwVersion,omitempty"` ICCID string `json:"iccid,omitempty"` IMEI string `json:"imei,omitempty"` MEPStatus string `json:"mepStatus,omitempty"` MSISDN string `json:"msisdn,omitempty"` NetworkMode string `json:"networkMode,omitempty"` NetworkName string `json:"networkName,omitempty"` RFBand int `json:"rfBand,omitempty"` Roaming bool `json:"roaming"` RoamingAllowed bool `json:"roamingAllowed"` SignalStrength string `json:"signalStrength,omitempty"` Type string `json:"type,omitempty"` WWANIPAddr string `json:"wwanIpAddr,omitempty"` }
Connectivity is part of the Device data.
type CvrPlaylist ¶
type CvrPlaylistResponse ¶
type CvrPlaylistResponse struct { Data CvrPlaylist Status }
type Data ¶
type Data struct { Message string `json:"message,omitempty"` Reason string `json:"reason,omitempty"` Error string `json:"error,omitempty"` }
URL is part of the Status message fragment returned by most calls to the Arlo API. URL is only populated when Success is false.
type Device ¶
type Device struct { AnalyticsEnabled bool `json:"analyticsEnabled"` ArloMobilePlan bool `json:"arloMobilePlan"` ArloMobilePlanId string `json:"arloMobilePlanId"` ArloMobilePlanName string `json:"arloMobilePlanName"` ArloMobilePlanThreshold int `json:"arloMobilePlanThreshold"` Connectivity Connectivity `json:"connectivity"` CriticalBatteryState bool `json:"criticalBatteryState"` DateCreated int64 `json:"dateCreated"` DeviceId string `json:"deviceId"` DeviceName string `json:"deviceName"` DeviceType string `json:"deviceType"` DisplayOrder uint8 `json:"displayOrder"` FirmwareVersion string `json:"firmwareVersion"` InterfaceVersion string `json:"interfaceVersion"` InterfaceSchemaVer string `json:"interfaceSchemaVer"` LastImageUploaded string `json:"lastImageUploaded"` LastModified int64 `json:"lastModified"` MigrateActivityZone bool `json:"migrateActivityZone"` MobileCarrier string `json:"mobileCarrier"` MobileTrialUsed bool `json:"mobileTrialUsed"` PermissionsFilePath string `json:"permissionsFilePath"` PermissionsSchemaVer string `json:"permissionsSchemaVer"` PermissionsVerison string `json:"permissionsVerison"` // WTF? Netgear developers think this is OK... *sigh* PermissionsVersion string `json:"permissionsVersion"` PresignedFullFrameSnapshotUrl string `json:"presignedFullFrameSnapshotUrl"` PresignedLastImageUrl string `json:"presignedLastImageUrl"` PresignedSnapshotUrl string `json:"presignedSnapshotUrl"` MediaObjectCount uint8 `json:"mediaObjectCount"` ModelId string `json:"modelId"` Owner Owner `json:"owner"` ParentId string `json:"parentId"` Properties Properties `json:"properties"` UniqueId string `json:"uniqueId"` UserId string `json:"userId"` UserRole string `json:"userRole"` State string `json:"state"` XCloudId string `json:"xCloudId"` // contains filtered or unexported fields }
A Device is the device data, this can be a camera, basestation, arloq, etc.
func (Device) IsBasestation ¶
func (*Device) UpdateDeviceName ¶
UpdateDeviceName sets the name of the given device to the name argument.
type DeviceOrder ¶
A DeviceOrder holds a map of device ids and a numeric index. The numeric index is the device order. Device order is mainly used by the UI to determine which order to show the devices.
{ "devices":{ "XXXXXXXXXXXXX":1, "XXXXXXXXXXXXX":2, "XXXXXXXXXXXXX":3 }
type DeviceResponse ¶
DeviceResponse is an intermediate struct used when parsing data from the GetDevices() call.
type Devices ¶
type Devices []Device
Devices is a slice of Device objects.
func (Devices) FindCameras ¶
func (Devices) GetBasestations ¶
func (ds Devices) GetBasestations() *Basestations
GetBasestations returns a Basestations object containing all devices that are NOT type "camera". I did this because some device types, like arloq, don't have a basestation. So, when interacting with them you must treat them like a basestation and a camera. Cameras also includes devices of this type, so you can get the same data there or cast.
func (Devices) GetCameras ¶
GetCameras returns a Cameras object containing all devices that are of type "camera". I did this because some device types, like arloq, don't have a basestation. So, when interacting with them you must treat them like a basestation and a camera. Basestations also includes devices of this type, so you can get the same data there or cast.
type EmailNotification ¶
type EventActionProperties ¶
type EventActionProperties struct {
BaseEventActionProperties `json:"eventAction"`
}
type EventStreamPayload ¶
type EventStreamPayload struct { Action string `json:"action,omitempty"` Resource string `json:"resource,omitempty"` PublishResponse bool `json:"publishResponse"` Properties interface{} `json:"properties,omitempty"` TransId string `json:"transId"` From string `json:"from"` To string `json:"to"` }
EventStreamPayload is the message that will be sent to the arlo servers via the /notify API.
type EventStreamResponse ¶
type EventStreamResponse struct { EventStreamPayload Status string `json:"status,omitempty"` }
type Friend ¶
type Friend struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Devices DeviceOrder `json:"devices"` LastModified int64 `json:"lastModified"` AdminUser bool `json:"adminUser"` Email string `json:"email"` Id string `json:"id"` }
Friend is the account data for non-primary account holders designated as friends.
type LibraryMetaData ¶
type LibraryMetaData struct { DateTo string `json:"dateTo"` DateFrom string `json:"dateFrom"` Meta map[string]map[string]Favorite `json:"meta"` }
LibraryMetaData is the library meta data.
type LibraryMetaDataResponse ¶
type LibraryMetaDataResponse struct { Data LibraryMetaData Status }
LibraryMetaDataResponse is an intermediate struct used when parsing data from the GetLibraryMetaData() call.
type LibraryResponse ¶
type LoginResponse ¶
LoginResponse is an intermediate struct used when parsing data from the Login() call.
type LoopbackModeProperties ¶
type LoopbackModeProperties struct {
Config BaseLoopbackModeProperties `json:"config"`
}
type MotionDetectionProperties ¶
type MotionDetectionProperties struct {
BaseDetectionProperties `json:"motionDetection"`
}
MotionDetectionProperties is the Properties struct for the EventStreamPayload type.
type NightLightProperties ¶
type NightLightProperties struct {
NightLight BaseNightLightProperties `json:"nightLight"`
}
type NightLightRGBProperties ¶
type Owner ¶
type Owner struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` OwnerId string `json:"ownerId"` }
Owner is the owner of a Device data.
type PlayTrackProperties ¶
type PlaylistItem ¶
type Properties ¶
type Properties struct { ModelId string `json:"modelId"` OlsonTimeZone string `json:"olsonTimeZone"` HwVersion string `json:"hwVersion"` }
Properties is the Device properties data.
type Recording ¶
type Recording struct { MediaDurationSecond int `json:"mediaDurationSecond"` ContentType string `json:"contentType"` Name string `json:"name"` PresignedContentUrl string `json:"presignedContentUrl"` LastModified int64 `json:"lastModified"` LocalCreatedDate int64 `json:"localCreatedDate"` PresignedThumbnailUrl string `json:"presignedThumbnailUrl"` Reason string `json:"reason"` DeviceId string `json:"deviceId"` CreatedBy string `json:"createdBy"` CreatedDate string `json:"createdDate"` TimeZone string `json:"timeZone"` OwnerId string `json:"ownerId"` UtcCreatedDate int64 `json:"utcCreatedDate"` CurrentState string `json:"currentState"` MediaDuration string `json:"mediaDuration"` UniqueId string `json:"uniqueId"` }
presignedContentUrl is a link to the actual video in Amazon AWS. presignedThumbnailUrl is a link to the thumbnail .jpg of the actual video in Amazon AWS.
type RecordingResponse ¶
type SessionResponse ¶
type ShuffleProperties ¶
type ShuffleProperties struct {
Config BaseShuffleProperties `json:"config"`
}
type SirenProperties ¶
type SleepTimerProperties ¶
type SleepTimerProperties struct {
Config BaseSleepTimerProperties `json:"config"`
}
type SpeakerProperties ¶
type SpeakerProperties struct {
Speaker VolumeProperties `json:"speaker"`
}
type StreamResponse ¶
type UserProfile ¶
type UserProfileResponse ¶
type UserProfileResponse struct { Data UserProfile Status }