Inspiration, automating in the cloud
- Grafana
- Create Grafana alert to Discord bot
- Node-RED
- MQTT
- Webhooks
Either locally with Docker
https://nodered.org/docs/getting-started/docker
Or, in the cloud (For free!)
https://nodered.org/docs/getting-started/ibmcloud
pybytes_config.json
.Disable Pybytes on boot!
boot.py
and main.py
REPL Interface in Atom.io
Show MQTT Explorer
MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging “machine-to-machine” (M2M) or “Internet of Things” world of connected devices, and for mobile applications where bandwidth and battery power are at a premium.
You can pass a user name and password with an MQTT packet in V3.1 of the protocol. Encryption across the network can be handled with SSL, independently of the MQTT protocol itself. Additional security can be added by an application encrypting data that it sends and receives, but this is not something built-in to the protocol, in order to keep it simple and lightweight.
sensors/+/temperature/+
As another example, for a topic of "a/b/c/d", the following example subscriptions will match:
'#' can be used as a wildcard for all remaining levels of hierarchy. This means that it must be the final character in a subscription. With a topic of "a/b/c/d", the following example subscriptions will match:
MQTT defines three levels of Quality of Service (QoS). The QoS defines how hard the broker/client will try to ensure that a message is received. Messages may be sent at any QoS level, and clients may attempt to subscribe to topics at any QoS level. This means that the client chooses the maximum QoS it will receive. For example, if a message is published at QoS 2 and a client is subscribed with QoS 0, the message will be delivered to that client with QoS 0. If a second client is also subscribed to the same topic, but with QoS 2, then it will receive the same message but with QoS 2. For a second example, if a client is subscribed with QoS 2 and a message is published on QoS 0, the client will receive it on QoS 0.
Higher levels of QoS are more reliable, but involve higher latency and have higher bandwidth requirements.
0: The broker/client will deliver the message once, with no confirmation.
1: The broker/client will deliver the message at least once, with confirmation required.
2: The broker/client will deliver the message exactly once by using a four step handshake.
https://mosquitto.org/man/mqtt-7.html
https://hackmd.io/@lnu-iot/cloud-platforms
Credit: Marco Zennaro
https://www.frugalprototype.com/technologie-lora-reseau-lorawan/
LoRaWAN-protocol specifications, LPWAN-Technologies for IoT (2020)
LoRaWAN-protocol specifications, LPWAN-Technologies for IoT (2020)
Info regarding Pycom devices:
device_class
sets the LoRaWAN device class. Can be either LoRa.CLASS_A
or LoRa.CLASS_C
https://www.newieventures.com.au/blogtext/2018/2/26/lorawan-otaa-or-abp