Trouble with this code

New to this language/IoT.. figured I would start off with NodeMCu and Arduino before I start hacking my sonoff devices..
This was a bit of a chunk of a project to kick off with, but it's usually how I learn the best but I am kinda befuddled why / how the void statements operate...

This code is a combo of 2 that I found on the net/ and the manual...
The WeatherUnderground and the Relay sketches work independently, and one iteration of my attempt loaded with no errors but the relay functions did not respond load up..

What am I missing??

Any guidance on making the display show the relay state and adding a ability to set an "on" time

WeatherUnderground-Relay.txt (9.12 KB)

If you really are a complete beginner I suggest you start your exploration and learning with something a lot simpler.

For example if you want to figure out how to write to a display remove everything irrelevant and just get the display to show "Hello World"

If you tackle the project that way it will be much easier to help you.

...R

Do you get the "on" and "off" messages on Serial Monitor? If not, you aren't properly parsing the messages that would switch the relay on and off.

I search the sketch for "switch1" and can't find a declaration for it.

I search the sketch for "ActvnPin" and can't find a declaration for it.

Are you sure this sketch compiles?

Library Manager doesn't have a JsonListener so I can't try to compile your sketch.

johnwasser.
Sorry for the late replay and Thanks for your reply.. I took on some extra work so time has been at a premium..
The json is available from Github here
Yeah I had been getting the on/off msg lol that was what was really twisting my noodles. but it was my only day off with a few other things to get done later and very little sleep.. As soon as I posted and logged off I found I missed one little thing in the 3+ attempt... I forgot to change the Pin assignment from D3 to D8.. I changed it, uploaded and booya it worked..

If I can bend your ear for a sec..
Would adding the OTA and a scheduling routine consume too many resources?
Is there a simple 2 or 3 line of code that I could make an "Auto Off" after the On command
I have a push button set up on gnd/D7... would adding a "change state" to the button be sufficient for on/off?

Posted a few pics of the maker.. still have to fine tuning the faceplate template.. and I think I am going to go with a wider display..

WeatherUnderground-Relay.txt (9.26 KB)