[App][Pro] ESP Easy (Firmware for ESP32, NodeMCU, Wemos...)

Nope, not sure, lol.

Hello,

I have an ultrasonic sensor (HC-SR04) on my ESP8266, but i dont find how to get the value on Homey.
ESP Unit was added successfully but how get the ultrasonic value?

Thank and happy new year! :tada: :confetti_ball:

https://espeasy.readthedocs.io/en/latest/Plugin/P013_HC-SR04.html

Unfortunately, the P013 plugin isn’t supported by the app. You can find instructions on how to get it supported here but to be honest; I haven’t developed on the app for a while now so don’t expect anything fast.

1 Like

@JPe4619: get value on Homey, not in the ESP Easy web app.

I found another method, i talk about here (Post translate with Gtrad) :

1 Like

I have the P1 function working well. Is it possible to add some more values?:

  • actual gas consumption
  • actual power consumption of L1, L2 and L3

If it’s available, the values should show up. The scripts will add an entry to the device status page for any value that’s not zero.
It supports these values:

        // Power usage
        this.setValue("measure_power", dg.electricity.received.actual.reading * 1000);
        this.setValue("meter_power.received1", dg.electricity.received.tariff1.reading);
        this.setValue("meter_power.received2", dg.electricity.received.tariff2.reading);

        // Power surplus
        this.setValue("measure_power.delivery", 0 - dg.electricity.delivered.actual * 1000);
        this.setValue("meter_power.delivered1", dg.electricity.delivered.tariff1.reading);
        this.setValue("meter_power.delivered2", dg.electricity.delivered.tariff2.reading);

        // Active tariff
        this.setValue("alarm_active_tariff", dg.electricity.tariffIndicator.toString());

        // Gas meter
        this.setValue("measure_gas", dg.gas.reading);

I’m using the ‘parsepacket’ function from this NPM package to parse the datagram to values:

If you think your meter sends data that doesn’t show up, please post a datagram by accessing the P1 meter port in your webbrowser or sending an diagnostics report within a few minutes of initialisation (only the first datagram is printed to the report)

I don’t know if the smart meter is sending als the gas values. The gas meter is connected at the smart meter. So it should pull the data. I don’t know what you are meaing with a diagnostic report but in the log of espeasy i found this:

254370291: Command unknown: 303539303033393230351/C1/C1/C023124W)(0000000311s1.8.2(001508.263kWh)/C2147824*s)(21121709035393030333932303

254393800: Command unknown: )(0002147824*s)(2111ETER

254507170: Command unknown: 0011)(211122123124W)(000/(211122123124W)(00001(01-111-0:1.7.0(02.245kW)90317W)(0002147824s037313332353131323

254645034: Command unknown: 24W)(0000000311s)24.2.1(220123202000W)(04243.611111/111053512W)(0004295337.0(00.349kW)

254659634: Command unknown: :1.8.2(001508.263*kW30353130323139)

254687605: Command unknown: :99.97.0(10)(0-0:96.1018)

254715579: Command unknown: 318W)(0002147824*s)(1!0-0:96.14.0(0001)

254771626: Command unknown: 1-0:61.7.0(00.120kW)1(1104295339s)(22011105

254880371: Command unknown: -0:1.8.1(001104.46253512W)(0004295339s(1:24.2.1(22012320250111!10-0:1.0.0(2201232027.1(001104.479*kWh)

254926391: Command unknown: *s)(211122122606W)(0130323139)

254950964: Command unknown: 00-0:1.0.0(22012320280:96.7.9(00057)

255113603: Command unknown: 130303037313332353131(512W)(0004295339*s))

255143876: Command unknown: 01-0:32.36.0(00018)

255188698: Command unknown: 110

255350138: Command unknown: /01)

255390511: Command unknown: 00147824s)(2111221231!0:21.7.0(00.278kW)

255405059: Command unknown: 018)

255434233: Command unknown: /C030323139)

255480182: Command unknown: 2122606W)(00000006761011.0(473030353930303331.7.0(00.108*kW)

I don’t think it’s supposed to be doing that. Looks like it’s trying to run the P1 datagrams as commands or something!

Have you set up a device type ‘Communication - P1 Wifi Gateway’ ? If so, you can see the TCP port it’s listening at on the ESP devices page. You can access the IP of your ESP device and include the port number in your webbrowser. In my case, I can go to: http://192.168.55.44:8088/ but the IP and possibly the port number will be different for you.
If you open the webpage (might take a while to load as it’ll wait for a datagram to come in), you can see the actual datagram being send by your smart meter. (The Homey app will lose connection but will reconnect after about a minute)

If you haven’t set up a device, type ‘Communication - P1 Wifi Gateway’, well, there’s your problem :slight_smile:

You can send me a diagnostics report from the Homey app by going to Settings > Apps > ESP Easy > Settings (little gear at the right-top) > Create Diagnostics Report. It’ll work best if you restart the app and wait about 2 minutes before sending the report.

Thanx for the quick response! :slight_smile:

I think the device is set up correctly with the “communication - P1 Wifi Gateway” device. When I acces my esp device like you described I will receive the following diagram:

1-3:0.2.8(50)
0-0:1.0.0(220124200030W)
0-0:96.1.1(4530303639303030373133323531313230)
1-0:1.8.1(001107.475kWh)
1-0:1.8.2(001515.428
kWh)
1-0:2.8.1(000012.820kWh)
1-0:2.8.2(000056.492
kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.494kW)
1-0:2.7.0(00.000
kW)
0-0:96.7.21(00054)
0-0:96.7.9(00057)
1-0:99.97.0(10)(0-0:96.7.19)(220111053513W)(0004295340s)(220111053513W)(0004295339s)(220111053512W)(0004295339s)(211217090318W)(0002147824s)(211217090317W)(0002147824s)(211217090317W)(0002147824s)(211122123124W)(0000000311s)(211122123124W)(0000000310s)(211122123123W)(0000000310s)(211122122606W)(0000000676s)
1-0:32.32.0(00011)
1-0:52.32.0(00017)
1-0:72.32.0(00015)
1-0:32.36.0(00018)
1-0:52.36.0(00016)
1-0:72.36.0(00019)
0-0:96.13.0()
1-0:32.7.0(230.0V)
1-0:52.7.0(228.0
V)
1-0:72.7.0(231.0V)
1-0:31.7.0(001
A)
1-0:51.7.0(000A)
1-0:71.7.0(000
A)
1-0:21.7.0(00.253kW)
1-0:41.7.0(00.081
kW)
1-0:61.7.0(00.160kW)
1-0:22.7.0(00.000
kW)
1-0:42.7.0(00.000kW)
1-0:62.7.0(00.000
kW)
0-1:24.1.0(003)
0-1:96.1.0(4730303539303033393230353130323139)
0-1:24.2.1(220124200000W)(04250.818*m3)
!2836
/CTA5ZIV-METER

In the marked rule, I see the information of my gas meter correctly. Also the energy rules are classified into groups of three. That should be L1, L2 and L3. Is it possible to show and add these information in the app?

Currently the app shows this:

Diagnostic report: 76a13370-bb1d-4756-bcc0-768ed5c70066

Thanks! I got a lot of information now I can work with. Something is clearly going wrong in the app, I see a lot of entries like this:

2022-01-24 20:26:24 [log] [ESPEasy] Rejection reason: Error: invalid_capability
    at Remote Process
 {
  code: 404
}
2022-01-24 20:26:24 [log] [ESPEasy] Rejection stack: Error: invalid_capability
    at Remote Process
2022-01-24 20:26:26 [log] [ESPEasy] Unhandled Rejection at: Promise {
   Error: invalid_capability
      at Remote Process
   {
    code: 404
  }
}

Maybe I misspelled something somewhere. My meter only has values for ‘power received’ so I couldn’t test most code paths. I’ll try to figure it out.
If I make a version of the app with more debugging enabled, are you able to run it using the Homey CLI or should I release it as a test version?

Whelp! I found the problem. The app tries to add the capability ‘measure_gas’ but Homey doesn’t have a ‘measure_gas’ capability

I probably got confused because it does list the ‘meter_gas’ capability.

It looks like that would actually be the correct capability. ‘Meter’ capabilities show ‘total used’ and ‘measure’ capabilities show ‘actively using’ values. The P1 datagram seems to be showing only ‘total used’ for gas readings.

I’ll change it in my code and try to put a test version online this week. I changed a lot of stuff behind the scenes so I will keep it in testing for now but post a link to it when I upload it (It’s actually just the Homey store link with /test put after it)

I’ll take a look at the other values. I’ll probably have to add custom capabilities and that’s a bit more work as I need to add icons and descriptions and stuff.

1 Like

Okay, here it is: ESP Easy App for Homey | Homey Hope it works!

1 Like

Great Job! :grinning:

The most importend value at the moment is working. The gas value is shown below:

Hopefully you can add in a new release something to split up the values of the 3 phase (L1, L2 and L3).

Thank you so much!

Just released a new test version with support for a lot of new devices. There is also a bunch of internal restructuring so I’m gonna keep it in testing for a while. I hope I get some early adopters to find any lingering bugs or problems while updating.

You can install this release from the Homey app store

New functionality:

  • When pairing a new sensor, it now directly shows any known devices and pulls fresh information from all units instead of only doing the last part. Makes it a lot faster and more responsive
  • Added ‘titleFormatted’ property to applicable action flowcards
  • Add support for doubleclick and long press events for digital switches
  • Now able to use a dummy device for analog_input
  • Add support for dust measure devices
    • P018 Dust - Sharp GP2Y10
    • P053 Dust - PMSx003 / PMSx003ST
    • P056 Dust - SDS011/018/198
  • Add support for light strength sensors
    • P010 Light/Lux - BH1750
    • P015 Light/Lux - TSL2561
    • P074 Light/Lux - TSL2591
  • Add support for distance sensors (lidar/ultrasonic)
    • P013 Position - HC-SR04, RCW-0001, etc.
    • P110 Distance - VL53L0X (200cm)
    • P133 Distance - VL53L1X (400cm)
  • Add support for extra environment sensor
    • P016 Environment - BME680
  • Add support for extra gas sensor
    • P052 Gasses - CO2 Senseair

Fixes:

  • Makes some actions more resilient to errors
  • Fixed a lot of bugs
  • Huge internal restructuring of manifest files. Fixes some bugs and removes a few warnings.
2 Likes

Just submitted version 1.11.0
You can install this release from the Homey app store
I’ll keep it in testing for a week or so to test stability.

New functionality:

  • Add support for energy measuring devices
    • P027 Energy (DC) - INA219
    • P076 Energy (AC) - HLW8012/BL0937
    • P077 Energy (AC) - CSE7766 (POW r2)
    • P078 Energy (AC) - Eastron SDM120C/220T/230/630
    • P085 Energy - AccuEnergy AcuDC24x
  • Adds privacy-friendly telemetry to better focus development in the future
  • Updated readme for app store

Fixes

  • The icons for Pulse sensor and Light strength on the app store page were wrong
  • Greatly improves debugging and development on the app
  • Code for retrieving old capability values for comparing with new values was bugged
  • Handle cases where two packets are processed at the same time by the P1 device listener

Version 1.11.2 contains two patch releases. No new functionality but fixed a crash (Found thanks to the one beta tester the app has, thank you, whoever you are!) and fixes some errors parsing packets from P1 energy meters. (Thanks to the single beta tester and the new telemetry functions)

As it seems to run stable now for me and the tester, I’ll release it in the store faster than anticipated.

Edit: Apparently not stable enough :slight_smile:

Release 1.11.4:

Fixes

  • App crash during pairing
  • Increase the amount of devices that can be connected to a unit from 10 to 100 (I wasn’t aware of this limitation, found out with telemetry)
  • Adds a bunch of error logging to try and catch an error seen in telemetry
  • Improve handling of http errors for units and P1 devices

@Thiemo I added support for separate L1, L2 and L3 measurements.

Release v1.12.0

You can install the release from the Homey Appstore.

New functionality

  • Measurement values for three separate phases for the P1 device
  • Support for the SHT30/31/35 environment device

Fixes

  • Crash that happens when the app makes a timeline notification but the user has disabled those
  • Handle some never-before-seen edge-cases better
  • Some bugs reported through telemetry

Thnx for the great app. I bought a little print with WeMos and it worked in like half an hour.

Anyone an idea to change te way of logging (gas) to someting more usable. ? Now it’s just raising the value, but it would be nice to see what times we use what gas


Unfortunately, the gas meters only provide total amount of gas used. They do not provide live data. The stats should be kept in insights though so you can look at historical data,