State O-Matic Binding - Monitor your Washingmachine / Dishwasher / Electric Car Etc

Yes, I use the latest binding, I’ve cheked it. I run shell:threads |grep omatic, I see one line only:

"pipe-grep omatic" Id=6904 in TIMED_WAITING on lock=java.io.PipedInputStream@15caaf0

(Currenty the washingmachine and the dryer is switched off, they are not running)

I use openHAB 3.2.0.

That’s a bit wierd you don’t have any threads running. Please post your threads when you get the lock behavior by doing the grep. I assume you have restarted openhab?

Best regards s

Yes, It was after I restarted openhab. Now I cleaned openhab cache, opened openhab console and run:

openhab> shell:threads |grep omatic
"pipe-grep omatic" Id=1971 in RUNNABLE

Than I started the dryer only and I got:

openhab> shell:threads |grep omatic
"OH-omatic-1" Id=1900 in TIMED_WAITING on lock=java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@ee4b06
"pipe-grep omatic" Id=1902 in RUNNABLE
"OH-omatic-2" Id=1904 in TIMED_WAITING on lock=java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@ee4b06

Than I stopped the dryer and I run it again:

openhab> shell:threads |grep omatic
"pipe-grep omatic" Id=2117 in RUNNABLE

I will try to post the threads when I get the lock but I have to run a long washing program I think so I will do it as soon as possible.

1 Like

hello, i’m trying to test the new binding…for the moment non hangs for me.
i’ve just seen that now if the given power item is set as number:power or number:energy i see these on log:

2022-03-09 10:27:21.276 [ERROR] [al.handler.OMaticMachineThingHandler] - Failed to parse value from event {"type":"Quantity","value":"0 W"}
2022-03-09 10:27:21.292 [ERROR] [al.handler.OMaticMachineThingHandler] - Failed to parse value from event {"type":"Quantity","value":"13 Wh"}

the binding seems to work but nevert stop the running counter and so never change the state from running to idel and so on.
so i needed to set the power and the energy item as number and the binding imediately updated to idel and finished.

also default value for items runningtime and total runningtime need to be changed to number and not as default defined as string.

keep checking if also mine hangs.

thanks a lot for your great job!

I’ve built an ALPHA7 which parses the Quantity type. I’ve only tested it with a unittest, since in my setup I have problems producing Quantity types, so if you could verify it would be great.
I’ve also changed the total-running-time to a Number. If you want that change you will have to delete your thing (loosing data associated with it) and readd it.

Br S

testing the alpha7 same error:

2022-03-10 11:13:59.764 [ERROR] [al.handler.OMaticMachineThingHandler] - Failed to parse value from event: {"type":"Quantity","value":"1765.013 W"} type: ItemStateEvent stringValue: 1765.013 W

was ok if the input item is set as number, but after configuring thing and omatic items, if i switch the input item to number:power and energy item to number:energy, it immediately throw the error.
all other issues seems to be gone. testing again for hanging :wink:

Dear @Seaside! I’ve tested the binding in the last two weeks. I installed the lastest version and cleaned cache in the console. After this everyting is all right, the bindig works great. Thank you for your great job!

1 Like

also parsing the “quantity” “value”?

Thanks for the binding.
I normally use text file configuration since I find it easier to edit and expand the number of things. I know it is recommended to configure the machines via the UI but I tried to configure one thing as below. The problem is that the thing does not calculate the consumption. Is text configuration supported? If yes, what could be wrong?

Thing omatic:machine:State_Machine_Ventilation "State Machine Ventilation" [cost=1,  dateFormat="YYYY-MM-dd HH:mm:ss", name="Ventilation Unit", activeThreshold=5, timerDelay=10, idleTime=50, powerInputItem="Ventilation_Power"]

On the things configured from the UI I can see there are some properties created, which do not exist if the thing is configured as above:

Hi!

Not supported in the sense that I have not documented it. But it is standard OpenHab to be able to manually specify things and items. I have created a thing manually just now as per the same configuration you have. Are you sure you have linked the correct channels to you item things? you can go into the OpenHab ui and check if you have links on Thing to items.
In case you don’t specify an energyInputItem you will only get estimated energy.

The thing properties are only stored if the state machine cycles (ie going from active to idle to complete)

Added alpha9 build with an additional deadlock issue that could happen.
More fixes for quantity types

Yes, this is the case but I had made mistake in the calculation of the power input so it stayed 0 all the time. After fixing it only Max power property appeared

In this case my ventilation unit is constant on, with possibility only to change the ventilation capacity (15%, 50% & 100%). Is there a way to get the energy? The machine is always in active state

The channel will always be updated. It is only the properties that are used if you restart your openhab instance. I’ll add something that will store the properties periodically as well.

1 Like

I’ve managed to reproduce this issue, will fix it with the next build.

Best regards s

hi! also alpha9 has the “quantity” & “value” error.
to be sure i have removed old binding, installed new one, updated openhab installation and rebooted everything. no success. tried to remove :power from item, and the error disappeared. added again and the error shown again. :frowning:
damn error won’t go away :wink:

I think something is not OK with the textual setup of the binding. I alse use files to set the paramteres, but when I changed the values it does not got updated in the UI and did not work properly. (I wanted to change the idle time values with no luck, and I did not understand why doesn’t it work as It should until I noticed that the old values are listed in the openhab UI.

This is when creating things with text config? You might have to delete the thing and restart to get it to be updated. It should follow standard Openhab but I’m unsure what the standard behavior is, since I rarely use manual things. I have some mqtt things specified and if I change those I have to restart openhab for them to take effect. Can you update config for things in other bindings by changing the manual thing item without restart?
If so do you get any exceptions in the logs for omatic?

Yes, the fix is in alpha10 for parsing. I switched to using OpenHAB Core for parsing.

BR S

Added alpha10 build

Oh yes! you got it! Great!
keep checking for anything else strange, but for me everything should be okay.

One more little thing…can you preset “RunningTime” & “TotalRunningTime” item creation, as (for example) “RunningTimeStr” & “TotalRunningTimeStr”?
because when we create “RunningTime (Number)” item, propose the same name as the creation of item “RunningTime (String)”, and of course the same is for “TotalRunningTime”.