[WIP/Released] P1 Data injector

Everything about software tools, new software development and toolchains. For developers, mostly.

Moderators: marcelr, TheHogNL, Toonz

marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: P1 Data injector

Post by marcelr »

Not sure if this version of the openzwave lib supports the meter adapter.
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

marcelr wrote:Not sure if this version of the openzwave lib supports the meter adapter.
Thanks! I'll find out soon :)
libusb is missing the libusbl depedency. Could you upload that one too?

Thanks!
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: P1 Data injector

Post by marcelr »

Done.

And I moved everything to ./ipk/qb2, because that's where it lands after the build on my machine. I have a feeling that there will be more to come, and this way the top subdir for Toon-related stuff doesn't get filled up, keeps everything a bit more tidy.
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

marcelr wrote:Done.

And I moved everything to ./ipk/qb2, because that's where it lands after the build on my machine. I have a feeling that there will be more to come, and this way the top subdir for Toon-related stuff doesn't get filled up, keeps everything a bit more tidy.
Perfect thanks! I'll try it hopefully later today
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

marcelr wrote:Done.

And I moved everything to ./ipk/qb2, because that's where it lands after the build on my machine. I have a feeling that there will be more to come, and this way the top subdir for Toon-related stuff doesn't get filled up, keeps everything a bit more tidy.
openzwave won't install because of the unmet requirement of udev_162, which I installed.

Not sure what's happening here.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: P1 Data injector

Post by marcelr »

Can you post the console output of the install command?
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

marcelr wrote:Can you post the console output of the install command?

Code: Select all

eneco:~# opkg install openzwave_1.4.164-r0_qb2.ipk
Installing openzwave (1.4.164-r0) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for openzwave:
 *      libudev (>= 162) *
 * opkg_install_cmd: Cannot install package openzwave.

eneco:~#
 opkg install udev_162-r12_qb2.ipk
Installing udev (162-r12) to root...
Configuring udev.
 System startup links for /etc/init.d/udev-cache already exist.
 Adding system startup for /etc/init.d/udev.

eneco:~# opkg install openzwave_1.4.164-r0_qb2.ipk
Installing openzwave (1.4.164-r0) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for openzwave:
 *      libudev (>= 162) *
 * opkg_install_cmd: Cannot install package openzwave.

eneco:~# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs             103.3M     61.5M     41.8M  60% /
none                     61.6M     32.0K     61.6M   0% /dev
tmpfs                    40.0K         0     40.0K   0% /mnt/.psplash
tmpfs                    61.6M      3.4M     58.2M   6% /var/volatile
opkg list shows it's installed, so very strange thing happening here xD
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: P1 Data injector

Post by marcelr »

Nope, libudev is different from udev. I just uploaded it. With a little luck it's the last missing package.
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

marcelr wrote:Nope, libudev is different from udev. I just uploaded it. With a little luck it's the last missing package.
It installed! Thanks
I'll try to fiddle with it a little tomorrow
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: P1 Data injector

Post by marcelr »

Not sure through which port ozwcp is serving. You may have to make an extra hole in the firewall. Will check later today.

EDIT:

go to /usr/local/bin/ozwcp ans start ozwcp manually:

./ozwcp

The server will tell you that it's serving to port 8090, so you will have to open this in the firewall:

add:

Code: Select all

-A HCB-INPUT -p tcp -m tcp --dport 8090 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
to /etc/default/iptables.conf and restart the firewall:

Code: Select all

/etc/init.d/iptables restart
Then, open a browser on another machine on your local network and go to:
http://<toons.IP>:8090
This opens the ozwcp console and now you can readout/modify/whatever your zwave network.


EDIT:

One more thing: Your zwave device is /dev/ttymxc2
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

marcelr wrote:Not sure through which port ozwcp is serving. You may have to make an extra hole in the firewall. Will check later today.

EDIT:

go to /usr/local/bin/ozwcp ans start ozwcp manually:

./ozwcp

The server will tell you that it's serving to port 8090, so you will have to open this in the firewall:

add:

Code: Select all

-A HCB-INPUT -p tcp -m tcp --dport 8090 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
to /etc/default/iptables.conf and restart the firewall:

Code: Select all

/etc/init.d/iptables restart
Then, open a browser on another machine on your local network and go to:
http://<toons.IP>:8090
This opens the ozwcp console and now you can readout/modify/whatever your zwave network.
I get an -sh: ozwcp: Permission denied error when executing ozwcp :|
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: P1 Data injector

Post by marcelr »

No need to quote the entire post.

Try: /usr/local/bin/ozwcp/ozwcp

Probably ozwcp is not on your $PATH. Makes sense, since it's an experimental piece of code.
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

I managed to get it all working, but I'm not really sure at this point what I am supposed to use it for :P

Is there any way to get somekind of debugging connection to the MeterAdapter?
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: P1 Data injector

Post by marcelr »

Not that I'm aware of. You can check the packets that are sent to and fro. That's about it. And you can add and control zwave stuff that Toon doesn't support yet.
timkoers
Member
Member
Posts: 77
Joined: Thu Jun 28, 2018 6:43 pm

Re: P1 Data injector

Post by timkoers »

marcelr wrote:Not that I'm aware of. You can check the packets that are sent to and fro. That's about it. And you can add and control zwave stuff that Toon doesn't support yet.
Could you send me the build environment you have for building packages for the Toon? I am going to give gdb a try in order to hopefully debug the hdrv_p1 package so I can have a better understanding of how the code works.

Using that way I can work my way up into the code, which should explain why it is giving me unsollicitated meter report warnings.

Thanks!
Post Reply

Return to “Toon software development”