fliphess / esp8266_p1meter

dsmr 4.2 P1 meter to mqtt using esp8266 nodemcu
GNU General Public License v3.0
69 stars 114 forks source link

Compiling in Arduino IDE #2

Open HanSyt opened 4 years ago

HanSyt commented 4 years ago

It seems that some default libraries are changed. Ik had a view errors when compiling the code and uploading it to the ESP. Two main errors were:

  1. using double WifiUDP
  2. method not found

I changed the includes to this:

include

include

// * #include

include

include

include

include

// * #include

include

include

include

fliphess commented 4 years ago

Thanks for letting me know, I recently moved and haven't had the time to reinstall the esp8266 on my meter. I hope I'l get to it soon, feel welcome to create a PR :)

Roosted7 commented 4 years ago

I've just fixed the SoftwareSerial object declaration in my fork and PR'd that #4

Why didn't the WifiUDP library compile? Those includes are probably not necessary and can be removed, but also shouldn't cause any harm...

fliphess commented 4 years ago

I think it has something to do with not pinning the library versions, even though there not used... I didn't do much with arduino when I created this sketch so It must be something stupid ;)

In a few weeks the electrician is coming to my home to create a power outlet in the closet where the meter is located and I'll get to it....

HanSyt commented 4 years ago

I think the libraries are depending on the compiler? I use Arduino IDE with esp8266 specific libraries. Also using a Wemos D1 Mini, so other board can behave in a different way.

HanSyt commented 4 years ago

Hi, I uploaded my version with extra readings as a fork to github. Also added the changes of Roosted7 in it.

It compiles, but the p1 meter is not giving any data. So I studied a bit on the changes in espserial and made a further few changes in a develop branche with this information. However, no information either... so reverted back to the first version with board 2.5.2... shxx no data either. So, not sure whats wrong, maybe it's my p1 meter itself, it tends to stop sending data for a couple of hours in the past. Maybe somebody can check the code in de development branche?

fliphess commented 4 years ago

Hey @HanSyt !

I'm sorry for being so passive: At the moment I have no way of testing suggested changes as my own meter is not installed at the moment because of a move to a new home.

As soon as my power connection next to the meter is installed I will install my sketch on a new esp and check what needs to be done to have it running for the newer meter standard and with the newer arduino firmware for esp8266.

I prefer not to merge any PR until then as I can't test the suggested changes and I have some trust issues when it gets to merging without testing (no offence, it's a personal issue I'm working on :))

Thanks for your effort: Much appreciated! 👍