Do you have any idea how to protect this sensitive information? Is it possible to encrypt files? Do you use GPG keys?
Thank you

Code: Select all
{
"mqtt": {
"host": "example.com",
"pass": "your_pass",
"prefix": "prefix",
"user": "username"
}
}
Code: Select all
import ujson
import ubinascii
import machine
from umqtt.simple import MQTTClient
with open('secrets.json') as fp:
secrets = ujson.loads(fp.read())
client = MQTTClient(
client_id='esp8266_{}'.format(
str(ubinascii.hexlify(machine.unique_id()), 'utf-8'),
),
server=secrets['mqtt']['host'],
user=secrets['mqtt']['user'],
password=secrets['mqtt']['pass'],
)
client.connect()
How did you expect it to work? If the code editor is in the cloud obviously the code needs to be in the cloud too.
Uh, that does not sound good. I will install their firmware to peek around what is happening. In the meanwhile you could just install Loboris fork. It is what M5Stack is also using with couple of extra libraries.