Open heiko1988 opened 4 years ago
ok, have already tried both things.
just want to rule out every mistake where I could make
do I have to log out of pimatic?
No you don't have to logout. You are using node v10?
yes i use : Node.js version 10.16.3
Ok. I'm going to change the authentication to device flow. For that i need to change the home-connect-lib and integrate the functions in the plugin. The advantage will be that you get a link/url in the pimatic gui, that is used to authenticate the access. The headless pimatic (like yours) is then supported out-of-the-box. It will take 1-2 days to get a new poc with the device flow.
That is very nice :) let the time where you need is in no hurry I really don't know what I'm doing wrong :)
i'm looking forward to something new to test
I've changed the api library and published on npm version 0.0.4. This should make installation easier 😄 See the readme for instructions
Hi,
Thanks :)
The plugin work fine with the simulation. When I start a sim on the home connect page, I see all in pimatic very fine.
1 problem I have. When I have all finished and work. I make a restart then come this
14:20:17.064 [pimatic] New device "CoffeeMaker Simulator"... 14:20:25.553 [pimatic-deebot] Cleanings 1 14:20:27.887 [pimatic-echo] started hue emulator on port 80 14:20:27.923 [pimatic-sysinfo] Mounted File Systems: /, /boot 14:20:27.932 [pimatic] An uncaught exception occurred: TypeError: Cannot read property 'getAppliance' of null 14:20:27.932 [pimatic]> at Timeout._onTimeout (/home/pi/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:244:29) 14:20:27.932 [pimatic]> at ontimeout (timers.js:436:11) 14:20:27.932 [pimatic]> at tryOnTimeout (timers.js:300:5) 14:20:27.932 [pimatic]> at listOnTimeout (timers.js:263:5) 14:20:27.932 [pimatic]> at Timer.processTimers (timers.js:223:10) 14:20:27.932 [pimatic]> This is most probably a bug in pimatic or in a module, please report it! 14:20:27.934 [pimatic] exiting...
Pic
Hi, i did a small adjustment in version 0.0.5 for this error. But the plugin was working and when came this error?
Exactly, the plugin itself works.
The data from the simulation are displayed in pimatic.
Only a restart is not possible.
Ps: I'll update right away and give you feedback
Hi,
Saim fail with same error description.
When I delete the simulation device in the config.json then pimatic starting normally with no errors.
you created the HomeconnectManager device and used the Grant Flow credentials in that device?
If you have done that without any homeconnect devices, what happens if you restart?
I added an extra check on restart. The function that automatically starts a device after discovery is probably causing the error at restart. -> version 0.0.6
you created the HomeconnectManager device and used the Grant Flow credentials in that device?
Yes is it, and the home connect manager device is created wit id and secret
Ok I update and check again
Thank you, Now the simulation work fine And restart work :+1:
Can I use only for simulation? Or physically coffeemaker
On the basis I also have a small project. So that I get my coffee fully automatically in the morning
A small motor and a treadmill. When the coffee machine starts, the rinsing water goes into one cup and the coffee into the other
Thats nice. I need to add something, because the logic is that you are connected to the simulator or to the real world. When you have already simulator devices and you are changing to real world and back, the sim or the real devices need to be disabled.
I'm moving the selection of - simulation vs live - back to the plugin level. Thats much clearer and the only disadvantage is the restart thats needed when you switch between live and simulator
Yes, that's completely ok. You don't usually switch between simulation and real so often
I published version 0.0.8 with the credentials and simulator choice in the plugin config. When you enable Live (= disable simulator) in the HomeconnectManager the authorisation url will be under the Link (popup of the label) I can't test the live mode. So let me know 😅 and its just reading status, no actions yet!
Year the physical coffe machine work very fine
Is there a status for the rinse program?
That would be important for my project, the progress in percent can only be seen in the program.
Ps: the buttons who see of the pic is over ifft
The CoffeeMaker, Washer, Oven and Dishwasher are supported. I can easily add the rest. But the device you having is also determining what the options and statuses are. The progress for the Washer is available (if that is what you mean by rinse)
what would be logical actions to have? Buttons can be easily created from that
The Google translated, it does not think so in a nutshell;) So when I start the coffee machine, it does a cleaning with normal water. Then I can start a coffee The start process is called normal in German spülen or reinigen
Button Kaffee an Start the coffee machine Button kaffe aus turn off the coffee machine Kaffe schwarz start a coffe black, With the settings where and the machine are already set Button latte start a coffe latte, With the settings where and the machine are already set
Button Telegramm is a test by me to notify in telegram ;)
Ok i understand, the rinse is not something i found in the api, but i'll check I'll test the commands
I have a error ;) Come every second
18:52:48error [pimatic-home-connect]: Terminated events stream for all appliances: Home Connect API error: Gateway Timeout
Then I have restarted pimatic no errors come more , now status of home connect manager is initialisiert. And become no info to the coffee maker. See pic
Ok I have add a new device home connect Manger, and restart and all work :)
And give the stat out of beans and water is empty?
In the CoffeeMaker Device gui the beans is called Strength and water is called FillQuantity
ok,
i have check on the coffeemaschine the FillQuantity say how many ml should be in the cup
Say nothing water empty
And
Thats correct i think. In the simulator you can set it between 100 and 300
besides starting the program you to set the Strength and the fillQuantity?
I don't think we're talking about the same :)
i mean message water tank empty in pimatic nothin see
besides starting the program you to set the Strength and the fillQuantity?
i make this direct on the coffe maschine, and only start the programm over pimatic in this time.
if you integrate it then I can also do it via pimatic;)
but that is not so important because I mostly use the same coffee settings anyway
You are talking about the status of the water reservoir and the beans?
Exactly, that's what I mean
I didn't found any status info on beans and water. Is the app providing this info ? In version 0.0.10 you can do the basic commands start and stop. Pause and resume is not supported on any of the simulator devices.
I didn't found any status info on beans and water. Is the app providing this info ? In version 0.0.10 you can do the basic commands start and stop. Pause and resume is not supported on any of the simulator devices.
In the home connect app and In ifft becomes this info for beans and water.
The iobroker home connect plugin have this. https://github.com/dna909/ioBroker.homeconnect
Maybe you can find something here in the source code
Thanks for updating, I test it.
I added the supported for events status of the supported devices. So BeanContainerEmpty and WaterTankEmpty could work and even DripTrayFull Can't test it because because the simulator doesn't support this, but i will hear if this is working. Version 0.0.14
Ok. Thanks i try this later. And give here a feedback.
Update: Unfortunately I didn't make it today. To get the container full ;) I will contact you as soon as I have made it. And work or not.
Thanks again for your efforts and that you are always so fast
so i have update:
WaterTankEmpty and DripTrayFull.
become this error:
error [pimatic-home-connect]: Terminated events stream for all appliances: Parse Error 15:35:14error [pimatic]: An uncaught exception occurred: TypeError: Cannot set property 'value' of undefined at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:400:11) at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:334:18) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeConnectAPI.<anonymous> (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:318:14) at HomeConnectAPI.emit (events.js:198:13) at dispatch (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:710:51) at requestStream.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:744:56) at chunk.split.forEach.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:58) at Array.forEach (<anonymous>) at IncomingMessage.response.on.chunk (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:42) at IncomingMessage.emit (events.js:203:15) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:265:13) at IncomingMessage.Readable.push (_stream_readable.js:224:10) at HTTPParser.parserOnBody (_http_common.js:124:22) at TLSSocket.socketOnData (_http_client.js:451:20) at TLSSocket.emit (events.js:198:13) at TLSSocket.emit (/root/pimatic-app/node_modules/pimatic/startup.coffee:64:24) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at TLSSocket.Readable.push (_stream_readable.js:224:10) at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) This is most probably a bug in pimatic or in a module, please report it! 15:35:13error [pimatic-home-connect]: Terminated events stream for all appliances: Parse Error 15:35:13error [pimatic]: An uncaught exception occurred: TypeError: Cannot set property 'value' of undefined at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:400:11) at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:334:18) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeConnectAPI.<anonymous> (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:318:14) at HomeConnectAPI.emit (events.js:198:13) at dispatch (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:710:51) at requestStream.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:744:56) at chunk.split.forEach.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:58) at Array.forEach (<anonymous>) at IncomingMessage.response.on.chunk (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:42) at IncomingMessage.emit (events.js:203:15) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:265:13) at IncomingMessage.Readable.push (_stream_readable.js:224:10) at HTTPParser.parserOnBody (_http_common.js:124:22) at TLSSocket.socketOnData (_http_client.js:451:20) at TLSSocket.emit (events.js:198:13) at TLSSocket.emit (/root/pimatic-app/node_modules/pimatic/startup.coffee:64:24) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at TLSSocket.Readable.push (_stream_readable.js:224:10) at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) This is most probably a bug in pimatic or in a module, please report it! 15:35:12error [pimatic-home-connect]: Terminated events stream for all appliances: Parse Error 15:35:08error [pimatic]: An uncaught exception occurred: TypeError: Cannot set property 'value' of undefined at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:400:11) at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:334:18) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeConnectAPI.<anonymous> (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:318:14) at HomeConnectAPI.emit (events.js:198:13) at dispatch (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:710:51) at requestStream.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:744:56) at chunk.split.forEach.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:58) at Array.forEach (<anonymous>) at IncomingMessage.response.on.chunk (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:42) at IncomingMessage.emit (events.js:203:15) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:265:13) at IncomingMessage.Readable.push (_stream_readable.js:224:10) at HTTPParser.parserOnBody (_http_common.js:124:22) at TLSSocket.socketOnData (_http_client.js:451:20) at TLSSocket.emit (events.js:198:13) at TLSSocket.emit (/root/pimatic-app/node_modules/pimatic/startup.coffee:64:24) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at TLSSocket.Readable.push (_stream_readable.js:224:10) at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) This is most probably a bug in pimatic or in a module, please report it! 15:35:07error [pimatic-home-connect]: Terminated events stream for all appliances: Parse Error 15:35:03error [pimatic]: An uncaught exception occurred: TypeError: Cannot set property 'value' of undefined at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:400:11) at HomeconnectDevice.getProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:334:18) at HomeconnectDevice.setProgramOrOption (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:1:1) at HomeConnectAPI.<anonymous> (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:318:14) at HomeConnectAPI.emit (events.js:198:13) at dispatch (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:710:51) at requestStream.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:744:56) at chunk.split.forEach.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:58) at Array.forEach (<anonymous>) at IncomingMessage.response.on.chunk (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:42) at IncomingMessage.emit (events.js:203:15) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:265:13) at IncomingMessage.Readable.push (_stream_readable.js:224:10) at HTTPParser.parserOnBody (_http_common.js:124:22) at TLSSocket.socketOnData (_http_client.js:451:20) at TLSSocket.emit (events.js:198:13) at TLSSocket.emit (/root/pimatic-app/node_modules/pimatic/startup.coffee:64:24) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at TLSSocket.Readable.push (_stream_readable.js:224:10) at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) This is most probably a bug in pimatic or in a module, please report it!
I saw the BIG error message and released an update to catch that error. Can you post the debug message?
there is nothing in the debug log, only got that as an error
did you install version 0.0.15? On the line the error occurred, i placed a try/catch to get the info in a debug message.
yes i have updatet to 0.0.15 no in the debug log
only the error come on startup the coffe maschine.
error [pimatic-home-connect]: Terminated events stream for all appliances: Parse Error 20:22:11error [pimatic]: An uncaught exception occurred: TypeError: Cannot read property 'length' of undefined at HomeConnectAPI.<anonymous> (/root/pimatic-app/node_modules/pimatic-home-connect/pimatic-home-connect.coffee:325:11) at HomeConnectAPI.emit (events.js:198:13) at dispatch (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:710:51) at requestStream.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:744:56) at chunk.split.forEach.line (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:58) at Array.forEach (<anonymous>) at IncomingMessage.response.on.chunk (/root/pimatic-app/node_modules/pimatic-home-connect/homeconnect_api.js:834:42) at IncomingMessage.emit (events.js:203:15) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:265:13) at IncomingMessage.Readable.push (_stream_readable.js:224:10) at HTTPParser.parserOnBody (_http_common.js:124:22) at TLSSocket.socketOnData (_http_client.js:451:20) at TLSSocket.emit (events.js:198:13) at TLSSocket.emit (/root/pimatic-app/node_modules/pimatic/startup.coffee:64:24) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at TLSSocket.Readable.push (_stream_readable.js:224:10) at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) This is most probably a bug in pimatic or in a module, please report it!
I added more error handling in version 0.0.17 The problem is i can't test the BeanEmpty, etc events, so you are the tester I need the eventdata, that is emitted when the Water, Bean and Tripping events occur
Ok. I have updated to 0.0.17
On startup the Maschine no errors and nothing in debug log.
I can give you tomorrow my login details for My home connect or we can work over teamviewer. Then can you check all you need. And I can physically empty water, beans etc.
yes that could be options to speed up the debugging. I changed also a bit the handling of the events. thats could be a solution. Let me know when you have time tomorrow to choose the approach for debugging. And lets move to the chat.
Ok. Thanks.
I wirte you tomorrow
Hi,
I have installed the plugin in pimatic directly over github. I have type my client ID and secret key.
No device found from home connect and no debug message in pimatic.
Can you write a little guide on how to set it up. I know it's a concept for now