Connection Module

class JciHitachi.connection.JciHitachiConnection(email, password, session_token=None, proxy=None, print_response=False)[source]

Bases: object

Connecting to Jci-Hitachi API to get data or send commands.

Parameters:
  • email (str) – User email.

  • password (str) – User password.

  • session_token (str, optional) – If session_token is given, it is used by request, otherwise perform a login procedure to obtain a new token, by default None.

  • proxy (str, optional) – Proxy setting. Format:”schema://IP:port”, e.g., http://127.0.0.1:8080, by default None.

  • print_response (bool, optional) – If set, all responses of httpx will be printed, by default False.

class JciHitachi.connection.RegisterMobileDevice(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Unused)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

class JciHitachi.connection.UpdateUserCredential(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Tested)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

get_data(new_password)[source]

Get data from the endpoint.

Parameters:

new_password (str) – New password.

Returns:

(message, response_json)

Return type:

(str, dict)

class JciHitachi.connection.GetServerLastUpdateInfo(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Unused)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

get_data()[source]

Get data from the endpoint.

Returns:

(message, response_json)

Return type:

(str, dict)

class JciHitachi.connection.GetPeripheralsByUser(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Tested)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

get_data()[source]

Get data from the endpoint.

Returns:

(message, response_json)

Return type:

(str, dict)

class JciHitachi.connection.GetDataContainerByID(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Tested)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

get_data(picked_peripheral_json)[source]

Get data from the endpoint.

Parameters:

picked_peripheral_json (dict) – Picked peripheral_json.

Returns:

(message, response_json)

Return type:

(str, dict)

class JciHitachi.connection.GetPeripheralByGMACAddress(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Unused)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

get_data(peripheral_json)[source]

Get data from the endpoint.

Parameters:

peripheral_json (dict) – peripheral_json.

Returns:

(message, response_json)

Return type:

(str, dict)

class JciHitachi.connection.CreateJob(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Tested)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

get_data(gateway_id, device_id, task_id, job_info)[source]

Get data from the endpoint.

Parameters:
  • gateway_id (int) – Peripheral.gateway_id.

  • device_id (int) – Random device ID.

  • task_id (int) – Task ID (serial number).

  • job_info (str) – Base64 job info.

Returns:

(message, response_json)

Return type:

(str, dict)

class JciHitachi.connection.GetJobDoneReport(email, password, **kwargs)[source]

Bases: JciHitachiConnection

API internal endpoint. (Tested)

Parameters:
  • email (str) – User email.

  • password (str) – User password.

get_data(device_id)[source]

Get data from the endpoint.

Parameters:

device_id (int) – Random device ID.

Returns:

(message, response_json)

Return type:

(str, dict)