Check state of light and send an alert if it’s turned off/on

How do I do regular checks on the state of my lights and send an alert (let’s say to an email) if the state has changed?
Thanks in advance to anyone who can help!

Hi,
you could Node-Red and then a Node like node-red-contrib-node-lifx;

once you have it reading you lights status you could use a Node like node-red-node-email

Have a go a let us know how you go.

node-red-contrib-node-lifx
what should i do with these fields in Lifx Server?
Address
Broadcast
Lights

when click on search Light ID, I always get “No lights found”

Well those fields are self explanatory. if you read the instructions for the module you will see what you need to do.
There is a word “optional” next to the fields… it uses the local LAN to connect as it says in the documentation.
Add a server then deploy your flow. Once you deploy the server is running and you can search for bulbs, add them one at a time.