This is a client on python for Fumis based Pallet Stoves which are using WiRCU WIFI module. The project is based on https://github.com/frenck/python-fumis
In fumisclient.py
there are two classes PalletStoveStatus
and Client
. Each of them are doing the following
This class contains extracted data fields from the server response:
id
- MAC address of the WIFI module of the stove.cmd
- Last command codecmd_str
- Last code translated to stringstatus
- Status number of the stove. For more infromation, please refer toSTATUS_MAPPING
infumisdatastructures.py
status_str
- Status translated to stringmode
- Mode of the stoveaction
- Current action of the stoveerror_code
: self.error_code,temp
- Temperature of the room sensortemp_target
- Target temperature of the roomwater
: Temperature of the water in the stovewater_target
: Target temperature of the water in the stovefumes_temp
: Exhaust temperature
This is the client for sending commands and reading the status of the stove. The client initiates the connection to SERVER_NAME
in this case is "api.fumis.si"
. The client requires username and password. Those are the MAC address of the WiRCU WIFI module and a PIN code provided by the distributor. You can set the username and password by changing the values of the CLIENT_USERNAME
and CLIENT_PASSWORD
variables in fumisclient.py
file.
Because of the HTTP nature of the connection, everytime a function is called, it creates a HTTP Client to handle the connection.
Here are the methods implemented in the client:
cl = Client(CLIENT_USERNAME, CLIENT_PASSWORD)
- creates an instance of the Clientupdate_last_status(jdata)
- used mainly internaly to fill in thelast_status
instance of the PalletStoveStatuscl.read_data()
- Reads current status of the stove. Returns instance of the PalletStoveStatuscl.command_turn_on_off(cmd)
- Sends command to turn on or off the stove. Avoid using it. Useturn_on
andturn_off
instead.cl.command_set_temp(temp_id, value)
- Sets targetvalue
for temperature. Thetemp_id
is choosing betweenTEMP_ROOM_ID
orTEMP_WATER_ID
cl.turn_on()
- Initiating turning on sequencecl.turn_off()
- Initiating turning off sequencecl.set_room_temp(value)
- Sets targetvalue
for room temperature. Doesn't automaticaly turn on the stove.