Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionProfile ¶
ActionProfile
type Blind ¶
type Blind struct { IP string `json:"ip"` Mac string `json:"mac"` Group int `json:"group"` Protocol string `json:"protocol"` SwitchMac string `json:"switchMac"` IsConfigured bool `json:"isConfigured"` SoftwareVersion float32 `json:"softwareVersion"` HardwareVersion float32 `json:"hardwareVersion"` IsBleEnabled bool `json:"isBleEnabled"` Error int `json:"error"` FriendlyName string `json:"friendlyName"` DumpFrequency int `json:"dumpFrequency"` WindowStatus1 bool `json:"windowStatus1"` WindowStatus2 bool `json:"windowStatus2"` VoltageInput int `json:"voltageInput"` DaisyChainEnabled bool `json:"daisyChainEnabled"` DaisyChainPos int `json:"daisyChainPos"` LinePower int `json:"linePower"` Blind1 int `json:"blind1"` Blind2 int `json:"blind2"` Slat1 int `json:"slat1"` Slat2 int `json:"slat2"` BleMode *string `json:"bleMode,omitempty"` //bleMode could be: remote/iBeacon/ptm PtmMac string `json:"mac_ptm"` //In ptm mode it corresponds to the enOcean switch IBeaconUUID *string `json:"iBeaconUUID,omitempty"` IBeaconMajor *int `json:"iBeaconMajor,omitempty"` IBeaconMinor *int `json:"iBeaconMinor,omitempty"` IBeaconTxPower *int `json:"iBeaconTxPower,omitempty"` Label *string `json:"label,omitempty"` }
Blind driver representation
type BlindConf ¶
type BlindConf struct { Mac string `json:"mac"` Group *int `json:"group,omitempty"` IsConfigured *bool `json:"isConfigured,omitempty"` IsBleEnabled *bool `json:"isBleEnabled,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` DumpFrequency *int `json:"dumpFrequency,omitempty"` Blind1 *int `json:"blind1,omitempty"` Blind2 *int `json:"blind2,omitempty"` Slat1 *int `json:"slat1,omitempty"` Slat2 *int `json:"slat2,omitempty"` Label *string `json:"label,omitempty"` BleMode *string `json:"bleMode,omitempty"` //bleMode could be: remote/iBeacon/ptm PtmMac *string `json:"mac_ptm,omitempty"` //In ptm mode it corresponds to the enOcean switch IBeaconUUID *string `json:"iBeaconUUID,omitempty"` IBeaconMajor *int `json:"iBeaconMajor,omitempty"` IBeaconMinor *int `json:"iBeaconMinor,omitempty"` IBeaconTxPower *int `json:"iBeaconTxPower,omitempty"` }
BlindConf customizable configuration by the server
func ToBlindConf ¶
ToBlindConf convert map interface to BlindConf object
type BlindProfile ¶
type BlindProfile struct { UP []ActionProfile `json:"up"` Down []ActionProfile `json:"down"` Stop []ActionProfile `json:"stop"` WindowOpen bool `json:"windowOpen,omitempty"` SlatDuration int `json:"slatDuration,omitempty"` }
BlindProfile constructor recommendation
type BlindSetup ¶
type BlindSetup struct { Mac string `json:"mac"` Group *int `json:"group,omitempty"` IsBleEnabled *bool `json:"isBleEnabled,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` SwitchMac string `json:"switchMac"` IsConfigured *bool `json:"isConfigured,omitempty"` DumpFrequency int `json:"dumpFrequency"` Blind1 *int `json:"blind1,omitempty"` Blind2 *int `json:"blind2,omitempty"` Slat1 *int `json:"slat1,omitempty"` Slat2 *int `json:"slat2,omitempty"` Profile BlindProfile `json:"profile,omitempty"` Label *string `json:"label,omitempty"` BleMode *string `json:"bleMode,omitempty"` //bleMode could be: remote/iBeacon/ptm PtmMac *string `json:"mac_ptm,omitempty"` //In ptm mode it corresponds to the enOcean switch IBeaconUUID *string `json:"iBeaconUUID,omitempty"` IBeaconMajor *int `json:"iBeaconMajor,omitempty"` IBeaconMinor *int `json:"iBeaconMinor,omitempty"` IBeaconTxPower *int `json:"iBeaconTxPower,omitempty"` }
BlindSetup initial setup send by the server when the driver is authorized
func FillDefaultValue ¶
func FillDefaultValue(cfg BlindSetup) BlindSetup
FillDefaultValue fill default parameter for setup
func ToBlindSetup ¶
func ToBlindSetup(val interface{}) (*BlindSetup, error)
ToBlindSetup convert interface to blindsetup object
func UpdateConfig ¶
func UpdateConfig(new BlindConf, old BlindSetup) BlindSetup
func UpdateSetup ¶
func UpdateSetup(new BlindSetup, old BlindSetup) BlindSetup
UpdateSetup update blind struct
func (BlindSetup) ToJSON ¶
func (blind BlindSetup) ToJSON() (string, error)
ToJSON dump blindSetup struct
Click to show internal directories.
Click to hide internal directories.