![HYDROMEA Luma X Manual Download Page 24](http://html.mh-extra.com/html/hydromea/luma-x/luma-x_manual_2192302024.webp)
24
LUMA X
3/2022
control.json (write)
Parameter
Description
save_parameters
Saves all current parameters into ROM to be
persistent between restart
save_ip_address
Saves the IP address that was entered in
ip_address.json
read_parameters_from_rom Gets all parameters from ROM and replace the
recent changes
reset_parameters
Resets all parameters back to default
reboot
Restart the Luma, makes it go into bootloader
6.2
Usage examples
Example of using the API using python
requests
library
import requests
requests.post('http://192.168.102.101/api/parameters.json', json =
{'optical_speed':6, 'nb_led':3, 'auto_gain_control':1})
The above example is putting the luma
101
to
6Mhz
,
3 banks of LEDs
and with
autogain
active.
Reading the API is similar:
response = requests.get("http://192.168.102.101/api/status.json")
print(response.json())
and gives the following result:
{'amplitude': 3864, 'ambient': 3742, 'temperature': 40.3125,
'throughput_received': 0, 'crc_errors': 0, 'pkt_recv': 0, 'pkt_loss': 0,
'gain': 990, 'nb_additional_rcv': 0, 'status_electronics': 1}