Hi,
using 3.1p1 compiled on Ubuntu 14.04, using new HB Master Hub on USB.
/opt/owfs/bin/owserver -d /dev/ttyACM0
+ owhttpd + owfs
There is something strange in PIO behaviour with DS2405. I think there is a small bug there.
You can switch between On/Off with echo 0 > ./PIO but echo 1 > ./PIO has no effect.
It should be echo 0 switch it Off and echo 1 switch it On
Also, cat ./PIO always return 1, whatever real state is.
And I get the same trouble using the web console.
Thanks,
Klona
Don't have a DS2405 in my box, so I cannot reproduce your problem. But reading the datasheet, please note the PIO output of the DS2405 is open-drain. That means, by onewire commands you can connect the PIO with ground only. The other state isn't high, but FLOATING, and as the output has very high off-impedance, it crawls back to high when there's nothing connected but a digital multimeter. If you want instant-high, you have to apply a pullup to +5V (of 1.5kOhm at least.)
On addition, please read from the uncached directory when debugging, as the cache for volatile properties outdates after 15s only.
Kind regards
Jan
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests (dead)"
Hi Jan,
Thanks.
Your point is interresting. I did not realize that the new HB master Hub may not have power injector as previous version.
I'll check all that and apply extra 5V powersupply on my 2405 boards and do some more testing, probably in a few days only, no time right now.
Thanks for your reply.
/Klona
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests (dead)"
Hi,
I added a real external power to avoid any trouble.
I get same results.
cat uncached/05.E00432000000/PIO gives 1 as result whatever the real state of the relay
echo 1 > uncached/05.E00432000000/PIO do nothing at all
echo 0 > uncached/05.E00432000000/PIO change relay status from Off to On or On to Off
/klona
I also just buy a HB 8 relays based on 2408 and this one works fine , as least with 10 minutes testing
Last edit: Klona 2016-01-28
Do you have connected +5V to PIO by a 1.5kOhm (or more) resistor, as advised?
The DS2405 is special because the only PIO commands the chip has are READ and TOGGLE, neither set nor reset. So owfs first reads the PIO state from the chip, then issues the TOGGLE command when neccessary. If the PIO state cannot be read properly, that machinery obviously has to fail.
Last edit: Jan Kandziora 2016-01-28
Ok. I underdand. Thanks to take time to explain..
It's HB 4 relay v3.1. I found v3.2 schematics and I am not sure to read it correctly as there is the relay stuff on PIO with a first 1K resistor, but also 2406 connected to 2405 PIOs. File is attached. I requested v3.1 schematics to Eric from HB, so I should have the good schematics soon.
This board were working fine with OWFS 3.0 but a serial master hub instead (dead now) of the new USB one.
Ah, a hell of a schematic. The relays are turned on whenever a current flows from right to left through R1, R3, R5, R7. So, if either PIO of the attached DS2405 or PIO.A/PIO.B of the attached DS2406 is pulled to GND inside the chip. PIO pins are pulled high, so there shouldn't be a problem with that. But, what sure is a problem is the DS2405 pin is connected to the DS2406. So if a DS2406 PIO is pulled low, the connected DS2405 sees low at its own PIO pin and owfs will always toggle the DS2405's own PIO because of that.
Question: why don't you use the DS2406? The DS2405 are simply not needed in this application. Just leave them alone.
Well, i understand why I did not understand the schematic..
I just don't use the 2406 as only 2405 are listed with OWFS..
05.300332000000
05.A10832000000
05.D60932000000
05.E00432000000
10.208E39010800 (This is just a DS1820 also connected but not related at all to this thread)
I attached a ls -R on the 1wire owfs.
I have a new board fully working so I can simply use it and stop bother you. That's just frustrating.
On the other hand, if you find the game insterresting, I can give you a remote access to my ubuntu VM with hardware connected.
/Klona
Last edit: Klona 2016-01-29
In that case, I understand what Eric has done and why. Please check the board whether there is any DS2406 mounted on it. I doubt it. I bet Eric made different variants of the board, depending on whether his stock of DS2405 or DS2406 was bigger. You have the DS2405 variant of the board, so remove the DS2406 circuit from the schematic to match your board
And if there's no DS2406, it cannot cause a problem. Leaves me a bit clueless. Your problem is clearly related to the fact the input state at the PIO pin cannot be read properly.
Oh. Stupid am I. I have the board in front of me and I didn't notice. There is no 2406, only empty space, surely to use 2405 or 2406 depending stocks as you mention.
Ok, there is a mystery there, even more as this board was working fine for years with previous OWFS versions, but an old serial master hub, not the new USB one.
I will check cith eric, perhaps some glitch in the firmware of the board, as he added some in the master hub.
Thanks a lot for your help Jan, for your time and effort, and for all the OWFS project.
Case can be closer as it seems clearly problem is not on OWFS.
Thanks
/Klona
It's kind of fate, but now I discover I also have a trouble with temperature devices.
DS1820 reported as 10.xxxxxxxxxxx works well, but DS1820 reported as 28.xxxxxxxxxx are present but hang OWFS in an infinite loop as soon as your try to read from..
I attached the log, if you have still a bit of time for me. I would like to get your point on this..
/Klona
DS18S20 has family code 10. DS18B20 has family code 28. They share the same driver code in module/owlib/src/c/ow_1820.c.
I see problems with the masterhub you use at the end of your log. Don't have such a device. Which version of OWFS was okay for you? The last masterhub changes came with 2.9p6. Could you check with 2.9p5 against 2.9p6?
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests (dead)"
Hi, thanks Jan.
I was using a master hub SERIAL with OWFS 2.9 up to 3.0 on ubuntu 12, without any single problem.
Then my masterhub serial failed and I bought a new one, the new USB one as serial are not anymore available at HB.
I did a full new VM with ubuntu 14.04, latest domotiga and Gambas3, plus latest OFWS to support this new masterhub.
2405,DS18B20 are there for a while now and were working fine with the old materhub.
As 10.xxxx, 26.xxxx, 29.xxx ,EF.xxx are working perfectly; I think there is a problem somewhere with the new master hub, either in the OWFS driver for it or in his embedded firmware.
it's perhaps a misconfiguration on my side, but as other devices are working fine, I don't see what could be wrong.
I will try 2.9P5 on my old ubuntu 12 VM and let you know.
Klona.
Hi,
In fact I did another test, as I found an old DS9490R USB controller.
Both DS2405 board , 2405 on home-made relays and DS18B20 28.xxx are working fine, with OWFS 3.1.
I can just not plug all together, but that normal with my wire topology.
But this means there is nothing wrong with core code of OWFS 3.1.
It may be some compatibility problem with the new USB Master-Hub, so it's worth investigating.
Last edit: Jan Kandziora 2016-01-31
Ok, thanks. I sent a mail to Eric to ask him to have a look on this thread. This could help also.
Any idea of any more testing I can do ?
I can also easily gives you full access to the VM for testing with hardware connected.
For now all my domotic system is down, so no risk.
/klona
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests (dead)"
Hi,
2 months later I am back. No news from Eric but as he's stopping his 1wire business, I guess this is the end.
Still same troubles and found a workaround using both basic USB 9490 and HB board to manage all different devices.
Hopefully, OWFS is smart enough to manage 2 controllers same time.
Regards,
Klona