What process do I have to go through to add a new device type to ESPeasy? Where is this documented? Is there a getting started guide or tutorial somewhere?
What I want to do is to use ESPeasy to make all the data from my solar PV inverter available via WiFi. It needs to be WiFi because the inverter is in my garage, and I really don't want to have to run a cable from the garage to the house. The inverter has an RS485 interface, and I'm reasonably confident that I can reverse engineer the protocol it uses to supply information about the power being generated by each section of the inverter, the cumulative total energy produced, maxima and minima etc. This will give me valuable information about how my solar panels are performing, whether they need attention or cleaning etc. So the concept is that I connect the RS485 output to a GPIO on the ESPeasy, and write some code to interpret the data being supplied and make it available in a form that Domoticz can access.
Is this a sensible approach, and a good solution to this requirement?
Any hints on how to get started with this would be welcome.
Thanks - Rowan
Adding a new device type
Moderators: grovkillen, Stuntteam, TD-er
Re: Adding a new device type
Look at how other plugins are written.
In my opinion, you should connect the Uart-RS485 converter between inverter and the UART of esp8266 board.
Then after conversion, you can parse data like ser2net.
In my opinion, you should connect the Uart-RS485 converter between inverter and the UART of esp8266 board.
Then after conversion, you can parse data like ser2net.
Re: Adding a new device type
you can take a look at the ESPEasyDevelopment page and also in the file "_Pxxx_PluginTemplate.ino" which is included in the source files and contains information on how plugins are implemented.
-
- Normal user
- Posts: 22
- Joined: 25 Mar 2018, 15:30
Re: Adding a new device type
Thank you, those are helpful resources.
My PV inverter has 12 separate values that I would like to be able to read:
1. Input 1 Voltage
2. Input 1 Current
3. Input 1 Power
4. Input 2 Voltage
5. Input 2 Current
6. Input 2 Power
7. Output Voltage
8. Output Current
9. Output Power
10. Inverter Temperature
11. Internal Temperature
12. Daily Energy
It doesn't sound as if this fits the ESP Easy architecture very well (it seems designed primarily to return a single sensor value). How do I deal with this? I suppose that I might be able to do without a few of these values. It is not clear whether I need the power as well as the voltage and current for each inverter input, or whether I can just assume that the power is the voltage times the current. This may not always be good enough if the power factor is not 1, and can vary between the two inputs, or from time to time. Also it may prove unnecessary to read the Daily Energy figure, if I read the power every 60 seconds or so, and add them all up within Domoticz to generate the total energy for the day. But for now I would like to assume that I need to read all 12 values. What is the best way to implement this within ESPeasy?
Thanks - Rowan
My PV inverter has 12 separate values that I would like to be able to read:
1. Input 1 Voltage
2. Input 1 Current
3. Input 1 Power
4. Input 2 Voltage
5. Input 2 Current
6. Input 2 Power
7. Output Voltage
8. Output Current
9. Output Power
10. Inverter Temperature
11. Internal Temperature
12. Daily Energy
It doesn't sound as if this fits the ESP Easy architecture very well (it seems designed primarily to return a single sensor value). How do I deal with this? I suppose that I might be able to do without a few of these values. It is not clear whether I need the power as well as the voltage and current for each inverter input, or whether I can just assume that the power is the voltage times the current. This may not always be good enough if the power factor is not 1, and can vary between the two inputs, or from time to time. Also it may prove unnecessary to read the Daily Energy figure, if I read the power every 60 seconds or so, and add them all up within Domoticz to generate the total energy for the day. But for now I would like to assume that I need to read all 12 values. What is the best way to implement this within ESPeasy?
Thanks - Rowan
Re: Adding a new device type
You could split the outputs into groups and make such a group selectable.
For example these 3 groups all have the same sensor values:
You could then set 3 or 4 of these plugins active, but you may want to add a separate class to collect the data, from which these plugins collect their data.
For example these 3 groups all have the same sensor values:
- Input 1
- Input 2
- Output
You could then set 3 or 4 of these plugins active, but you may want to add a separate class to collect the data, from which these plugins collect their data.
-
- Normal user
- Posts: 22
- Joined: 25 Mar 2018, 15:30
Re: Adding a new device type
Thank you for this suggestion. I partly understand what you mean (i.e. I understand in principle - whether I can implement this in detail remains to be seen). I will start my design using this approach, and ask more questions if I need to later.
Thanks - Rowan
Thanks - Rowan
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 38 guests