New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] Landroid v4 #87
base: master
Are you sure you want to change the base?
Conversation
Added addon.xml Seeded i18n file Adressed potential NPE detected by IDE. Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Enforcing usage of @NonNullByDefault Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Identified the serial number as a specific configuration element of the mower Signed-off-by: clinique <gael@lhopital.org>
@nibi79 : do you prefer I push to your repo or should I go directly to openhab/addons ? |
@clinique thanks for your work, but please push it only to my repo. I hope I can check it next week. |
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Does this version work for you? Because I have connection problems. |
If I'm right, openhab uses HiveMQ version 1.2.2, but this version doesn't support custom headers for MQTT. The newer version 1.3.1 does. |
Not fully tested, consider it as of now as an ongoing work.
Ok, so keep as it is for now and in a second time see if there is no show-stopper on upgrading core version of HiveMQ |
Signed-off-by: clinique <gael@lhopital.org>
Usage of system defined channel types Usage of UoM channels Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Data push to channels controlled. Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
@nibi79 : I think I nearly finished reviewing your code. It now needs testing. We could publish it on the Marketplace, this would let people give feedback while we refine it. Your thoughts ? The README.md still needs a complete review. |
Signed-off-by: clinique <gael@lhopital.org>
Adding valid example of .things file in README.md Some SAT corrections for mvn Signed-off-by: clinique <gael@lhopital.org>
https://community.openhab.org/t/worx-landroid-binding/95246/289?u=sihui |
I get the following error during initialization of the bridge thing:
|
Yes, there's obviously something wrong with this json response. I'll have to find where is the error in it. |
Ok, I think the error does not lie in the json. It is wrong because you anonimized your location. Correct ? |
I exchanged the exact location as well as the serial number and mac with the XXX. Yes, there was an error in the json due to my manual edit. I fixed that. The json seems to be at least in a correct format. The app is telling me also that there is a connection issue. Maybe I am blocked at the moment and need to check it again tomorrow. In the logs I also see the same error message as well as: But this is mainly due to the problem with the bridge as I would understand this. |
Hi @clinique! Thank you. |
I'm going to take a look and try to find the origin of the deserialization error. |
Signed-off-by: clinique <gael@lhopital.org>
I got it up and running with this new version. There are still some errors in the readme regarding the channel names, but I did not have time to come up with a full correct version to share at the moment. Current status: String LandroidAction "Action []" {channel="worxlandroid:mower:MyWorxBridge:mymower:common#action"} String LandroidMacAdress "MAC [%s]" {channel="worxlandroid:mower:MyWorxBridge:mymower:datCommon#macAdress"} String LandroidLastUpdateOnlineStatus "Last Update Online Status [%1$td.%1$tm.%1$ty / %1$tH:%1$tM:%1$tS]" {channel="worxlandroid:mower:MyWorxBridge:mymower:config#timestamp"} // Multizone // Zone Meters // Allocation Zones // Status // Rain // Move // Battery // Settings // Statistics //Schedule // Monday // Tuesday // Wednesday // Thursday // Friday // Saturday // Sunday |
With
The json appears to be valid json: [{
"id": 521194,
"uuid": "96c52fe2-b305-4002-a016-cfe629b82643",
"product_id": 49,
"user_id": 0,
"serial_number": "00000000000000000000",
"mac_address": "XXXXXXXXXXXX",
"name": "M",
"locked": true,
"firmware_version": 3.28,
"firmware_auto_upgrade": true,
"push_notifications": true,
"sim": {
"id": 12345,
"iccid": "0000000000000000000",
"sim_status": "provisioned",
"pending_activation": false,
"contract_starts_at": "2023-04-10 00:00:00",
"contract_ends_at": "2026-04-10 00:00:00",
"created_at": "2023-04-10 08:09:21",
"updated_at": "2023-07-26 08:31:33"
},
"push_notifications_level": "warning",
"test": false,
"iot_registered": true,
"mqtt_registered": true,
"pin_code": "1803",
"registered_at": "2021-08-19 00:00:00",
"online": false,
"app_settings": {
"cellular_setup_completed": true
},
"protocol": 0,
"pending_radio_link_validation": null,
"capabilities": ["auto_lock", "bluetooth_pairing", "border_cut", "digital_fence_settings", "follow_border", "lock", "mqtt", "multi_zone", "multi_zone_percentage", "one_time_scheduler", "ota_upgrade", "pairing_smartconfig", "pause_over_wire", "rain_delay", "rain_delay_start", "safe_go_home", "scheduler_two_slots", "unrestricted_mowing_time"],
"capabilities_available": ["zone_keeper"],
"features": {
"auto_lock": 3.25,
"bluetooth_pairing": true,
"chassis": "m_2019",
"digital_fence_settings": 3.25,
"display_type": "tube",
"input_type": "keyboard_tube",
"lock": true,
"mqtt": true,
"multi_zone": true,
"multi_zone_percentage": true,
"multi_zone_zones": 4,
"one_time_scheduler": 3.15,
"pause_over_wire": 3.26,
"rain_delay": true,
"rain_delay_start": 3.08,
"safe_go_home": 3.25,
"scheduler_two_slots": 3.15,
"unrestricted_mowing_time": true,
"wifi_pairing": "smartconfig"
},
"accessories": {
"cellular": true
},
"mqtt_endpoint": "iot.eu-west-1.worxlandroid.com",
"mqtt_topics": {
"command_in": "PRM100\/F4CFA2A090C8\/commandIn",
"command_out": "PRM100\/F4CFA2A090C8\/commandOut"
},
"warranty_registered": true,
"purchased_at": "2021-08-08 00:00:00",
"warranty_expires_at": "2024-08-08 00:00:00",
"setup_location": {
"latitude": 0.00000000,
"longitude": 0.00000000
},
"city": {
"id": 0,
"country_id": 0,
"name": "XXXXXXXXXXXX",
"latitude": 0.000000,
"longitude": 0.00000,
"created_at": "2018-02-15 22:35:20",
"updated_at": "2018-02-15 22:35:20"
},
"time_zone": "Europe\/Amsterdam",
"lawn_size": 36,
"lawn_perimeter": null,
"auto_schedule_settings": {
"boost": 0,
"exclusion_scheduler": {
"days": [{
"slots": [],
"exclude_day": false
}, {
"slots": [],
"exclude_day": false
}, {
"slots": [],
"exclude_day": false
}, {
"slots": [],
"exclude_day": false
}, {
"slots": [],
"exclude_day": false
}, {
"slots": [],
"exclude_day": false
}, {
"slots": [],
"exclude_day": false
}],
"exclude_nights": true
},
"grass_type": "lolium_perenne",
"irrigation": false,
"nutrition": null,
"soil_type": null
},
"auto_schedule": false,
"improvement": true,
"diagnostic": true,
"distance_covered": 46682,
"mower_work_time": 4378,
"blade_work_time": 4153,
"blade_work_time_reset": 0,
"blade_work_time_reset_at": null,
"battery_charge_cycles": 58,
"battery_charge_cycles_reset": 0,
"battery_charge_cycles_reset_at": null,
"created_at": "2020-11-22 05:19:53",
"updated_at": "2023-04-10 09:24:43",
"last_status": {
"timestamp": "2023-07-23 16:25:25",
"payload": {
"cfg": {
"id": 0,
"sn": "00000000000000000000",
"dt": "23\/07\/2023",
"tm": "18:25:25",
"lg": "en",
"cmd": 0,
"sc": {
"m": 1,
"d": [
["09:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["09:00", 0, 0]
],
"dd": [
["09:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["00:00", 0, 0],
["09:00", 0, 0]
],
"distm": 0,
"p": 0,
"ots": {
"wtm": 0,
"bc": 0
}
},
"mz": [0, 0, 0, 0],
"mzv": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"rd": 180,
"al": {
"lvl": 1,
"t": 30
},
"tq": 0,
"modules": {
"4G": {
"enabled": 1,
"geo": {
"coo": [0.00000, 0.00000],
"rad": 21
}
}
}
},
"dat": {
"mac": "XXXXXXXXXXXX",
"fw": 3.28,
"fwb": 1,
"ls": 1,
"le": 0,
"conn": "wifi",
"bt": {
"t": 21.6,
"v": 19.36,
"p": 100,
"nr": 58,
"c": 0,
"m": 0
},
"dmp": [1.3, 0.5, 0],
"st": {
"b": 4153,
"d": 46682,
"wt": 4378,
"bl": 0
},
"act": 1,
"rsi": 0,
"lk": 1,
"tr": 0,
"lz": 0,
"rain": {
"s": 0,
"cnt": 0
},
"modules": {
"4G": {
"stat": "ok",
"vers": 2.51,
"batt": {
"t": 23,
"v": 4.11,
"l": 96
},
"mode": 0,
"geo": {
"stat": "unk"
},
"network": {
"status": "disconnected",
"ICCID": "0000000000000000000",
"IMSI": "000000000000000",
"rssi": -125
}
}
}
}
}
}
}] |
Hello, may I help with implementation for OH4 please? Thanks |
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Code cleansing Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
…y opened connection Added reset of blade time and charge cycle logic Added retry loop when oAuth token refresh fails Signed-off-by: clinique <gael@lhopital.org>
This is now apparently done : openhab/openhab-core#3824 |
Signed-off-by: clinique <gael@lhopital.org>
@nibi79 : when do you plan to push it to OH repo ? |
@nibi79 : sorry to push you on this but coping with a binding outside of the repo is a burden. Should I make the PR ? |
hi @clinique, to be honest, I didn't really want to push into the OH repo, but let's talk about it again next week |
hey guys, BR |
Checklist :
- [ ] use the mqtt transport provided by openhab core