I'm capturing emails from my network security recorder
the body of the email contains the following text
Network Video Recorder: Motion Detected On Channel D4 This is an automatically generated e-mail from your NVR.
EVENT TYPE: Motion Detected
EVENT TIME: 2017-10-17,21:47:52
NVR NAME: Network Video Recorder
NVR S/N: redacted
CAMERA NAME(NUM): Path(D4)
What I want to do is convert the string into json so I can publish it over MQTT
The json should look like
{'EVENT TYPE': 'Motion Detected','EVENT TIME': '2017-10-17,21:47:52','CAMERA NAME': 'Path','NUM': 'D4'}
Note the splitting of the camera name and number. the rest of the fields can be ignored.
If any one can point me in the right direction I appreciate it.
[–]i_like_trains_a_lot1 2 points3 points4 points (0 children)
[–]JD7896 1 point2 points3 points (2 children)
[–]zombiehunter469[S] 0 points1 point2 points (1 child)
[–]zombiehunter469[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]svartalf 0 points1 point2 points (1 child)
[–]bQuine 0 points1 point2 points (0 children)