<jupyter_start><jupyter_text>Read data from input registers 4..18<jupyter_code>r = client.read_input_registers(4, count=15, unit=1)
if r.isError():
    print("Error")
else:
    print(r.registers)
energy_kwh = (2**16 * r.registers[13] + r.registers[14] ) / 1000
print("Energy since installation: {:.0f} kWh".format(energy_kwh))<jupyter_output>Energy since installation: 160 kWh<jupyter_text>Set current limit<jupyter_code>r = client.read_holding_registers(261, count=1, unit=1)
if r.isError():
    print("Error")
else:
    print(r.registers)
w = client.write_register(261, 120, unit=1)
w.value<jupyter_output><empty_output><jupyter_text>The maximum value that can be written to 261 is defined by the hardware switch.<jupyter_code>client.close()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13583441138421734, 'fraction_numerical': 0.047865459249676584, 'mean_word_length': 6.8979591836734695, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '477757', 'license': 'MIT', 'n_tokens_mistral': 315, 'n_tokens_neox': 287, 'n_words': 57, 'path': 'modbus/read_from_walli.ipynb', 'repo_name': 'munich-ml/raspi_walli', 'size': '773'}