Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Run liota on an esp8266/esp32 #227

Open
supersjimmie opened this issue Nov 27, 2018 · 7 comments
Open

Run liota on an esp8266/esp32 #227

supersjimmie opened this issue Nov 27, 2018 · 7 comments

Comments

@supersjimmie
Copy link

supersjimmie commented Nov 27, 2018

There's a vmware blog that says:

It should run on any gateway that supports Python, independently of what OS or what processor architecture it is based on.

As an example, the rasppi is mentioned.

For the even smaller esp8266 modules, there is also a way to run MicroPython or CircuitPython

Would it be possible to use liota on the esp8266?

@KohliDev
Copy link
Contributor

We haven't tested Liota on "esp8266" but you can surely give a try.

@supersjimmie
Copy link
Author

Would love to, but since I'm currently completely new to liota, I think that's gonna be very tough for me.

Last month I was at VMworld but was unable to attend the Building and Monitoring IoT with Liota and Wavefront [CODE5546U]. :( Otherwise I would now have known more about it, at least how to do it on a rasppi so it would be easier to "reproduce" it on one of my esp8266's. (I don't own a rasppi)

@supersjimmie
Copy link
Author

I guess the first step is the most basic "problem":

In general, liota can be installed:
$ git clone https://github.com/vmware/liota.git
$ cd liota/
$ python setup.py install

On an esp8266 with Python, there's nothing else than... Python. No linux, no bash, no '$', no git, nothing...

@supersjimmie
Copy link
Author

Just to let you know, I have decided not to use an esp8266 but the big(ger) brother esp32.
So now I ordered a Chinese esp32, which should arrive in a couple of weeks from now.

I think most liota code is OS independent / python-only, except for some .sh scripts. I have found:

Install:

  $ cd liota/
  $ python setup.py install

Setup:

  $ LIOTA_USER="non-root user" ./post-install-setup.sh

Autostart:
?

Device discovery:

sudo ./liotapkg.sh load dev_disc/dev_disc sha1_checksum

use CmdMessage to check certain information (under /usr/lib/liota/packages/dev_disc)

sudo ./liota_devsim_pipe.sh list th

Execute:

$ sudo nohup python simulated_graphite_event_based.py &

Pieces like install, setup and execute should also be possible manually without bash, so probably only the liotapkg.sh and scripts like liota_devsim_pipe.sh cannot work.

@KohliDev
Copy link
Contributor

You can give a try and let us know if something doesn't work will try to provide the necessary help.

@supersjimmie
Copy link
Author

I've received my ordered esp32 module (one with extra psRAM and an sd-card slot).
Installed micropython from https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo

Next step is to get the first requirements for liota fixed.
From here https://github.com/vmware/liota/blob/master/liota-lite/requirements.txt
I now have linux_metrics and paho able to import without errors, but aenum and pint are not easy on micropython. (and then I don't know if the imported linux_metrics and paho are good enough)

@supersjimmie
Copy link
Author

This has been silent for some time...
I was struggling with the limitations of micropython, since that's the only python available for the esp modules.
Unfortunately I am still unable to get the required modules into micropython, basically just because the modules and/or their dependencies don't exist for micropython or because they are too different (limited).

@supersjimmie supersjimmie changed the title Run liota on an esp8266 Run liota on an esp8266/esp32 Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants