BUG in the 4.0 version with an completly inverted DS2408

Hi Parecy,

I tried to upgrade from the 3.4 version to the 4.0 version but sadly I found a problem in the new 1-wire module inside IP-symcon 4.0 (latest beta build). The problems is only related to a completly inverted DS2408 module.

I have three ‘inverted’ DS2408 relay boards from hobbyboard that won’t work with the 4.0 version. Inverted means that readings but also the commands are inverted. For example: I have to send the False value to switch something On: TMEX_F29_SetPin(28114 /[Hardware\1W\IO Boards\IO (Staircase)]/, 7, False); //Switch Light On. And the True value to switch it Off again: TMEX_F29_SetPin(28114 /[Hardware\1W\IO Boards\IO (Staircase)]/, 7, True); //Switch light Off.
Also the Inverted switch in the configuration is set for all the Digital Output ports.

The 3.4 version of IP-Symcon with TMEX works perfectly with this board and all the inverted commands! Sadly the 4.0 version doesn’t, also not when I use the OW_SetPin commands. Not only strange things happen with the readings in the user interface: after switching something off (sending true value) in the user interface it changes to the positive value to be changed back again when a reading has been done to the negative value and visa versa. Also when switching something off (sending a true value) I get a 1–wire write error (this does not happen in the 3.4 version). The command is executed, in the user interface is switches value, and later on it’s correct when the reading. When i have multiple switches in the userinterface ALL switches change value (only in the userinterface not on the DS2408).

Some background information: I upgraded from the 3.4 version and switched from the blue usb dongle to the linkusb dongle. The LinkUSB dongle reads all the values of the digital thermometers fine (8 of them). Also other components like a humidity meter and a light intensity meter work great. Only the three DS2408 from hobbyboard don’t work with the 4.0 version.

I already changed back again to the 3.4 version. Later on I will try to use the LinkUSB in the 3.4 version to rule this out.

Regards,
Robert :confused:

I have tripple-checked this bugs and i could find a buggy in the reading values function in IP-Symcon 4.0.

[b]But: The invert bug for single pins exists in both IP-Symcon 3.4 and 4.0+! It never worked!

[/b]Therefore i am surprised that it worked in 3.4 for you. It shouldn’t have had. I cross-checked with the last 3.4 release.

Anyways… i fixed both bugs for the next 4.1 update.

paresy

Hi Paresy,

Thanks for the quick reply and checking it in the code. If you want to have a look in the 3.4 environment just let me know. It has been working fine for many versions (from years back ;). I can also setup a 4.0 environment for you to have a remote look at, that’s hooked up with the inverted DS2408. I don’t think there are many inverted DS2408 out there!

Take care,
Robert

Hi both

I use a couple of DS2408, all channel are used as output.
So far I did not recognize any change in behaviour since early beginning with IPS2.0.
Everything normal, or lets say, same as ever.

best rgds
bb

Hi Bernhard,

Are yours DS2408 also inverted? Meaning that you must send a False to the pin to get it energized and not the True statement? A builder of a board may use the DS2408 in two ways. Normally the builder uses the true statement to energize an output. Hobbyboards have done it the opposite way than ‚normal‘ (according to the documentation both are allowed that’s why there is a ‚Inverted‘ check mark option I think). For reading and showing the current status you have two options (I think that’s why there are 16 rows ;). Love to hear if yours are inverted to and how you switch and show them in the user interface!

The 3.4 build I currently use is #3801. I still have to change the blue dongle for the Linkusb in the 3.4 version to see if I get 1-wire errors with the inverted DS2408, hopefully not :D?

Take care and thanks for the reply!!!
Robert

Hi Robert

Frankly said actually i do not know if something is inverted or not. I use the DS2408 in my own made boards. There are one further inverter on the board, and in the scripts as well.

But what i can definitely confirm that the behaviour is same for all version.
For IPS2.x and IPS3.x I used the „Blue“ adapter.
For IPS4.0 the „LINKUSB“.

best rgds
bb

@Robert: Can you retry with the newest 4.1 build?

paresy

@Paresy: will do tonight or tomorrow and will let you know asap.

Robert

@Paresy:tried to install the 4.1 #82 version but it stops at the point of the Visual C++ 2015 Update 3 Redistributable. The setup tries to install the x86 version while it must be the x64 version (its a 64 bits machine). I get the following error from the logfile:

[0F00:11E8][2016-08-31T21:51:45]i052: Condition ‚(VersionNT = v6.3 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)‘ evaluates to true
[0F00:11E8][2016-08-31T21:51:45]i101: Detected package: Windows81_x64, state: Present, cached: None
[0F00:0F28][2016-08-31T21:51:49]e000: Error 0x80070666: Cannot install a product when a newer version is installed.

Also a manual install of the x86 results in almost the same error. Sadly I didn’t find a way to continue around the persistent installation of the Visual C++ 2015 Update 3 Redistributable. Set-up comes back with the required installation of the x86 version. The x64 version of Visual C++ 2015 Update 3 Redistributable was already installed on the system!

Take care,
Robert

You seem to have installed Visual Studio with the newest updates? I will post an new version in the afternoon, which incorporates the newest Redistributable update.

paresy

Good morning Paresy,

No visual studio installed. I just downloaded the latest version from the Microsoft site to see what went wrong.Because the error disappears so quickly in your setup I had to do it manually.

This morning I have more time to look into it. I de-installed both the x86 and the x64 version of the 2015 redistributable (Plex server wasn’t starting any more so I think the redistributables came from plex ;). Now the ip-symcon 4.1 installation continued and installed without a problem.

After a reboot the strangest things started to happen. When I switch on a light a pump start running. Also lot’s of buttons connected to the DS2408’s changed values and other things went on and off (like the boiler and the watering of the garden ;). I intimidate killed the 4.1 service and went back to the 3.4 version, all is stable again. Because I am running it on a production environment I will start to build a 4.1 environment from scratch and hookup a DS2408 with nothing attached to it.

I now have the 3.4 version running with the LinkUSB (no blue DS somthing R any more). I only get an 1-wire error when I switch something rapidly on and off. Left everything standard so probably have to do some reading how to configure the LinkUSB. I will leave this running for a while.

The bad news: I don’t think you fixed the bug but made it a little bit worse. Or something else goes wrong…

Robert

Hi,

Quick update: build a test environment with the blue stick, an inverted DS2408 from hobbyboard and the 4.1 build # 82.

Started with the same configuration as the production environment: port 0,1,2 and 6 as Output and the checkbox ‚inverted‘ checked on ports 0, 1, 2 and 6. The reading interval was set to 0. Pushed the On(0) button in the Test-center and all went on (so port 0,1,2, and 6 went on) when pushing the Off(0) button all went off. When pushing the On(0) button twice first ports 0,1,2 and 6 come on, pushing button On(0) again only port 0 stays on. If I now push the Off(0) button port 0 goes off and all the other port go on. Similar happens when pushing On(1) and Off(1) etc. I can build a nice flashing Christmas tree out of them, if you want I can put it on youtube, hahaha.

Now looking at the interface, I still have the interval set to 0! The latches follow exactly what has been switched on or off. So when port 0 is on the interface shows true. The input ports all show False on the latches and True on the status fields (you mix False and Off, but all are on 0 ;). Now I set the Interval to say 10 seconds and after the 10 seconds the input values change (so the starting point was not okay).

After a few hours of playing I came to the following conclusion:

  1. Don’t use the Invert option for Digital Outputs, the latches go everywhere ;). If I leave them off they work normally.
  2. Invert for Digital Inputs works okay for the Status fields . Don’t look at the Latch values because they also go everywhere (same behaviour as with the outputs) .
  3. Default the States fields are not set correctly. After the first reading they will be set correctly. In my case default is On and after the first reading they switch to Off. When inverted the default value is still Off.

Above behaviour does not exist in the 3.4 version using the TMEX drivers;).

Take care , I am off to the beach ;).
Robert

I could verify the issue and indeed made it worse :slight_smile: My bit-magic seems a bit rusty. I hopefully got it right this time. I will post another update in the afternoon!

paresy

@Paresy: Last night I read that there is a special bit for switching all on and off. I think you moved to many bits and went into the special area ;). So instead of being rusty I would say your are adding special effects :p.

I still have the test DS2408 set up so will try the new special effects when you are ready, LOL

Robert

@paresy: you may close this bug ;). Works like a charm!

I now understand why you say it never worked well before. I have to make some small adjustments in my code (nothing drastic). The good thing now is that with every Inverted option checked the DS2408 board from HobbyBoard now reacts like a normal DS2408 board. Good Job!!! I will also change every line to the OW_Pin function.

Love to hear when it’s save to move over to the 4.1 version!

Thanks,
Robert :loveips: