admiral Posted March 27, 2019 Share Posted March 27, 2019 @georgelza - if you look at the build log you'll see the first two lines are complaints about git. They probably refer to this command: https://github.com/victronenergy/venus-docker/blob/master/build.sh#L4 and this one: https://github.com/victronenergy/venus-docker/blob/master/build.sh#L7 I wonder if you'd "cloned" the venus-docker repo (https://github.com/victronenergy/venus-docker) correctly? Did you run this command? git clone [email protected]:victronenergy/venus-docker.git Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 27, 2019 Author Share Posted March 27, 2019 11 minutes ago, admiral said: @georgelza - if you look at the build log you'll see the first two lines are complaints about git. They probably refer to this command: https://github.com/victronenergy/venus-docker/blob/master/build.sh#L4 and this one: https://github.com/victronenergy/venus-docker/blob/master/build.sh#L7 I wonder if you'd "cloned" the venus-docker repo (https://github.com/victronenergy/venus-docker) correctly? Did you run this command? git clone [email protected]:victronenergy/venus-docker.git hehehe nope, as there was no mention of doing it in the GIT page, was wondering/looking for something like that, wondering if it was all being pulled via the docker pull commands, let me retry. G Quote Link to comment Share on other sites More sharing options...
admiral Posted March 27, 2019 Share Posted March 27, 2019 Yeah, so start fresh somewhere, and run "git clone [email protected]:victronenergy/venus-docker.git" - this will create a subdirectory named "venus-docker". You'll then run the "build.sh" command inside that directory. Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 27, 2019 Author Share Posted March 27, 2019 my bad, ye I did this, but I did it by downloading and unpacking the clone/download from GIT web site, and not at command line using git clone. ... otherwise I would not have had the build.sh command if you look at what you get those directories are all empty. G Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 27, 2019 Author Share Posted March 27, 2019 think i solved it... the copy/clone by downloading zip... seems to give you different than the git clone [email protected]:victronenergy/venus-docker.git command. I now got the first couple of lines showing with submodule which was not there previously. will advise. G Quote Link to comment Share on other sites More sharing options...
admiral Posted March 27, 2019 Share Posted March 27, 2019 The initial "git clone ..." command won't initialize those special git directories - the build.sh has the commands to get those submodules. ___ 1 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted March 27, 2019 Share Posted March 27, 2019 Doesn't Macbook run BSD kernel? @plonkster can that code compile, or run on BSD? Quote Link to comment Share on other sites More sharing options...
admiral Posted March 27, 2019 Share Posted March 27, 2019 2 minutes ago, SilverNodashi said: Doesn't Macbook run BSD kernel? @plonkster can that code compile, or run on BSD? It all runs in docker so it should be fine. Docker on mac actually runs in a linux vm, and then the docker containers inside that. (Yes, I agree macos is not a proper OS. But the laptop works well.) ___ 1 Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 27, 2019 Author Share Posted March 27, 2019 it compiles into a docker image, so MAC not relevant. Problem was I got the code from GIT using the zip file, which I unpacked, I saw the git submodule lines in the build.sh it was them that failed, so by the time steps 1-> 32 started as part of the docker build . -t matt I already had parts missing which then broke everything. It's building at the moment... G Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 27, 2019 Author Share Posted March 27, 2019 Working... Thanks guys. now to get some code to interface with this mosquito server and see how to retrieve and publish messages and what format they are in (here is praying for simply JSON) is there a reference some where ? or example code/python G Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted March 27, 2019 Share Posted March 27, 2019 7 minutes ago, admiral said: It all runs in docker so it should be fine. Docker on mac actually runs in a linux vm, and then the docker containers inside that. (Yes, I agree macos is not a proper OS. But the laptop works well.) But BSD is Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted March 27, 2019 Share Posted March 27, 2019 7 minutes ago, georgelza said: it compiles into a docker image, so MAC not relevant. Problem was I got the code from GIT using the zip file, which I unpacked, I saw the git submodule lines in the build.sh it was them that failed, so by the time steps 1-> 32 started as part of the docker build . -t matt I already had parts missing which then broke everything. It's building at the moment... G aha. I somehow missed that part. Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 27, 2019 Author Share Posted March 27, 2019 2 minutes ago, SilverNodashi said: But BSD is tsk tsk tsk, def one hell of a better os than a MS *... hehehe G ___ 1 Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 27, 2019 Author Share Posted March 27, 2019 got it running, initiated simulation i. now to try and connect to it via port 1883, i can get the web app view on 8080. G Quote Link to comment Share on other sites More sharing options...
___ Posted March 27, 2019 Share Posted March 27, 2019 (edited) 1 hour ago, georgelza said: is there a reference some where ? or example code/python See the dbus-mqtt readme. Basically you have to send something to the broker to wake it up, a keepalive packet. I usually just send a read request for the serial number, and that causes the whole caboodle to come down. Eg, using an example from a local CCGX running dbus-mqtt: mosquitto_sub -v -h 192.168.8.52 -t '#' That subscribes to all topics, and the moment you connect you will see: N/badbeefbad00/system/0/Serial {"value": "badbeefbad00"} You can then request the serial number in another terminal, eg: mosquitto_pub -h 192.168.8.52 -m '' -t 'R/badbeefbad00/system/0/Serial' And then you will see it all come streaming down. That will give you an idea of the things you can subscribe to. Of course badbeefbad00 will be replaced by whatever your vrm id is. For a docker instance your IP will probably be something like 172.17.0.1 or some such. As long as you request SOMETHING every 60 seconds, the data will keep coming. Edited March 27, 2019 by plonkster Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 28, 2019 Author Share Posted March 28, 2019 stupid question... sorry where is mosquito_sub? G Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 28, 2019 Author Share Posted March 28, 2019 ... busy installing Mosuitto... guessing it will be part of that distribution. G Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 28, 2019 Author Share Posted March 28, 2019 well that did not work... which mosquitto_sub and locate mosquitto_sub returned nothing. G Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 28, 2019 Author Share Posted March 28, 2019 ... found a /Users/george/Downloads/venus-docker/dbus-mqtt/test, figured i'll try that to unblock the pipe, well this got more interesting... module missing "dbus" and I can't see to get it installed. Brew install dbus completed pip install dbus-python failing. G Quote Link to comment Share on other sites More sharing options...
___ Posted March 28, 2019 Share Posted March 28, 2019 The mosquitto client tools is available inside the docker instance. So there are two ways to go about this. The easiest one might be to "apt-get install openssh-server" inside the docker instance and expose port 22 (and /etc/init.d/ssh start inside), then you can just ssh in a few times to get multiple terminals, so you can run mosquitto_sub in one and _pub in the other. The other one is to run "screen" inside the docker instance. This is a terminal aggregator. Might have to google a cheatsheet for it. You can use ctrl+A, C, to open a new terminal, and ctrl+A, space, to switch between them. Then you don't have to sukkel with installing it on the host. And then the -h arguments are not needed. It defaults to localhost. Quote Link to comment Share on other sites More sharing options...
admiral Posted March 28, 2019 Share Posted March 28, 2019 Uhm, not sure exactly how you are running the docker container - is it with the "run.sh"? With docker you can also "exec" into the running container - so first do a "docker ps", then identify the container id. Then you'd do something like: docker exec -it container_id /bin/bash (replacing container_id with the container id you got in the previous step). It is possible that the image does not have "bash" in it, then I'd replace "/bin/bash" with "/bin/sh". You'll then be inside the docker container, and will be able to run stuff there. Unless I am misunderstanding what you are trying to achieve Quote Link to comment Share on other sites More sharing options...
___ Posted March 28, 2019 Share Posted March 28, 2019 49 minutes ago, admiral said: You'll then be inside the docker container, and will be able to run stuff there Yeah... but what if you need MORE than one shell/terminal? That's why I suggested either installing ssh (so you can log in multiple times over the network), or to use screen (which is included). Quote Link to comment Share on other sites More sharing options...
admiral Posted March 28, 2019 Share Posted March 28, 2019 4 minutes ago, plonkster said: Yeah... but what if you need MORE than one shell/terminal? That's why I suggested either installing ssh (so you can log in multiple times over the network), or to use screen (which is included). I think I'm perhaps just misunderstanding what @georgelza is trying to achieve Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 29, 2019 Author Share Posted March 29, 2019 ... not to worry, give the 2 brain cells some switch off time to just sit and chat between themselves and eventually things start clicking. so ye I went into the container and happily found mosquitto_sub and _pub. when I issue a _pub I only got back: root@902ae0f1054c:~# mosquitto_sub -v -h 127.0.0.1 -t '#' N/0242ac110003/system/0/Serial {"value": "0242ac110003"} and it now waits... for me to publish more to this subject... PS thats all it came back with. how can I see what other subjects there are. G Quote Link to comment Share on other sites More sharing options...
georgelza Posted March 29, 2019 Author Share Posted March 29, 2019 8 hours ago, georgelza said: ... found a /Users/george/Downloads/venus-docker/dbus-mqtt/test, figured i'll try that to unblock the pipe, well this got more interesting... module missing "dbus" and I can't see to get it installed. Brew install dbus completed pip install dbus-python failing. G and same brain cells chatted bout this one also. thinking is the dbus is a module they use for their interface between the data bus and the mosquitto server to publish messages, the test script i found is their test script and not relevant for me to test from outside, all I want to do is use python and subscribe to the mosquitto mqtt subjects. I've gotten mqtt.app to subscribe and issue a wile card # and got the serial number returned as a JSON message so external port subscription works. G Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.