Package: wibeee
██╗    ██╗██╗██████╗ ███████╗███████╗███████╗
██║    ██║██║██╔══██╗██╔════╝██╔════╝██╔════╝
██║ █╗ ██║██║██████╔╝█████╗  █████╗  █████╗  
██║███╗██║██║██╔══██╗██╔══╝  ██╔══╝  ██╔══╝  
╚███╔███╔╝██║██████╔╝███████╗███████╗███████╗
 ╚══╝╚══╝ ╚═╝╚═════╝ ╚══════╝╚══════╝╚══════╝This is a python API client for WiBeee products. WiBeee client will get live info like Power (W) usage in an easy-to-use python class.
Currently, WiBeee is in the early stages and can be improved. If you have any feature requests or optimisations,
feel free to set up a pull request or drop me a message.This project assumes you already have your WiBeee hardware setup.
This project was inspired bypywibeee.
To see code examples checkoutexamples.pyor scroll down tousagesProjects that use yodasNo open source projects yet! Send me your projects to be featured here.InstallFrom PIPThe easiest method of installing is through pip$pipinstallwibeeeor to upgrade$pipinstall--upgradewibeeeFrom Git RepositoryFor this I assume you already have a virtual python environment or that python3 is aliased as python.$python-mpipinstall--upgradebuild
$python-mbuild
$pipinstalldist/*.tar.gz# for the latest version of yodas.From Releases (latest)$wgethttps://github.com/veryheavypickle/wibeee/releases/download/v1.2.0/wibeee-1.2.0.tar.gz
$pipinstallwibeee-1.2.0.tar.gzUsagesConnectingIf you know the local IP address of your WiBeee device, then you can connect as such.>>>fromwibeeeimportWiBeee>>>wb=WiBeee("192.168.1.150")If you don't know the IP address, don't worry as there is a discovery function
and it will connect to the first WiBeee device it finds. This discovery will take a while.>>>fromwibeeeimportWiBeee>>>wb=WiBeee()WiBeee>>>fromwibeeeimportWiBeee>>>wb=WiBeee(ip=None,port=80,timeout=10.0,verbose=False)ip:strport:inttimeout:floatverbose:boolreturns:WiBeeeipThis is the IP address of the WiBeee device.ipis not a required variable but providingipskips discovery which speeds up the process.
For exampleWiBeee("192.168.1.150")orWiBeee(ip="192.168.1.150").portBy default it is80, This is the open port of the WiBeee device webserver.timeoutBy default it is10.0, This is how many seconds the program waits while attempting to connect to the WiBeee device.
If you wish to change this after creating theWiBeeeobject, simply runWiBeee.setTimeout(newValue).verboseBy default it isFalse, in my case the WiBeee webserver is highly unreliable. If you want to watchwibeeesolve errors in real time,
either setverbose=Truewhen creating theWiBeeeobject orWiBeee.setVerbose(True).Power>>>wb.getPower()100.0This function returns the current power usage in Watts (W). The phase is by default1but can be up to4.phase:intreturns:floatCurrent>>>wb.getCurrent()1.0This function returns the current amp usage in Amps (A). The phase is by default1but can be up to4.phase:intreturns:floatVoltage>>>wb.getVoltage()230.0This function returns the voltage in Volts (V). The phase is by default1but can be up to4.phase:intreturns:floatFrequency>>>wb.getFrequency()50.0This function returns the frequency (Hz) of the AC . The phase is by default1but can be up to4.phase:intreturns:floatScale>>>wb.getScale()60This function returns the scale. Currently, I don't know whatscaleis or what its units are, but the functionality exists.returns:intCoil Status>>>wb.getCoilStatus()'-'This function returns the coil status. Currently, I don't know what the possible statuses are, I will update this README once I do know.returns:strGround>>>wb.getGround()'-'This function returns the ground. I am assuming that ground is in Volts (V)returns:floatModel>>>wb.getGround()'-'This function returns the ground. I am assuming that ground is in Volts (V)returns:floatIP>>>wb.getIP()'192.168.1.150'This function returns the ip address of the WiBeee device.returns:strModel>>>wb.getModel()'WBB'This function returns the model the WiBeee device.returns:strFirmware Version>>>wb.getFirmwareVersion()'4.4.164'This function returns the firmware version of the WiBeee device.returns:strTime>>>wb.getTime()2022-10-3016:57:22This function returns the current time in the device.
The return type isdatetime.datetime, you can read more about itherereturns:datetime.datetimeChangelog1.2.0Added more functionsAddedWiBeee.getScale()AddedWiBeee.getCoilStatus()AddedWiBeee.getGround()AddedWiBeee.getModel()AddedWiBeee.getFirmwareVersion()AddedWiBeee.getTime()MovedWiBeee.getInfo()toWiBeee.__getInfo()MovedWiBeee.power()toWiBeee.getPower()MovedWiBeee.current()toWiBeee.getCurrent()MovedWiBeee.voltage()toWiBeee.getVoltage()MovedWiBeee.frequency()toWiBeee.getFrequency()1.1.0Added documentation and changed function namesMovedWiBeee.getHost()toWiBeee.getIP()MovedWiBeee.hosttoWiBeee.ipRemovedprettyoption inWiBeee.power()MovedWiBeee.callURL()toWiBeee.__callURL()Movederrors.BadHostNametoerrors.BadIPMovedWiBeee.autoDiscover()toWiBeee.__findDeviceIP()Added variableattemptstoWiBeee.__findDeviceIP()AddedWiBeee.setTimeout()AddedWiBeee.setVerbose()