Giter Site home page Giter Site logo

Error: Invalid argument in OWFS about onewirehub HOT 9 OPEN

palsbo avatar palsbo commented on August 24, 2024
Error: Invalid argument in OWFS

from onewirehub.

Comments (9)

palsbo avatar palsbo commented on August 24, 2024

Ups! I realise that I am using an I2C to OW interface on the Pi but a DS9490 USB plug on the Synology.
Using the DS9490 on the Pi gives the same problem - Invalid argument!

I tried with several DS9490 but with the same result.
ds9490

So - problem changed but still there!

from onewirehub.

orgua avatar orgua commented on August 24, 2024

have you worked through the help section of the readme.md in the root-folder?
propably the problem is connected to issue #43, #35, #23.
or maybe just #25

from onewirehub.

pklarsjo avatar pklarsjo commented on August 24, 2024

Thanks for a great library!

Any progress here? I am using attiny85 and experience the same for each command sent to DS2413. DS2405 is working fine, but I need readback possibility. DS2408 is also working fine with OWFS but is not working well with Domoticz, leaving me with DS2413 as the last option for controlling outputs. So, is there something that I need to try to change, given the fact that with 05 and 08 the timing seems ok?

(Master is a ds2482-800 on RPI)

from onewirehub.

orgua avatar orgua commented on August 24, 2024

@pklarsjo so did you work through my previous tipps? it seems to be that timing-issue. easy to fix by changing one value

from onewirehub.

pklarsjo avatar pklarsjo commented on August 24, 2024

from onewirehub.

orgua avatar orgua commented on August 24, 2024

of course you should! ds2405/2413 does almost nothing on the bus, very short messages. when more memory is involved the ow-messages get longer. timing problems are more likely to occur.

from onewirehub.

pklarsjo avatar pklarsjo commented on August 24, 2024

from onewirehub.

pklarsjo avatar pklarsjo commented on August 24, 2024

ONEWIRE_TIME_MSG_HIGH_TIMEOUT changed to x10, no difference. Some additional info:
Exact command: echo '1' > PIO.A
Reading from device is no problem: cat sensed.A

My code:
/*

  • Example-Code that emulates a DS2413 Dual channel addressable switch
  • Tested with
    • DS9490R-Master, atmega328@16MHz and teensy3.2@96MHz as Slave
      */

#include "OneWireHub.h"
#include "DS2413.h" // Dual channel addressable switch

constexpr uint8_t pin_led { 1 };
constexpr uint8_t pin_onewire { 0 };

auto hub = OneWireHub(pin_onewire);
auto ds2413 = DS2413( DS2413::family_code, 0x00, 0x00, 0x13, 0x24, 0xDA, 0x00 ); // Work - Dual channel addressable switch

bool blinking(void);

void setup()
{
pinMode(pin_led, OUTPUT);

// Setup OneWire
hub.attach(ds2413);

}

void loop()
{
// following function must be called periodically
hub.poll();

// Blink triggers the state-change
if (blinking())
{
            digitalWrite(pin_led, ds2413.getPinState(0));
}

}

bool blinking(void)
{
const uint32_t interval = 1000; // interval at which to blink (milliseconds)
static uint32_t nextMillis = millis(); // will store next time LED will updated

if (millis() > nextMillis)
{
    nextMillis += interval;             // save the next time you blinked the LED
    static uint8_t ledState = LOW;      // ledState used to set the LED
    if (ledState == LOW)    ledState = HIGH;
    else                    ledState = LOW;
    return 1;
}
return 0;

}

from onewirehub.

pklarsjo avatar pklarsjo commented on August 24, 2024

This is getting even more strange. I enabled toggling of the state in the blinking function (ds2413.setPinState(0,ledState);) to see if device is live or not. After some normal 1sec flashes it suddenly freezes on or off. I know for sure it's not rebooting since I have added some fast boot blinks, it just stays for a while longer than expected.

In addition I've tried changing some parameters withou getting any progress (ONEWIRE_TIME_MSG_HIGH_TIMEOUT * 10, ONEWIRE_TIME_SLOT_MAX (120/135/150), VALUE_IPL (12, 13, 14) without any improvements.

Starting to despair... Is someone else using this device; has it been verified?

from onewirehub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.