Really basic question and the frustration was I had it sorted but it was lost before I could save the code / snapshot off … ;-(
I am trying to put a dual non-intrusive power monitor solution together for a mate to monitor his grid and solar meters and I have his RPi3B (that got corrupted on an update and hence how I lost what I’d done) and have the two opto-transistors wired up to an ESP8266 and have one working fine with the following code:
It complains about duplicate platforms and if I get rid of that it then complains about the pin and I’m just tired and would like it working please … ;-(
Could anyone offer the solution that works for me to save somewhere safe this time please …
Cheers, T i m
p.s. My fairly comprehensive (~60+ Zigbee / ESP devices) on an Odroid N2+ system
seems to be pretty reliable.
Thank you so much. Whilst when I’m doing loads of ‘poke and hope’ / ‘copy > paste’ and ‘standing on the shoulders of giants’ coding I can often muddle my way though but in this case I was particularly frustrated because 1) it was late and I’d spent more than enough time on it … 2) just wanted a working solution (for someone else as an appliance) and 3) did have it working previously (or at lest the code) and it had been lost because of an update. ;-(
My problem is at 65 years old and even after spending most of my career in IT via electronics repair / datacomms field support / IT Training and building my first home computer (from a kit), the ZX81, I’ve never really been able to code. ;-(
I really think it’s a form of ‘blindness’, like people get with words or numbers … along with a really poor memory for things that aren’t intuitive.
So I do what I can, especially on the practical / electronics side and sometimes have to rely on good people like those helping others here.
The frustration is that I really love the whole Home Automation thing and especially Home Assistant and am like a kid when I come home with another brand / model of Zigbee lamp or switch and get it working for me.
The last instance of that was replacing 3 outdoor lamps with smart versions (Ikea, Lidl and Philips Hue) and triggering them with a SonOff PIR in a home 3D printed ceiling fitting and on the lux condition read from an ESP32 and a light level sensor. Every time I walk out into the back yard at night and the lights come on it makes me smile.
Hi Nick, sorry for the delay and thanks for the reply.
I think it’s too late for me to become good / comfortable coder as soon as I see code I just go blank (in many cases).
I also don’t enjoy it and this is part of the remit for me and HA, along with the practical benefits (most of which I managed without etc).
So there is little point me trying to learn how to do it because the learning curve is just too steep and unlike those things that I do seem to have an intuitive interaction with that I learn and retain, coding isn’t one of them.
Like the simple missing - thing. I have probably been there before and not realised / forgotten and so no other code changes (and I’d tried a lot) made the slightest difference. What I do is try to build up a library of routines that work and try to cobble them together as required.
I do have a good relationship with a coder and in return for his coding help, I help him with his electronics questions.
Ironically, I have been in IT Support most of my life so giving support (with nothing in return) is just part of me.