Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OT: Sonof devices

Featured Replies

@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

 

  • Replies 83
  • Views 14.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • georgelza
    georgelza

    just a matter of time, resistance is futile, you will be assimilated. G

  • I suspect that they would have been flashed, most likely with some closed firmware that is proprietary to the system. If you want to do your own thing you will need to flash TASMOTA - there is a lot o

  • georgelza
    georgelza

    Not sure if any of the owners of Victron systems are aware, Integration with NodeRed is coming, it's going to be more than just publishing via MQTT. https://github.com/victronenergy/venus/is

Posted Images

  • Author
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

  • Author

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

  • Author

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

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.)

  • Author

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

  • Author

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

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 ;)

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.

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 by plonkster

  • Author

... 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

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.

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 🙂

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).

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 🙂

  • Author

... 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

  • Author
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.