[Homeyduino] E-paper for Homey

Probably an upgrade to do. I will need to take a few time to do it.

I did the chinese driver for serial /usb comm driver. but nothing worked on monterey 12.6.1 . windows worked for me.

Did not try m1 (v13) will check that.

used latest Arduino, did not see this py error. j

those buttons on top , can we use them for a redraw of the screen when it is messed up. or switch between 4 or 6 items

also can we add more homey icons like for power and gas.

"it’s limited to 33 "
Maybe than it is wiser to create an “own” Homey App.

1 Like

Encouraged by this words from @Picsou621 and all other reactions in this thread, i decided to check into this nice initiative also. Ordered the screen (@robertklep thx for the link) and also the capacitive touchscreen (I’m sure @sebyldino will find a way to make use of that :grimacing:). Also my first dummy experience with esp32, so hope installing everything from Mac will work (else I have a spare windows laptop lying somewhere :face_with_diagonal_mouth:).

I also ordered the screen and it’s also the first contact with Arduino for me. I will surely ask many questions… :wink:

Just for info regarding the SDK3 update of the Homeyduino app developed by Athom:

3 Likes

This is a great en much cheaper alternative to the other e-ink display on this forum.
I’m very curious how it works in detail and is it possible to post some videos? So we can see how the screen performs.

I get this issue after homey upgrade.

[log] 2023-01-20 14:47:50 [HomeyduinoApp] [njs-discovery] DUMP: {"id":"Paper Screen","version":"1.0.2","type":"homeyduino","class":"sensor","master":{"host":"0.0.0.0", "port":9999},"api":[{"name":"measure_battery", "type":"cap"},{"name":"Custom_weather_Icon", "type":"act"},{"name":"Weather_Text", "type":"act"},{"name":"Weather_Value", "type":"act"},{"name":"Device_Type_Zone_1", "type":"act"},{"name":"Device_Type_Zone_2", "type":"act"},{"name":"Device_Type_Zone_3", "type":"act"},{"name":"Device_Type_Zone_4", "type":"act"},{"name":"Device_Type_Zone_5", "type":"act"},{"name":"Device_Type_Zone_6", "type":"act"},{"name":"Icon_Zone_1", "type":"act"},{"name":"Icon_Zone_2", "type":"act"},{"name":"Icon_Zone_3", "type":"act"},{"name":"Icon_Zone_4", "type":"act"},{"name":"Icon_Zone_5", "type":"act"},{"name":"Icon_Zone_6", "type":"act"},{"name":"Name_Zone_1", "type":"act"},{"name":"Name_Zone_2", "type":"act"},{"name":"Name_Zone_3", "type":"act"},{"name":"Name_Zone_4", "type":"act"},{"name":"Name_Zone_5", "type":"act"},{"name":"Name_Zone_6", "type":"act"},{"name":"Value_Zone_1", "type":"act"},{"name":"Value_Zone_2", "type":"act"},{"name":"Value_Zone_3", "type":"act"},{"name":"Value_Zone_4", "type":"act"},{"name":"Value_Zone_5", "type":"act"},{"name":"Value_Zone_6", "type":"act"},{"name":"Time_Deep_Sleep", "type":"act"},{"name":"Battery_Percent", "type":"act"},{"name":"Battery_Icon", "type":"act"},{"name":"Last_Update", "type":"act"},{"name":"Screen_Repair", "type":"act"},{"name":"Select_Language", "type":"act"},
[log] 2023-01-20 14:47:50 [HomeyduinoApp] [njs-discovery] Received corrupt data from 192.168.107.68, ignoring packet.
[log] 2023-01-20 14:47:50 [HomeyduinoApp] [njs-discovery] DUMP: {"name":"Display_Mode", "type":"act"}]}

and don’t to re add device because then my flow steps are lost.

The first DUMP line is exactly 1460 bytes long, which also happens to be the size of the Arduino TCP MSS (basically, the maximum amount of data a single TCP packet can hold). My guess is that the Arduino TCP stack doesn’t support fragmentation.

1 Like

now skipping discovery and doing tcp. the UI checkbox part does not work. will fix it later on the forked v3 sdk.

	deviceInit() {
		if (this.listening) {
			this.removeListeners(); //First remove the listeners
		}
		this.log("Searching for Arduino device "+this.deviceId+"...");
		this.device = this.homey.app.discovery.getDevice(this.deviceId);

		if ( this.device instanceof Error ) {
			this.log("Device ",this.deviceId," is not available.");
			this.setUnavailable("Offline");
			this.available = false;

			// if (this.polling) {
				this.log("Polling is enabled for device",this.deviceId," at IP ",this.ipAddress);
				this.homey.app.discovery.poll(this.ipAddress, (err, res) => {
					if (err) {
						this.log("Poll returned error:",err);
					} else {
						this.log("Poll success!");
					}
				});
			// }
onInit HomeyduinoApp...
onInit driver...
onInit device...
[log] 2023-01-20 15:16:48 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] typeof settings.id = string
[log] 2023-01-20 15:16:48 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] Searching for Arduino device Paper Screen...
[log] 2023-01-20 15:16:48 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] Device  Paper Screen  is not available.
[log] 2023-01-20 15:16:48 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] Polling is enabled for device Paper Screen  at IP  192.168.107.68
[log] 2023-01-20 15:16:48 [HomeyduinoApp] [njs-discovery] Polling device 192.168.107.68 over TCP...
[log] 2023-01-20 15:16:48 [HomeyduinoApp] [njs-discovery] Received corrupt data from 192.168.107.68, ignoring packet.
[log] 2023-01-20 15:16:48 [HomeyduinoApp] [njs-discovery] DUMP: {"name":"Display_Mode", "type":"act"}]}
[log] 2023-01-20 15:16:53 [HomeyduinoApp] [njs-discovery] New device: 'Paper Screen'
[log] 2023-01-20 15:16:53 [ManagerDrivers] [Driver:homeyduino] onDiscoverDevice Paper Screen
[log] 2023-01-20 15:16:53 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] Searching for Arduino device Paper Screen...
[log] 2023-01-20 15:16:53 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] Device  Paper Screen  is available.
[log] 2023-01-20 15:16:53 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] Info: device API changed
[log] 2023-01-20 15:16:53 [ManagerDrivers] [Driver:homeyduino] [Device:62052ec6-13c0-4720-8ecb-e8b260291bcd] Info: added capability measure_battery

looks like I always get this error.

log] 2023-01-20 15:18:06 [HomeyduinoApp] onAction ok
[log] 2023-01-20 15:18:06 [HomeyduinoApp] onAction typeof string
[log] 2023-01-20 15:18:18 [HomeyduinoApp] [njs-discovery] Received corrupt data from 192.168.107.68, ignoring packet.
[log] 2023-01-20 15:18:18 [HomeyduinoApp] [njs-discovery] DUMP: {"id":"Paper Screen","version":"1.0.2","type":"homeyduino","class":"sensor","master":{"host":"192.168.107.50", "port":43111},"api":[{"name":"measure_battery", "type":"cap"},{"name":"Custom_weather_Icon", "type":"act"},{"name":"Weather_Text", "type":"act"},{"name":"Weather_Value", "type":"act"},{"name":"Device_Type_Zone_1", "type":"act"},{"name":"Device_Type_Zone_2", "type":"act"},{"name":"Device_Type_Zone_3", "type":"act"},{"name":"Device_Type_Zone_4", "type":"act"},{"name":"Device_Type_Zone_5", "type":"act"},{"name":"Device_Type_Zone_6", "type":"act"},{"name":"Icon_Zone_1", "type":"act"},{"name":"Icon_Zone_2", "type":"act"},{"name":"Icon_Zone_3", "type":"act"},{"name":"Icon_Zone_4", "type":"act"},{"name":"Icon_Zone_5", "type":"act"},{"name":"Icon_Zone_6", "type":"act"},{"name":"Name_Zone_1", "type":"act"},{"name":"Name_Zone_2", "type":"act"},{"name":"Name_Zone_3", "type":"act"},{"name":"Name_Zone_4", "type":"act"},{"name":"Name_Zone_5", "type":"act"},{"name":"Name_Zone_6", "type":"act"},{"name":"Value_Zone_1", "type":"act"},{"name":"Value_Zone_2", "type":"act"},{"name":"Value_Zone_3", "type":"act"},{"name":"Value_Zone_4", "type":"act"},{"name":"Value_Zone_5", "type":"act"},{"name":"Value_Zone_6", "type":"act"},{"name":"Time_Deep_Sleep", "type":"act"},{"name":"Battery_Percent", "type":"act"},{"name":"Battery_Icon", "type":"act"},{"name":"Last_Update", "type":"act"},{"name":"Screen_Repair", "type":"act"},{"name":"Select_Language", "type"
[log] 2023-01-20 15:18:18 [HomeyduinoApp] [njs-discovery] Received corrupt data from 192.168.107.68, ignoring packet.
[log] 2023-01-20 15:18:18 [HomeyduinoApp] [njs-discovery] DUMP: :"act"},{"name":"Display_Mode", "type":"act"}]}

So what happens is that the Arduino device sends a so called “index” JSON string to the app which contains (amongst other data) a list of capabilities and actions for the sketch.

This JSON string is too large for a single TCP packet, so it’s split up (the two “DUMP” lines in the log), but the Homeyduino app (specifically the homey-arduino package it uses) cannot handle this: after receiving the first packet, it tries to parse the JSON and fails (because it’s only a partial JSON string).

The issue has to be fixed in the Homeyduino app.

1 Like

indeed, I see now. let me also check that part. maybe original device had less fields and it fits at that time.

found it com.athom.homeyduinoSDK3/ArduinoDiscovery.js at master · PeterEIER/com.athom.homeyduinoSDK3 · GitHub

Yes, it should wait until it can fully parse the data before it continues processing it.

Version 1.2.3? Had the same downgraded to 1.2.2 problem solved.

another ‘google search’ champion :stuck_out_tongue_winking_eye:

1 Like

yes, I guess you have less data or caps on 1.22 so smaller packet size and fits in 1. we need to fix this else we are limited in any future development.

more github , you can see who forked the athom one. total 5

Current functionality is fine for me, and as such I couldn’t care less about this bug :wink:

Yes, years ago… Athom confirmed that they will update Homeyduino, so no need any more for forking / pull requests.

It is time for a separate “[APP] [PRO] Homeyduino” topic, we are polluting the e-paper topic imho.