Format function for database - deviceNames

OK, It's working now. I had stolen parts from my test unit to send out the 7 production units, so I was trying to simulate events with CLI. When the message went out as a string originally, it just ignored the device name code and I got "Event Power on Payload Test Power on Time 2018-..." in firebase, so I figured it would do same for what I am trying to do now. I just set up a button on the device and did it the correct way and this flow works.

thanks for your help

I wanted to try to set up Mongol and try that too, but I am having a hard time. Here's the link to the discussion I started on Forum:

If you have time and have any idea what I am doing wrong, I'd appreciate your help

Thanks again.