lrybak / hassio-owserver

Provides the owserver instance to read 1-Wire devices over DS2480B-based bus master serial device
MIT License
13 stars 10 forks source link

cant get it working... #9

Closed tomasenskede closed 1 year ago

tomasenskede commented 2 years ago

first attempt was to install it via HA owserver (1-Wire) the install was fine... but I couldn't connect to it with the 1-wire integration...

second attempt was to install the ow server on an prepare pi... clean install and I got it semi-working... I got the folders from my 1iwre-hub but nothing else... the 1wire-integration on my HA-PI couldn't connect to the ow server on the other pi... same as with local owserver installed on the ha pi...

any suggestions on how to get 1wire working on HA?

lrybak commented 2 years ago

What issue you have? I don't really understand your problem.

tomasenskede commented 2 years ago

This is the log from HA when trying to start up the owserver:

1) device? -u?

this is log:

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] owserver.sh: executing... [14:55:24] INFO: Configuring -u device [cont-init.d] owserver.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [14:55:24] INFO: Starting owserver... [14:55:24] INFO: Starting owhttpd...

tomasenskede commented 2 years ago

image

tomasenskede commented 2 years ago

image device?? I have an DS9490r USB attached

tomasenskede commented 2 years ago

image

lrybak commented 2 years ago

Please post your addon configuration.

lrybak commented 2 years ago

Is your device discoverable by HA? Did you confirn it's working at all?

tomasenskede commented 2 years ago

I am running this on HA's image for Raspberry PI... where should I find the config?

I found this map... /config/custom_components/onewire_sysbus with these files image

tomasenskede commented 2 years ago

Is your device discoverable by HA? Did you confirm it's working at all?

If you reefer to the DS9490r, its working just fine with my Windows server... all my 1wire devices are available and working just fine.

tomasenskede commented 2 years ago

image If I run it with empty device, I got the dummy device and then it starts up and web i/f works... but I cant not connect to it from the ha integration.

olalid commented 2 years ago

I believe that the device @tomasenskede is using is not configured as a serial port and therefore does not provide a device node under Linux. Instead you are supposed to provide a different configuration option to owserver: "usb" instead of "device /dev/xxxx". It will then talk directly to the device on a lower level than a device node.

This seems to be impossible to configure currently with this integration due to that it always adds "device" in front of the device node in the configuration file. From owserver documentation: Here is a sample configuration file with all the possible parameters included.

Sources

          device = /dev/ttyS0 # serial port: DS9097U DS9097 ECLO or LINK
          device = /dev/i2c-0 # i2c port: DS2482-100 or DS2482-800
          usb #       USB device: DS9490 PuceBaboon
          usb = 2 #   Second DS9490
          usb = all # All DS9490s

As @tomasenskede stated above he has a DS9490r, so the correct configuration option should most likely be just "usb" as shown above.

lrybak commented 2 years ago

Good point @olalid I will think about fix for that

johnpayne commented 2 years ago

Maybe this is the same question worded differently, but how exactly do I specify a device in the YAML? In my case I have a DS18B20 connected to the GPIO pins. I've tried several different values for device, but the log shows the addin hanging at "[06:32:32] INFO: Starting owhttpd..."

Values i've tried for device:

Thanks!

image image image image

olalid commented 2 years ago

@johnpayne the device you need to supply is the bus master, not the temperature sensor. Since you are using a GPIO it would probably not be a device node, but simply "w1". But as discussed above it is currently not possible to provide that type of option to owserver in this integration. You would also need to load and configure the w1 kernel module: https://pinout.xyz/pinout/1_wire before that could work. (I assume you are running it on a Raspberry Pi here).

johnpayne commented 2 years ago

Yes, running a raspberryPi 3b. Thanks for the reply. That makes sense. Maybe I should run home assistant in a docker container so I have more control over the 1-wire interface...

Thanks!

On Tue, Oct 18, 2022, 10:43 AM Ola Lidholm @.***> wrote:

@johnpayne https://github.com/johnpayne the device you need to supply is the bus master, not the temperature sensor. Since you are using a GPIO it would probably not be a device node, but simply "w1". But as discussed above it is currently not possible to provide that type of option to owserver in this integration. You would also need to load and configure the w1 kernel module: https://pinout.xyz/pinout/1_wire before that could work. (I assume you are running it on a Raspberry Pi here).

— Reply to this email directly, view it on GitHub https://github.com/lrybak/hassio-owserver/issues/9#issuecomment-1282854659, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYEDS6Q6K7I2E3FQM6ORC3WD3VWLANCNFSM6AAAAAARCF5G64 . You are receiving this because you were mentioned.Message ID: @.***>

luftdieb commented 1 year ago

Hi, I'm new in HA and I'm trying to get my DS2940 USB Busmuster ready with my X86 HA installation by using original HA image. I could already install owserver and also HA Plugin can interact with owserver, if owserver run in FAKE mode. But my problem is similar as here already discussed.. the configuration is not clear, what should I enter under "device". By using SSH and run dmesg I can see such output, once I'm connecting USB 1W Adapter:

usb 1-1: USB disconnect, device number 9 [44393.599790] usb 1-1: new full-speed USB device number 10 using xhci_hcd [44393.728733] usb 1-1: New USB device found, idVendor=04fa, idProduct=2490, bcdDevice= 0.02 [44393.728739] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [44393.814146] w1_master_driver w1_bus_master1: Attaching one wire slave 28.ef89591f64ff crc 24 [44393.815988] w1_master_driver w1_bus_master1: Family 28 for 28.ef89591f64ff.24 is not registered. [44393.816079] w1_master_driver w1_bus_master1: Attaching one wire slave 28.978d591f64ff crc 25 [44393.819545] w1_master_driver w1_bus_master1: Family 28 for 28.978d591f64ff.25 is not registered. [44393.819632] w1_master_driver w1_bus_master1: Attaching one wire slave 01.00001a3a860c crc 64 [44393.822957] w1_master_driver w1_bus_master1: Family 1 for 01.00001a3a860c.64 is not registered.

If no 1w devices are connected, dmesg output is reduced and just this is shown [47596.204775] usb 1-1: USB disconnect, device number 10 [47601.856755] usb 1-1: new full-speed USB device number 11 using xhci_hcd [47601.985588] usb 1-1: New USB device found, idVendor=04fa, idProduct=2490, bcdDevice= 0.02 [47601.985596] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [47602.019169] w1_master_driver w1_bus_master1: Attaching one wire slave 01.00001a3a860c crc 64 [47602.021131] w1_master_driver w1_bus_master1: Family 1 for 01.00001a3a860c.64 is not registered. which mean, 1w Busmaster and even owserver docker instance is detecting the 1w devices, once they are connected.

Also path is created like /sys/bus/w1/devices/ which show 2 devices. But once I'm disconnecting both 1w devices, the instances are still shown until I'm restarting owserver. But that's really strange, to see the 1w devices on bash in owserver docker container but not getting the frontend connected to the owserver.

I don't like to use ESP8266 device, because 1w USB adapter I've purchased a few days :-(

I've tried to follow up several instructions like, find the USB device by using HA - Settings- System - Hardware Here I can find the adapter BUSNUM: '001' DEVNAME: /dev/bus/usb/001/011 DEVNUM: '011' DEVPATH: /devices/pci0000:00/0000:00:15.0/usb1/1-1 DEVTYPE: usb_device DRIVER: usb ID_BUS: usb ID_MODEL: '2490' ID_MODEL_ENC: '2490' ID_MODEL_ID: '2490' ID_PATH: pci-0000:00:15.0-usb-0:1 ID_PATH_TAG: pci-0000_00_15_0-usb-0_1 ID_REVISION: '0002' ID_SERIAL: 04fa_2490 ID_USB_INTERFACES: ':ffffff:' ID_VENDOR: 04fa ID_VENDOR_ENC: 04fa ID_VENDOR_ID: 04fa MAJOR: '189' MINOR: '10' PRODUCT: 4fa/2490/2 SUBSYSTEM: usb TYPE: 255/255/255 USEC_INITIALIZED: '47602172230'

But when I try /dev/bus/usb/001/011 as device name, I just get "502: Bad Gateway", if I try to reach webinterface of owserver

Hopefully somebody have an idea :-) It looks, solution is close by... Thanks!

luftdieb commented 1 year ago

I've solved the problem by making a complete cut. Have first installed Proxmox, then HA by provided OVA vmdk file (https://simplecloudbox.com/home-assistant-os-proxmox-7-vm) then install in proxmox 2nd vm with tiny ubuntu without GUI and just owfs. Then just use webinterface of this instance inside HA. Works perfekt with higher flexibility without loosing too much system performance, The assignement of USB 1w adapter works like a charme. You can assign this dedicated usb device inside the selected VM.

johnpayne commented 1 year ago

Thanks! I may try that!

On Wed, Dec 21, 2022, 2:12 AM luftdieb @.***> wrote:

I've solved the problem by making a complete cut. Have first installed Proxmox, then HA by provided OVA vmdk file then install in proxmox 2nd vm with tiny ubuntu without GUI and just owfs. Then just use webinterface of this instance inside HA. Works perfekt with higher flexibility without loosing too much system performance

— Reply to this email directly, view it on GitHub https://github.com/lrybak/hassio-owserver/issues/9#issuecomment-1361181683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYEDS5MS6PL3V6V6ZSOQVDWOLQ2DANCNFSM6AAAAAARCF5G64 . You are receiving this because you were mentioned.Message ID: @.***>

lrybak commented 1 year ago

I have implemented support for usb 1w devices. I also introduced three new repositories (stable, beta and edge aka dev) to allow testing before releasing to stable.

You can read more details here: https://github.com/lrybak/hassio-owserver/blob/master/CHANGELOG.md

USB device support can be tested with v0.3.1-rc1 on beta repository @johnpayne, @luftdieb, @olalid, @tomasenskede

Please let me know if that works for you