Skip to main content

Smartfox SDK for Python

NOTE: This is not an offical Smartfox SDK. Only reverse engineered the browser requests.

This Python Package enables you to develop applications with the Smartfox.

Install:

pip install smartfox

Example get a value:

from smartfox import Smartfox

# Initialize a new smartfox connection
smartfox = Smartfox("my-smartfox.local")

# update the values
smartfox.getValues()

# print
print(smartfox.consumption)

# print the value
print(smartfox.consumption.value)

Example set a relay or analog output:

from smartfox import Smartfox

# Initialize a new smartfox connection
smartfox = Smartfox("my-smartfox.local")

smartfox.relay1.turnOff() # turn off relay 1
smartfox.relay1.turnOn() # turn on relay 1


smartfox.analog.set(10) # set analog output to 10%
smartfox.analog.setAuto() # set analog output to auto
smartfox.analog.off()  # set analog output to off

Value Objects

Type Names Methods Args Class Variables
PowerValue consumption,
pv,
carCharger,
heatPump,
power,
effectivePower,
heatPumpPower,
power,
effectivePower,
heatPumpPower,
heatPumpThermPower,
batteryPower
- - value, unit
EnergyValue energy,
returnEnergy,
effectiveEnergy,
apparentEnergy,
dayEnergy,
dayReturnEnergy,
carChargeCurrentChargeEnergy,
carChargeEnergy,
heatPumpEnergy,
heatPumpThermEnergy
- - value, unit
VoltageValue - - value, unit
PFValue - - value, unit
CurrentValue - - value, unit
TimeValue - - value, unit
PercentValue soc - - value, unit
TempValue bufferHot,
bufferCold,
warmWater
- - value, unit

Example

from smartfox import Smartfox

# Initialize a new smartfox connection
smartfox = Smartfox("my-smartfox.local")

# update the values
smartfox.getValues()

# get power
print(smartfox.power) # returns string
print(smartfox.power.value) # returns power as float
print(smartfox.power.unit) # returns the unit of power

Result:

>> power value: 972.0 W
>> 972.0
>> W

Objects

Type names Methods Args Class Variables
Phase phase1,
phase2,
phase3
- - voltage: VoltageValue,
current: CurrentValue,
power: PowerValue,
powerFactor: PFValue
Relay relai1,
relai2,
relai3,
relai4
turnOn(),
turnOff()
- id,
remainingTime: TimeValue,
overallTime: TimeValue,
smartfox: Smartfox
AnalogOut analog set(value),
setAuto(),
off()
- percentage: PercentValue,
power: Powervalue

Example

from smartfox import Smartfox

# Initialize a new smartfox connection
smartfox = Smartfox("my-smartfox.local")

print(smartfox.phase1.power) # returns phase1 power
print(smartfox.relai4.turnOn()) # turns relai4 on

Metadata

Release files for smartfox 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smartfox 1.0.0
File Size Uploaded
smartfox-1.0.0.tar.gz 27.7 kB Details

Release files / smartfox-1.0.0.tar.gz

Download URL smartfox-1.0.0.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9e969baf383bc2d0b0fb542be5cd1cf69312b7ec13441097825d57e12067bd61
BLAKE2b-256 checksum
How to use checksums
0aebbd6bab0dc86d0219937990d64b1c4e05227ab512d8e693483bb7ba62b187
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page