Another issue is that home-assistant is replacing ‘-’ by ‘_’ in device-id’s.
Thats tricky if you want to use device-id as key. If ther’s a mismatch of keys, hass and Pimatic will not sync. And that problem is only for 2-way devices
@OrTiN can you do a test with an device with an ID with only letters?
-
New plugin pimatic-hass
-
Sure I will come back to you with result tomorrow (today )
-
With the newest version 0.2.22 it seems to work everything.
NOTE: Take care, that the MQTT integration tooks over the config you added basing on the Wiki of the plugin in the configration.yaml. In my environment the config was not overwritten. There was still the
homeassistent/status
.It must be this:
birth_message: topic: 'hass/status' payload: 'online' will_message: topic: 'hass/status' payload: 'offline'
-
Update pimatic-hass version 0.2.29
Added features:
- variables and attributes sensor. Expose variables of a VariablesDevice or all attributes of any Pimatic device to Hass as sensor data
- thermostat (DummyHeatingThermostat, DummyThermostat and TadoThermostat)
- availablity status in Hass
More info readme
-
I have updated to 0.2.27. Its the latest which was provided. With this version after Hass restart the entities from Pimatic are not coming back. WIll go back to 0.2.26 to ensure its related to the update. Before it works fine.
Same behavior on my productive system. Went back to 0.2.26 and it works again.
-
In 0.2.27 i introduced the availability status. If pimatic restarts or stops, or the hass device restarts, the status in Hass per entity will go to ‘unavailable’. After restart the status will go back to normal (available).
This is a better way, than the yellow block telling that the entity is unavailable or the entity looks still working but doesn’t respond.
I fixed the restart issue in version 0.2.28.
@OrTiN if you can test and hopefully confirm that the fix works. -
0.2.28 works again. The new “unavailable” is working as described. During restart (Pimatic or Hass) it will be indicated this way, really nice!
A thermostat is shown without any info, but this is better as showing the last state. After the restart is completed all entities are updated with the current state of pimatic! -
I’ve added support for Shutters and Alarm Panel in pimatic-hass -> version 0.2.29.
The shutter should be based on the DummyShutter device in pimatic and for the Alarm Panel you need to use the DummyAlarmPanel that is part of the pimatic-dummies plugin. More information. -
Will give it a try when I am back from my business trip end of month.
-
Haven’t tested the DummyShutter and AlarmPanel till how. But made the update to the latest version 0.3.7. And as I can see everything works.
-
Seems I havn’t tested good enough this time.
When I try to push a button in Pimatic over HAss I am getting this error messages:
error [pimatic]: An uncaught exception occurred: TypeError: Cannot read property 'handleMessage' of undefined at MqttClient._this.client.on._this.clientMessageHandler (/home/ortin/pimatic-app/node_modules/pimatic-hass/pimatic-hass.coffee:170:37) at MqttClient.emit (events.js:198:13) at MqttClient._handlePublish (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:1162:12) at MqttClient._handlePacket (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:351:12) at work (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:283:12) at Writable.writable._write (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:294:5) at doWrite (/home/ortin/pimatic-app/node_modules/readable-stream/lib/_stream_writable.js:428:64) at writeOrBuffer (/home/ortin/pimatic-app/node_modules/readable-stream/lib/_stream_writable.js:417:5) at Writable.write (/home/ortin/pimatic-app/node_modules/readable-stream/lib/_stream_writable.js:334:11) at Socket.ondata (_stream_readable.js:709:20) at Socket.emit (events.js:198:13) at Socket.emit (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:64:24) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.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!
Switches are working, they are just a bit lazy in their reaction. Variable from Pimatic are displayed in HAss. Unfortunately there is not debug when I press a button which I could provide for analysis.
When I press the button on Pimatic side I can see the expected reaction (related switch in HAss changes to on for 5 seconds) on HAss side.
I moved my HAss playground to a new installation, so this could be also the reason for the behavior… don’t know.
Can someone please verify if buttons still working with the latest hass plugin version? -
ButtonDevice: "test-button"
Button: “klick” and “klack” -
Found this:
20:37:23.517 [pimatic-hass] debug: Look for adapter for device: test-button_klick 20:37:23.519 [pimatic-hass] debug: Adapter found for device: test-button_klick 20:37:23.519 [pimatic-hass] debug: Adapter found for topic hass/pimatic-bridge_test-button_klick/set, test-button_klick 20:37:23.520 [pimatic] error: An uncaught exception occurred: TypeError: Cannot read property 'handleMessage' of undefined 20:37:23.520 [pimatic] error:> at MqttClient._this.client.on._this.clientMessageHandler (/home/ortin/pimatic-app/node_modules/pimatic-hass/pimatic-hass.coffee:170:37) 20:37:23.520 [pimatic] error:> at MqttClient.emit (events.js:198:13) 20:37:23.520 [pimatic] error:> at MqttClient._handlePublish (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:1162:12) 20:37:23.520 [pimatic] error:> at MqttClient._handlePacket (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:351:12) 20:37:23.520 [pimatic] error:> at work (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:283:12) 20:37:23.520 [pimatic] error:> at Writable.writable._write (/home/ortin/pimatic-app/node_modules/mqtt/lib/client.js:294:5) 20:37:23.520 [pimatic] error:> at doWrite (/home/ortin/pimatic-app/node_modules/readable-stream/lib/_stream_writable.js:428:64) 20:37:23.520 [pimatic] error:> at writeOrBuffer (/home/ortin/pimatic-app/node_modules/readable-stream/lib/_stream_writable.js:417:5) 20:37:23.520 [pimatic] error:> at Writable.write (/home/ortin/pimatic-app/node_modules/readable-stream/lib/_stream_writable.js:334:11) 20:37:23.520 [pimatic] error:> at Socket.ondata (_stream_readable.js:709:20) 20:37:23.520 [pimatic] error:> at Socket.emit (events.js:198:13) 20:37:23.520 [pimatic] error:> at Socket.emit (/home/ortin/pimatic-app/node_modules/pimatic/startup.coffee:64:24) 20:37:23.520 [pimatic] error:> at addChunk (_stream_readable.js:288:12) 20:37:23.520 [pimatic] error:> at readableAddChunk (_stream_readable.js:269:11) 20:37:23.520 [pimatic] error:> at Socket.Readable.push (_stream_readable.js:224:10) 20:37:23.520 [pimatic] error:> at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) 20:37:23.520 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it! 20:37:23.521 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible! Unhandled rejection Error: unknown state="null"! Unhandled rejection Error: unknown state="null"!
-
Correct. I deleted it from the hassDevice, but still the same.
-
I’ve updated the debug output in the above post. Now you can see more.