08 MISCELLANEOUS - patience4711/ESP8266_read_p1meter GitHub Wiki

SECURITY:

Since this software is public, it would be easy to hack. This is why we have the option to configure a security. This means that the access to configuration pages is prevented from outside our home network. Therefor the IP of the client is compared with that of the router. When there is a match (e.g. both have "192.168." (8 characters), the client is from inside.

The securitylevel variable ( configurable via the wifi config portal) is used to configure the length of the first part that should match.
example 1: With a router IP starting with "172.30.1" and a client with "172.30.0.25" we can set the security level 7. Only "172.30." (the first 7 characters) match.
Example 2: With a router IP starting with "192.168.0" and a client with "192.168.0.234 you can set the security level to 9.

This way you can figure out what number you should use, the higher the better. Now we can put it open to the world with more peace of mind. But use a strong password if you do.
note the default value is 0, which means no security.

SOFTWARE UPDATE:

The software on the ESP32C3 can be renewed 'over the air' (OTA). This works as follows: Be sure you downloaded the firmwarefile on a known location on your pc/laptop. Click 'settings' and 'software update'. At this page you can point to the firmware file and click 'update'.

request data via http:

http://ip_of_esp_ecu/API/v1/data returns data that is compatible with the home wizzard p1 dongle This will look like: {"smr_version":50,"meter_model":"XS210","wifi_ssid":"hansiart","wifi_strength":108,"total_power_import_t1_kwh":1477.206,"total_power_import_t2_kwh":1992.399,"total_power_export_t1_kwh":610.769,"total_power_export_t2_kwh":357.748,"active_power_w":0,"active_power_l1_w":83}

http://ip_of_esp_ecu/API/telegram returnes the last valid complete telegram that was received.

When you issue a link like http://ip_of_esp_ecu/get.Data, you'l get the signifficant data in a json with the format: {"ECON_HT":0,"ECON_LT":51.775,"ERET_HT":0,"ERET_LT":24.413,"PACTUAL_CON":335,"PACTUAL_RET":0,"enR":24.413,"enC":51.775,"aPo":335,"gAs":16.713,"rm":0}
The numeric values are float.

  • ECON_HT = Energy consumed High tariff
  • ECON_LT = Energy consumed Low tariff
  • ERET_HT = Energy returned High tariff
  • ERET_LT = Energy returned Low tariff
  • PACTUAL_CON = actual power consumed
  • PACTUAL_RET = actual power returned
  • mGAS = gas consumed
⚠️ **GitHub.com Fallback** ⚠️